Example #1
0
 /// <summary>Ctor. </summary>
 /// <param name="metricEventRouter">for routing metric events</param>
 /// <param name="metricScheduleService">for scheduling a new execution</param>
 /// <param name="interval">for rescheduling the execution</param>
 /// <param name="statementGroup">group number of statement group</param>
 public MetricExecStatement(MetricEventRouter metricEventRouter, MetricScheduleService metricScheduleService, long interval, int statementGroup)
 {
     this.metricEventRouter     = metricEventRouter;
     this.metricScheduleService = metricScheduleService;
     this.interval       = interval;
     this.statementGroup = statementGroup;
 }
Example #2
0
 /// <summary>Ctor. </summary>
 /// <param name="metricEventRouter">for routing metric events</param>
 /// <param name="engineURI">engine uri</param>
 /// <param name="metricScheduleService">for scheduling a new execution</param>
 /// <param name="interval">for rescheduling the execution</param>
 public MetricExecEngine(MetricEventRouter metricEventRouter,
                         String engineURI,
                         MetricScheduleService metricScheduleService,
                         long interval)
 {
     _metricEventRouter     = metricEventRouter;
     _engineURI             = engineURI;
     _metricScheduleService = metricScheduleService;
     Interval = interval;
 }
        public void SetUp()
        {
            _svc = new MetricScheduleService();

            _execs = new SupportMetricExecution[100];
            for (int i = 0; i < _execs.Length; i++)
            {
                _execs[i] = new SupportMetricExecution();
            }

            _executions = new List <MetricExec>();
        }
Example #4
0
        /// <summary>Ctor. </summary>
        /// <param name="specification">configuration</param>
        /// <param name="engineUri">engine URI</param>
        public MetricReportingServiceImpl(ConfigurationMetricsReporting specification, String engineUri)
        {
            _specification = specification;
            _engineUri     = engineUri;
            _schedule      = new MetricScheduleService();

            _stmtMetricRepository     = new StatementMetricRepository(engineUri, specification);
            _statementGroupExecutions = new LinkedHashMap <String, MetricExecStatement>();
            _statementMetricHandles   = new Dictionary <String, StatementMetricHandle>();
            StatementOutputHooks      = new CopyOnWriteArraySet <StatementResultListener>();

            if (specification.IsThreading)
            {
                _metricsExecutor = new MetricsExecutorThreaded(engineUri);
            }
            else
            {
                _metricsExecutor = new MetricsExecutorUnthreaded();
            }
        }