ANTAREX API

Clava API

LARA API

LARA Common Language API

(.js)
laraImport("antarex.margot.dse.metric.MargotMetric");

(.lara)
import antarex.margot.dse.metric.MargotMetric;

MargotMetric

Constructor

MargotMetric

new MargotMetric(name, unit)

Class that represents a metric used by mARGOt. It has a name and a unit.

For instance, it can represent time in us.

Parameters

name: MargotMetricName - the name of the metric
unit: Unit - the unit this metric is measured in

Instance Members

addInfo

addInfo(key, value)

Adds arbitrary information to this metric using a <key, value> pair.

Parameters

key: any
value: any

convertUnit

convertUnit(value, unit, unitHasBaseName)

Converts a value in a provided unit to the unit of this metric.

Parameters

value: Number - the value to convert
unit: string - the unit in which the value is represented
unitHasBaseName: any

getName

getName()

Returns the name of this metric.


getUnit

getUnit()

Returns the unit of this metric.


getUnitName

getUnitName()

Returns the name of the unit of this metric.


setUnit

setUnit(unit)

Sets the unit of this metric.

Parameters

unit: Unit - the new unit