Examples of toBin()


Examples of org.apache.kafka.common.metrics.stats.Histogram.ConstantBinScheme.toBin()

    }

    @Test
    public void testConstantBinScheme() {
        ConstantBinScheme scheme = new ConstantBinScheme(5, -5, 5);
        assertEquals("A value below the lower bound should map to the first bin", 0, scheme.toBin(-5.01));
        assertEquals("A value above the upper bound should map to the last bin", 4, scheme.toBin(5.01));
        assertEquals("Check boundary of bucket 1", 1, scheme.toBin(-5));
        assertEquals("Check boundary of bucket 4", 4, scheme.toBin(5));
        assertEquals("Check boundary of bucket 3", 3, scheme.toBin(4.9999));
        checkBinningConsistency(new ConstantBinScheme(4, 0, 5));
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Histogram.ConstantBinScheme.toBin()

    @Test
    public void testConstantBinScheme() {
        ConstantBinScheme scheme = new ConstantBinScheme(5, -5, 5);
        assertEquals("A value below the lower bound should map to the first bin", 0, scheme.toBin(-5.01));
        assertEquals("A value above the upper bound should map to the last bin", 4, scheme.toBin(5.01));
        assertEquals("Check boundary of bucket 1", 1, scheme.toBin(-5));
        assertEquals("Check boundary of bucket 4", 4, scheme.toBin(5));
        assertEquals("Check boundary of bucket 3", 3, scheme.toBin(4.9999));
        checkBinningConsistency(new ConstantBinScheme(4, 0, 5));
        checkBinningConsistency(scheme);
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Histogram.ConstantBinScheme.toBin()

    @Test
    public void testConstantBinScheme() {
        ConstantBinScheme scheme = new ConstantBinScheme(5, -5, 5);
        assertEquals("A value below the lower bound should map to the first bin", 0, scheme.toBin(-5.01));
        assertEquals("A value above the upper bound should map to the last bin", 4, scheme.toBin(5.01));
        assertEquals("Check boundary of bucket 1", 1, scheme.toBin(-5));
        assertEquals("Check boundary of bucket 4", 4, scheme.toBin(5));
        assertEquals("Check boundary of bucket 3", 3, scheme.toBin(4.9999));
        checkBinningConsistency(new ConstantBinScheme(4, 0, 5));
        checkBinningConsistency(scheme);
    }
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Histogram.ConstantBinScheme.toBin()

    public void testConstantBinScheme() {
        ConstantBinScheme scheme = new ConstantBinScheme(5, -5, 5);
        assertEquals("A value below the lower bound should map to the first bin", 0, scheme.toBin(-5.01));
        assertEquals("A value above the upper bound should map to the last bin", 4, scheme.toBin(5.01));
        assertEquals("Check boundary of bucket 1", 1, scheme.toBin(-5));
        assertEquals("Check boundary of bucket 4", 4, scheme.toBin(5));
        assertEquals("Check boundary of bucket 3", 3, scheme.toBin(4.9999));
        checkBinningConsistency(new ConstantBinScheme(4, 0, 5));
        checkBinningConsistency(scheme);
    }
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Histogram.ConstantBinScheme.toBin()

        ConstantBinScheme scheme = new ConstantBinScheme(5, -5, 5);
        assertEquals("A value below the lower bound should map to the first bin", 0, scheme.toBin(-5.01));
        assertEquals("A value above the upper bound should map to the last bin", 4, scheme.toBin(5.01));
        assertEquals("Check boundary of bucket 1", 1, scheme.toBin(-5));
        assertEquals("Check boundary of bucket 4", 4, scheme.toBin(5));
        assertEquals("Check boundary of bucket 3", 3, scheme.toBin(4.9999));
        checkBinningConsistency(new ConstantBinScheme(4, 0, 5));
        checkBinningConsistency(scheme);
    }

    @Test
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.