Exemplo n.º 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);
 }
        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);
        }
Exemplo n.º 3
0
 private static void Register(this MetricsRegistry registry, string name, Func <GaugeMetric> gauge, Unit unit)
 {
     registry.Gauge(name, gauge, unit);
 }