Examples of meter()


Examples of com.codahale.metrics.MetricRegistry.meter()

    private MetricRegistry getMockMetricRegistry() {
        final MetricRegistry mockMetricRegistry = mock(MetricRegistry.class);
        final Meter mockMeter = mock(Meter.class);
        final Timer mockTimer = mock(Timer.class);
        final Counter mockCounter = mock(Counter.class);
        when(mockMetricRegistry.meter(anyString())).thenReturn(mockMeter);
        when(mockMetricRegistry.timer(anyString())).thenReturn(mockTimer);
        when(mockMetricRegistry.counter(anyString())).thenReturn(mockCounter);

        return mockMetricRegistry;
    }
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

        this.metersByStatusCode = new ConcurrentHashMap<Integer, Meter>(meterNamesByStatusCode
                .size());
        for (Entry<Integer, String> entry : meterNamesByStatusCode.entrySet()) {
            metersByStatusCode.put(entry.getKey(),
                    metricsRegistry.meter(name(metricName, entry.getValue())));
        }
        this.otherMeter = metricsRegistry.meter(name(metricName,
                                                     otherMetricName));
        this.activeRequests = metricsRegistry.counter(name(metricName,
                                                           "activeRequests"));
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

                .size());
        for (Entry<Integer, String> entry : meterNamesByStatusCode.entrySet()) {
            metersByStatusCode.put(entry.getKey(),
                    metricsRegistry.meter(name(metricName, entry.getValue())));
        }
        this.otherMeter = metricsRegistry.meter(name(metricName,
                                                     otherMetricName));
        this.activeRequests = metricsRegistry.counter(name(metricName,
                                                           "activeRequests"));
        this.requestTimer = metricsRegistry.timer(name(metricName,
                                                       "requests"));
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

    try {
      final MetricRegistry registry = new MetricRegistry();
      r0 = startConsoleReporter(registry);
      r1 = startInfluxdbReporter(registry);

      final Meter mymeter0 = registry.meter("MyMeter.0");
      for (int i = 0; i < 100; i++) {
        mymeter0.mark();
        mymeter0.mark(Math.round(Math.random() * 100.0));
        Thread.sleep(Math.round(Math.random() * 1000.0));
      }
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

        before(new Filter() {
            @Override
            public void handle(Request request, Response response) {
                metrics.counter("http.connections.concurrent").inc();
                metrics.meter("http.connections.requests").mark();
                metrics.counter("http.connections.stats." + request.raw().getMethod()).inc();
                metrics.counter("http.connections.stats." + request.raw().getMethod() + "." + request.pathInfo()).inc();
            }
        });
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

    @Override
    public void onFrameworkStart() {

        MetricRegistry metrics = metricsService.getMetricRegistry();

        allRequestsMeter = metrics.meter(MetricsService.METER_ALL_REQUESTS);
        activeRequests = metrics.counter(MetricsService.COUNTER_ACTIVE_REQUESTS);
        badRequests = metrics.meter(MetricsService.METER_BAD_REQUESTS);
        internalServerErrors = metrics.meter(MetricsService.METER_INTERNAL_SERVER_ERRORS);
        routesNotFound = metrics.meter(MetricsService.METER_ROUTES_NOT_FOUND);
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

        MetricRegistry metrics = metricsService.getMetricRegistry();

        allRequestsMeter = metrics.meter(MetricsService.METER_ALL_REQUESTS);
        activeRequests = metrics.counter(MetricsService.COUNTER_ACTIVE_REQUESTS);
        badRequests = metrics.meter(MetricsService.METER_BAD_REQUESTS);
        internalServerErrors = metrics.meter(MetricsService.METER_INTERNAL_SERVER_ERRORS);
        routesNotFound = metrics.meter(MetricsService.METER_ROUTES_NOT_FOUND);

        super.onFrameworkStart();
    }
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

        MetricRegistry metrics = metricsService.getMetricRegistry();

        allRequestsMeter = metrics.meter(MetricsService.METER_ALL_REQUESTS);
        activeRequests = metrics.counter(MetricsService.COUNTER_ACTIVE_REQUESTS);
        badRequests = metrics.meter(MetricsService.METER_BAD_REQUESTS);
        internalServerErrors = metrics.meter(MetricsService.METER_INTERNAL_SERVER_ERRORS);
        routesNotFound = metrics.meter(MetricsService.METER_ROUTES_NOT_FOUND);

        super.onFrameworkStart();
    }
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

        allRequestsMeter = metrics.meter(MetricsService.METER_ALL_REQUESTS);
        activeRequests = metrics.counter(MetricsService.COUNTER_ACTIVE_REQUESTS);
        badRequests = metrics.meter(MetricsService.METER_BAD_REQUESTS);
        internalServerErrors = metrics.meter(MetricsService.METER_INTERNAL_SERVER_ERRORS);
        routesNotFound = metrics.meter(MetricsService.METER_ROUTES_NOT_FOUND);

        super.onFrameworkStart();
    }

    @Override
View Full Code Here

Examples of com.codahale.metrics.MetricRegistry.meter()

        this.metersByStatusCode = new ConcurrentHashMap<Integer, Meter>(meterNamesByStatusCode
                .size());
        for (Entry<Integer, String> entry : meterNamesByStatusCode.entrySet()) {
            metersByStatusCode.put(entry.getKey(),
                    metricsRegistry.meter(name(WebappMetricsFilter.class, entry.getValue())));
        }
        this.otherMeter = metricsRegistry.meter(name(WebappMetricsFilter.class,
                                                     otherMetricName));
        this.activeRequests = metricsRegistry.counter(name(WebappMetricsFilter.class,
                                                           "activeRequests"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.