Package com.yammer.metrics.util

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


                    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

                    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

                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

                    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

        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

                    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

                    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

                    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

                return cache.capacity();
            }
        });
        hits = Metrics.newMeter(new MetricName(GROUP_NAME, TYPE_NAME, "Hits", type), "hits", TimeUnit.SECONDS);
        requests = Metrics.newMeter(new MetricName(GROUP_NAME, TYPE_NAME, "Requests", type), "requests", TimeUnit.SECONDS);
        hitRate = Metrics.newGauge(new MetricName(GROUP_NAME, TYPE_NAME, "HitRate", type), new RatioGauge()
        {
            protected double getNumerator()
            {
                return hits.count();
            }
View Full Code Here

TOP

Related Classes of com.yammer.metrics.util.RatioGauge

Copyright © 2018 www.massapicom. 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.