How to get 'evalStart', 'evalEnd', 'evalInterval' in expression?

#1

In my expression, I need to access these fields in EvalMetricsSpec. How can I get them?

0 Likes

#2

For interval, maybe use grain() from ExpressionEngineFunction.
If you are referring to the start and end fields in your EvalMetricSpec, maybe you can send those variables as bindings? EvalMetricSpec.bindings

0 Likes

Evaluate metric in a variable interval
#3

Explore the expression engine functions now(), start(), and end().

In the context of a metric expression, they refer to the start and end of the currently computing time-slice

0 Likes

#4

Use
evalStart() for the evaluation start
evalEnd() for the evaluation end
evalInterval() for the evaluation interval
_context.extensions['metric'].src.id - for the source id

0 Likes