Ejemplo n.º 1
0
        /// <summary>
        /// Start tracking a new TimeMetricTracker. When the object is disposed it will be registered as a metric
        /// </summary>
        /// <param name="metricName"></param>
        public TimeMetricTracker TrackTimeMetric(string metricName, params Tag[] tags)
        {
            var tracker = new TimeMetricTracker(metricName);

            tracker.MetricTracked += HandleTimeTrackerMetricCallback;
            return(tracker);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Handle the time tracker metric callback and register the results
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void HandleTimeTrackerMetricCallback(TimeMetricTracker sender, MetricTrackedEventArgs e)
 {
     this.TrackMetric(e.MetricName, e.MetricValue, e.Tags);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Handle the time tracker metric callback and register the results
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void HandleTimeTrackerMetricCallback(TimeMetricTracker sender, MetricTrackedEventArgs e)
 {
     this.TrackMetric(e.MetricName, e.MetricValue, e.Tags);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Start tracking a new TimeMetricTracker. When the object is disposed it will be registered as a metric
 /// </summary>
 /// <param name="metricName"></param>
 public TimeMetricTracker TrackTimeMetric(string metricName, params Tag[] tags)
 {
     var tracker = new TimeMetricTracker(metricName);
     tracker.MetricTracked += HandleTimeTrackerMetricCallback;
     return tracker;
 }