All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.firefly.net.tcp.flex.metric.FlexMetric Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.net.tcp.flex.metric;

import com.codahale.metrics.Counter;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;

/**
 * @author Pengtao Qiu
 */
public class FlexMetric {

    private final Counter activeStreamCount;
    private final Meter requestMeter;

    public FlexMetric(MetricRegistry metrics, String prefix) {
        activeStreamCount = metrics.counter(prefix + ".activeStreamCount");
        requestMeter = metrics.meter(prefix + ".requestMeter");
    }

    public Counter getActiveStreamCount() {
        return activeStreamCount;
    }

    public Meter getRequestMeter() {
        return requestMeter;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy