Package com.insightfullogic.honest_profiler.core.parser

Examples of com.insightfullogic.honest_profiler.core.parser.StackFrame


        int threadId = 0;
        collector.handle(new TraceStart(2, ++threadId));

        assertTrue("nothing to profile still", found.isEmpty());

        collector.handle(new StackFrame(LINE, 0));
        collector.handle(new StackFrame(LINE, 1));
        // ..and one unexpected frame
        collector.handle(new StackFrame(LINE, 2));

        // normal method afterwards
        collector.handle(new TraceStart(2, ++threadId));
        collector.handle(new StackFrame(LINE, 6));
        collector.handle(new StackFrame(LINE, 7));

        // and continuation
        collector.handle(new TraceStart(20, ++threadId));

        assertArrayEquals(new long[] { 2, 7 }, idOfLastMethodInEachThread(found.getLast()));
View Full Code Here


    private final LogCollector collector = new LogCollector(listener, false);

    @Test
    public void rendersSingleNode() {
        collector.handle(new TraceStart(1, 1));
        collector.handle(new StackFrame(20, ProfileFixtures.printlnId));
        collector.handle(ProfileFixtures.println);
        collector.endOfLog();

        ProfileNode node = assertProfileHasSingleTree();
        assertEquals(0L, node.children().count());
View Full Code Here

        printlnCallingPrintf(threadId);
    }

    private void printlnCallingPrintf(final int threadId) {
        collector.handle(new TraceStart(2, threadId));
        collector.handle(new StackFrame(20, ProfileFixtures.printfId));
        collector.handle(ProfileFixtures.printf);
        collector.handle(new StackFrame(20, ProfileFixtures.printlnId));
    }
View Full Code Here

        collector.handle(new StackFrame(20, ProfileFixtures.printlnId));
    }

    private void printlnCallingAppend(int threadId) {
        collector.handle(new TraceStart(2, threadId));
        collector.handle(new StackFrame(20, ProfileFixtures.appendId));
        collector.handle(ProfileFixtures.append);
        collector.handle(new StackFrame(20, ProfileFixtures.printlnId));
        collector.handle(ProfileFixtures.println);
    }
View Full Code Here

    private final LogCollector collector = new LogCollector(listener, false);

    @Test
    public void looksUpMethodNames() {
        collector.handle(new TraceStart(1, 1));
        collector.handle(new StackFrame(20, 5));
        collector.handle(ProfileFixtures.println);
        collector.endOfLog();

        Profile profile = listener.getProfile();
        assertEquals(1, profile.getTraceCount());
View Full Code Here

    @Test
    public void calculateMajorityFlatProfiles() {
        TraceStart startTrace = new TraceStart(1, 1);
        collector.handle(startTrace);
        collector.handle(new StackFrame(20, 5));
        collector.handle(ProfileFixtures.println);
        collector.handle(startTrace);
        collector.handle(new StackFrame(20, 5));
        collector.handle(startTrace);
        collector.handle(new StackFrame(25, 6));
        collector.handle(ProfileFixtures.append);
        collector.endOfLog();

        Profile profile = listener.getProfile();
        assertEquals(3, profile.getTraceCount());
View Full Code Here

TOP

Related Classes of com.insightfullogic.honest_profiler.core.parser.StackFrame

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.