Package com.volantis.cache.impl.stats

Examples of com.volantis.cache.impl.stats.StatisticsSnapshotImpl


                new CacheMock("otherCacheMock", expectations);

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        StatisticsSnapshot snapshot1 = new StatisticsSnapshotImpl(cacheMock,
                Period.inMilliSeconds(1000L),
                Time.inMilliSeconds(10L), 100, 10, 70);
        StatisticsSnapshot snapshot2 = new StatisticsSnapshotImpl(
                otherCacheMock,
                Period.inMilliSeconds(2000L),
                Time.inMilliSeconds(1010L),
                200, 20, 90);
View Full Code Here


    public void testDetectsOtherYounger() throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        StatisticsSnapshot snapshot1 = new StatisticsSnapshotImpl(cacheMock,
                Period.inMilliSeconds(1000L),
                Time.inMilliSeconds(10L),
                100, 10, 70);
        StatisticsSnapshot snapshot2 = new StatisticsSnapshotImpl(cacheMock,
                Period.inMilliSeconds(2000L),
                Time.inMilliSeconds(1010L),
                200, 20, 90);

        try {
View Full Code Here

    public void testDifference() throws Exception {

        // =====================================================================
        //   Test Expectations
        // =====================================================================
        StatisticsSnapshot snapshot1 = new StatisticsSnapshotImpl(cacheMock,
                Period.inMilliSeconds(1000L),
                Time.inMilliSeconds(10L),
                100, 10, 70);
        StatisticsSnapshot snapshot2 = new StatisticsSnapshotImpl(cacheMock,
                Period.inMilliSeconds(2000L),
                Time.inMilliSeconds(1010L),
                220, 24, 100);

        StatisticsDelta delta = snapshot2.difference(snapshot1);
        assertEquals(Period.inMilliSeconds(1000L), delta.getPeriod());
        assertEquals(120, delta.getHitCount());
        assertEquals(14, delta.getMissedAddedCount());
        assertEquals(30, delta.getRemovedCount());
    }
View Full Code Here

TOP

Related Classes of com.volantis.cache.impl.stats.StatisticsSnapshotImpl

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.