Making Metrics of Constant Values (identity() ExpressionEngineFunction)


#1

If there is a static field on a type that changes from instance to instance (so you cannot use an Enum type to access the value as a constant), currently, as far as I know, the best way to access this variable is to invoke the indentity() method (see c3ShowType(ExpressionEngineFunction) ) in a SimpleMetric that repeats the value of the static field in every interval the metric-evaluator asks for. However, it is often pointed out that this seems like it would be quite expensive to repeat the same value over and over in memory.

Is there a better way to access a constant variable from within a metric without indentity() SimpleMetrics?


#2

Care of @rohit.sureka and @DavidT:

Identity timeseries doesn’t actually store same value N times in memory - it only stores single value and just has timeseries semantics. Therefore, it is actually efficient from memory standpoint.