Exemplo n.º 1
0
 /// <inheritdoc />
 public TimerContext Time(BucketTimerOptions options, string userValue)
 {
     return(_registry.BucketTimer(
                options,
                () => _timerBuilder.Build(options.Buckets, _clock, options.DurationUnit)).
            NewContext(userValue));
 }
 /// <inheritdoc />
 public ITimer WithHistogram <T>(BucketTimerOptions options, Func <T> histogramMetricBuilder)
     where T : IBucketHistogramMetric
 {
     return(Instance(
                options,
                () => _timerBuilder.Build(histogramMetricBuilder(), _clock, options.DurationUnit)));
 }
 /// <inheritdoc />
 public ITimer Instance(BucketTimerOptions options, MetricTags tags)
 {
     return(Instance(
                options,
                tags,
                () => _timerBuilder.Build(options.Buckets, _clock, options.DurationUnit)));
 }
Exemplo n.º 4
0
 /// <inheritdoc />
 public TimerContext Time(BucketTimerOptions options, MetricTags tags)
 {
     return
         (_registry.BucketTimer(
              options,
              tags,
              () => _timerBuilder.Build(options.Buckets, _clock, options.DurationUnit)).
          NewContext());
 }
Exemplo n.º 5
0
 /// <inheritdoc />
 public void Time(BucketTimerOptions options, Action action, string userValue)
 {
     using (
         _registry.BucketTimer(
             options,
             () => _timerBuilder.Build(options.Buckets, _clock, options.DurationUnit)).
         NewContext(userValue))
     {
         action();
     }
 }
Exemplo n.º 6
0
 /// <inheritdoc />
 public void Time(BucketTimerOptions options, MetricTags tags, Action action)
 {
     using (
         _registry.BucketTimer(
             options,
             tags,
             () => _timerBuilder.Build(options.Buckets, _clock, options.DurationUnit)).
         NewContext())
     {
         action();
     }
 }
 public ITimer Instance <T>(BucketTimerOptions options, MetricTags tags, Func <T> builder)
     where T : IBucketTimerMetric
 {
     return(_registry.BucketTimer(options, tags, builder));
 }