Examples of MinMaxAvgProbe


Examples of de.javakaffee.web.msm.Statistics.MinMaxAvgProbe

        assertEquals( cut.getRequestsWithBackupFailure(), 0 );
    }

    @Test
    public void testMinMaxAvgProbe() {
        final MinMaxAvgProbe cut = new MinMaxAvgProbe();
        assertValues( cut, 0, 0, 0, 0 );

        cut.register( 1 );
        assertValues( cut, 1, 1, 1, 1 );

        cut.register( 1 );
        assertValues( cut, 2, 1, 1, 1 );

        cut.register( 4 );
        assertValues( cut, 3, 1, 4, 2 );

        cut.register( 0 );
        assertValues( cut, 4, 0, 4, 1.5 );
    }
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.