public void SetContext( FilterService filterService, SchedulingService schedulingService, EventServiceSendEventCommon eventServiceSendEventInternal) { var metricsExecutionContext = new MetricExecutionContext( filterService, schedulingService, eventServiceSendEventInternal, stmtMetricRepository); // create all runtime and statement executions metricExecEngine = new MetricExecEngine(this, runtimeURI, schedule, specification.RuntimeInterval); metricExecStmtGroupDefault = new MetricExecStatement(this, schedule, specification.StatementInterval, 0); var countGroups = 1; foreach (var entry in specification.StatementGroups) { var config = entry.Value; var metricsExecution = new MetricExecStatement(this, schedule, config.Interval, countGroups); statementGroupExecutions.Put(entry.Key, metricsExecution); countGroups++; } // last assign this volatile variable so the time event processing may schedule callbacks executionContext = metricsExecutionContext; }
public void Execute(MetricExec execution, MetricExecutionContext executionContext) { execution.Execute(executionContext); }
public void Execute(MetricExecutionContext context) { IsExecuted = true; }