Package com.ecyrd.speed4j

Examples of com.ecyrd.speed4j.StopWatchFactory

  • speed4j.properties
  • /speed4j.properties
  • /WEB-INF/speed4j.properties
  • in this order.

           
            pl.setName( "PeriodicalLogTest" );
            pl.setPeriod( 5 );
            pl.setSlf4jLogname( "PeriodicalLogTest" );

            swf = new StopWatchFactory( pl );
        }
    View Full Code Here


    public class StopWatchTest
    {
        @Test
        public void testToStringIterations() throws InterruptedException
        {
            StopWatchFactory swf = StopWatchFactory.getDefault();

            int iterations = 100;

            StopWatch sw = swf.getStopWatch("foo");

            for( int i = 0; i < iterations; i++ )
            {
                Thread.sleep(10+ (long)(Math.random() * 10));
            }
    View Full Code Here

        }

        @Test
        public void testSpeed() throws InterruptedException
        {
            StopWatchFactory swf = StopWatchFactory.getDefault();

            long time = System.currentTimeMillis();
            int iterations = 1200000;

            StopWatch total = swf.getStopWatch();

            for( int i = 0; i < iterations; i++ )
            {
                StopWatch sw = swf.getStopWatch("foo");

                // Do nothing

                sw.stop("iteration:success");
            }
    View Full Code Here

    TOP

    Related Classes of com.ecyrd.speed4j.StopWatchFactory

    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.