ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("lara.metrics.Metric");

(.lara)
import lara.metrics.Metric;

Metric

Constructor

Metric

new Metric(name)

Reprents a metric we want to extract.

Parameters

name: string - The name of the metric

Instance Members

getImport

getImport()

Returns

string - A string with the LARA import of this Metric.

getName

getName()

getUnit

getUnit()

Returns

string - A string with the current unit of this metric.

instrument

instrument($start, [$end = $start])

Instruments code so that when executed, it produces information about the metric to measure.

Parameters

$start: joinpoint - join point representing the start point of the instrumentation
$end: joinpoint - join point representing the end point of the instrumentation (optional)

report

report(processExecutor)

Extract metric.

Parameters

processExecutor: L#lara.util.ProcessExecutor - instance after program execution

Returns

L#lara.metrics.MetricResult - metric after program execution