コード例 #1
0
 private static void AddMetrics(MetricsRegistry registry)
 {
     var name = "Test";
     registry.Gauge(name, () => 0.0, Unit.Calls);
     registry.Counter(name, Unit.Calls);
     registry.Meter(name, Unit.Calls, TimeUnit.Seconds);
     registry.Histogram(name, Unit.Calls, SamplingType.FavourRecent);
     registry.Timer(name, Unit.Calls, SamplingType.FavourRecent, TimeUnit.Seconds, TimeUnit.Milliseconds);
 }
コード例 #2
0
        private static void AddMetrics(MetricsRegistry registry)
        {
            var name = "Test";

            registry.Gauge(name, () => 0.0, Unit.Calls);
            registry.Counter(name, Unit.Calls);
            registry.Meter(name, Unit.Calls, TimeUnit.Seconds);
            registry.Histogram(name, Unit.Calls, SamplingType.FavourRecent);
            registry.Timer(name, Unit.Calls, SamplingType.FavourRecent, TimeUnit.Seconds, TimeUnit.Milliseconds);
        }
コード例 #3
0
 public ActiveRequestCounterMiddleware(MetricsRegistry registry, string metricName)
 {
     this.activeRequests = registry.Counter(metricName, Unit.Custom("ActiveRequests"));
 }