Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public void Execute(MetricExec execution, MetricExecutionContext executionContext)
 {
     execution.Execute(executionContext);
 }
Ejemplo n.º 3
0
 public void Execute(MetricExecutionContext context)
 {
     IsExecuted = true;
 }