Examples of RatioGauge


Examples of com.codahale.metrics.RatioGauge

import static com.codahale.metrics.MetricRegistry.name;

public class InstrumentedQueuedThreadPool extends QueuedThreadPool {
    public InstrumentedQueuedThreadPool(MetricRegistry registry) {
        super();
        registry.register(name(QueuedThreadPool.class, "percent-idle"), new RatioGauge() {
            @Override
            protected Ratio getRatio() {
                return Ratio.of(getIdleThreads(),
                                getThreads());
            }
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = Metrics.newCounter(factory.createMetricName("SpeculativeRetries"));
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = createColumnFamilyCounter("SpeculativeRetries");
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = Metrics.newCounter(factory.createMetricName("SpeculativeRetries"));
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                for (SSTableReader sst : cfs.getSSTables())
                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = Metrics.newCounter(factory.createMetricName("SpeculativeRetries"));
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

        String serviceName = serviceFactory.getServiceName();
        _metrics = Metrics.forInstance(this, serviceName);
        _loadTimer = _metrics.newTimer(serviceName, "load-time", TimeUnit.MILLISECONDS, TimeUnit.SECONDS);

        _metrics.newGauge(serviceName, "cache-hit-ratio", new RatioGauge() {
            @Override protected double getNumerator() { return _requestCount.get() - _missCount.get(); }
            @Override protected double getDenominator() { return _requestCount.get(); }
        });
        _metrics.newGauge(serviceName, "cache-miss-ratio", new RatioGauge() {
            @Override protected double getNumerator() { return _missCount.get(); }
            @Override protected double getDenominator() { return _requestCount.get(); }
        });

        _metrics.newGauge(serviceName, "load-success-ratio", new RatioGauge() {
            @Override protected double getNumerator() { return _loadSuccessCount.get(); }
            @Override protected double getDenominator() {
                return _loadSuccessCount.get() + _loadFailureCount.get();
            }
        });
        _metrics.newGauge(serviceName, "load-failure-ratio", new RatioGauge() {
            @Override protected double getNumerator() { return _loadFailureCount.get(); }
            @Override protected double getDenominator() {
                return _loadSuccessCount.get() + _loadFailureCount.get();
            }
        });
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = Metrics.newCounter(factory.createMetricName("SpeculativeRetries"));
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = Metrics.newCounter(factory.createMetricName("SpeculativeRetries"));
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
View Full Code Here

Examples of com.yammer.metrics.util.RatioGauge

                    total += sst.getBloomFilterSerializedSize();
                return total;
            }
        });
        speculativeRetries = Metrics.newCounter(factory.createMetricName("SpeculativeRetries"));
        keyCacheHitRate = Metrics.newGauge(factory.createMetricName("KeyCacheHitRate"), new RatioGauge()
        {
            protected double getNumerator()
            {
                long hits = 0L;
                for (SSTableReader sstable : cfs.getSSTables())
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.