KADABRA API

LARA API

LARA Common Language API

(.js)
laraImport("lara.benchmark.BenchmarkInstance");

(.lara)
import lara.benchmark.BenchmarkInstance;

BenchmarkInstance

Constructor

BenchmarkInstance

new BenchmarkInstance(name)

Represents a set of BenchmarkInstances.

Parameters

name: any

Instance Members

close

close()

Restores the AST previous to load().


compile

compile()

Compiles the current version of the benchmark that is in the AST. Requires calling .load() first.


execute

execute()

Executes the current version of the benchmark. Requires calling .compile() first.

Returns

ProcessExecutor - the ProcessExecutor used to execute this instance

getBaseFolder

getBaseFolder()

Returns

J#File - The base folder for all benchmark instances. Currently is a folder 'laraBenchmarks' inside the working directory.

getCMaker

getCMaker()

Returns

lara.cmake.CMaker - An available CMaker that can be used to run compiled the program (implementations may vary). If used, can be used to configure the compilation.

getExecutor

getExecutor()

Returns

lara.util.ProcessExecutor - The executor that will be used to run the compiled program, can be used to configure the execution.

getKernel

getKernel()

Returns

$jp - point in the code representing the execution of the benchmark kernel, around which metrics should be measured.

getName

getName()

Returns

String - the name of this BenchmarkInstance.

load

load()

Saves the current AST and loads this benchmark into the AST.


setCMakerProvider

setCMakerProvider(cmakerProviderFunction)

Parameters

cmakerProviderFunction: any

test

test([worker = undefined], [executeCode = false], [outputProcessor = undefined])

Test the current instance.

Parameters

worker: function() - Function with no parameters that will be called after loading the bencharmk code as AST. (optional)
executeCode: boolean - If true, executes the code after worker is applied. (optional)
outputProcessor: function(lara.util.ProcessExecutor) - If execution is enabled, will be called after execution with the corresponding ProcessExecutor. (optional)

Returns

boolean - true, if finished without problems