DMDComponent.measure

Tries to compile a snippet of code with the import paths in the current directory. The arguments -c -o- are implicit. The sync function may be used to prevent other measures from running while this is running.

class DMDComponent
measure
(
scope const(char)[] code
,
string[] dmdArguments = []
,
int count = 1
,
int timeoutMsecs = 5000
)

Parameters

code const(char)[]

small code snippet to try to compile

dmdArguments string[]

additional arguments to pass to dmd before file name

count int

how often to compile (duration is divided by either this or less in case timeout is reached)

timeoutMsecs int

when to abort compilation after, note that this will not abort mid-compilation but not do another iteration if this timeout has been reached.

Return Value

Type: Future!DMDMeasureReturn

DMDMeasureReturn containing logs from only the first compilation pass

Meta