Examples of logElapsed()


Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

    @Test
    public void test() throws InterruptedException
    {
        final PerformanceLogger plog = new PerformanceLogger();
        Thread.sleep(1);
        plog.logElapsed();
       
        assertThat(logString(), containsString(TestPerformanceLogger.class.getSimpleName()));
        assertThat(logString(), containsString("test"));
       
        new InnerClass(plog);
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

       
        assertThat(logString(), containsString(TestPerformanceLogger.class.getSimpleName()));
        assertThat(logString(), containsString("test"));
       
        new InnerClass(plog);
        plog.logElapsed("asdf");
       
        assertThat(logString(), containsString("asdf"));
        assertThat(logString(), containsString(InnerClass.class.getSimpleName()));
       
        new Object()
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

                plog.logElapsedAndRestart("obj");
            }
           
            void strangeConstructIndeed()
            {
                plog.logElapsed("strange");
            }
        }.strangeConstructIndeed();
       
        assertThat(logString(), containsString("obj"));
        assertThat(logString(), containsString("strangeConstructIndeed"));
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

        new Runnable()
        {
            @Override
            public void run()
            {
                plog.logElapsed("running away");
            }
        }.run();
       
        assertThat(logString(), containsString("running"));
       
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

        }.run();
       
        assertThat(logString(), containsString("running"));
       
        PerformanceLogger plog2 = new PerformanceLogger(1000);
        plog2.logElapsed("should-never-be-logged");
        assertThat(logString(), not(containsString("should-never-be-logged")));
        Thread.sleep(1500);
        plog2.logElapsed("should-be-logged");
        assertThat(logString(), containsString("should-be-logged"));
       
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

       
        PerformanceLogger plog2 = new PerformanceLogger(1000);
        plog2.logElapsed("should-never-be-logged");
        assertThat(logString(), not(containsString("should-never-be-logged")));
        Thread.sleep(1500);
        plog2.logElapsed("should-be-logged");
        assertThat(logString(), containsString("should-be-logged"));
       
        Logger logbackLogger = (Logger) LoggerFactory.getLogger(PerformanceLogger.class);
        logbackLogger.setLevel(Level.ERROR);
        plog.logElapsedAndRestart("do-not-log-me");
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

        {
            void doStuff() throws InterruptedException
            {
                PerformanceLogger plog = new PerformanceLogger();
                Thread.sleep(5);
                plog.logElapsed("done, bastards");
            }
        }
       
       
        InnerClass(final PerformanceLogger plog) throws InterruptedException
View Full Code Here

Examples of at.ipsquare.commons.core.util.PerformanceLogger.logElapsed()

            {
                th = e;
            }
            finally
            {
                plog.logElapsed(toLogString(req, res, th));
            }
           
            if(th != null)
            {
                if(th instanceof IOException)
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.