Package com.volantis.cache.stats

Examples of com.volantis.cache.stats.StatisticsDelta


        // Validate the internal structure of the cache.
        ensureCacheIntegrity(cache);

        StatisticsSnapshot snapshotAfter = rootGroup.getStatisticsSnapshot();
        StatisticsDelta delta = snapshotAfter.difference(snapshotBefore);
        System.out.println("Period:                 " + delta.getPeriod());
        System.out.println("Hit count:              " + delta.getHitCount());
        System.out.println("Missed / Added count:   " + delta.getMissedAddedCount());
        System.out.println("Removed count:          " + delta.getRemovedCount());
        System.out.println("Change count:           " +
                (delta.getMissedAddedCount() - delta.getRemovedCount()));
        System.out.println("Hit rate:               " + delta.getHitRate() + "%");

        System.out.println("Key count:              " + keys.size());

        cache.debugStructure(new IndentingWriter(System.out));

        // Make sure that the number of entries removed according to the
        // snapshot is equal to the number removed according to the listener.
        int notifiedRemovedCount = listener.getRemovedCount();
        System.out.println("Notified removed count: " + notifiedRemovedCount);
        assertEquals(delta.getRemovedCount(), notifiedRemovedCount);

        if (logger.isDebugEnabled()) {
            StringWriter writer = new StringWriter();
            IndentingWriter printer = new IndentingWriter(writer);
            cache.debugStructure(printer);
View Full Code Here

TOP

Related Classes of com.volantis.cache.stats.StatisticsDelta

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.