示例#1
0
        public MetricAggregator(CustomMetricsPoster poster, int seconds)
        {
            if (poster == null)
            {
                throw new ArgumentNullException("poster");
            }

            _customMetricsPoster = poster;

            _timer = new Timer
                {
                    Interval = TimeSpan.FromSeconds(seconds).TotalMilliseconds,
                };
            _timer.Elapsed += Tick;
            _timer.Start();
        }
        public MetricAggregator(CustomMetricsPoster poster, int seconds)
        {
            if (poster == null)
            {
                throw new ArgumentNullException("poster");
            }

            _customMetricsPoster = poster;

            _timer = new Timer
            {
                Interval = TimeSpan.FromSeconds(seconds).TotalMilliseconds,
            };
            _timer.Elapsed += Tick;
            _timer.Start();
        }
示例#3
0
 public MetricAggregator(string apiKey, string instanceId = null, CustomMetricsPoster.IFailureCallback failureCallback = null)
     : this(new CustomMetricsPoster(apiKey, instanceId, failureCallback), 60)
 {
 }