Package com.tagtraum.perf.gcviewer.model

Examples of com.tagtraum.perf.gcviewer.model.GCModel$FileInformation


        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        final InputStream in = getInputStream("SampleSun1_7_0G1TenuringDistribution.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertEquals("number of events", 11, model.size());
        assertEquals("number of concurrent events", 4, model.getConcurrentEventPauses().size());
       
        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here


        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        final InputStream in = getInputStream("SampleSun1_7_0_02PrintApplicationTimeTenuringDistribution.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertEquals("number of events", 9, model.size());
        assertEquals("number of concurrent events", 2, model.getConcurrentEventPauses().size());
       
        GCEvent youngEvent = (GCEvent) model.get(0);
        assertEquals("gc pause (young)", 0.00784501, youngEvent.getPause(), 0.000000001);
        assertEquals("heap (young)", 20 * 1024, youngEvent.getTotal());

        GCEvent partialEvent = (GCEvent) model.get(7);
        assertEquals("gc pause (partial)", 0.02648319, partialEvent.getPause(), 0.000000001);
        assertEquals("heap (partial)", 128 * 1024, partialEvent.getTotal());

        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here

                        + "\n2013-06-22T18:58:45.986+0200: 1.472: [GC concurrent-mark-abort]"
                        + "\n2013-06-22T18:58:46.002+0200: 1.483: [GC pause (young) 91M->90M(128M), 0.0128787 secs]")
                .getBytes());
       
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();

        assertEquals("count", 4, model.size());
       
        // the order of the events is in fact wrong; but for the sake of simplicity in the parser I accept it
        assertEquals("cleanup event", "GC cleanup", model.get(2).getTypeAsString());
        assertEquals("concurrent-mark-abort event", "GC concurrent-mark-abort", model.get(1).getTypeAsString());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        final InputStream in = getInputStream("SampleSun1_7_0G1_PrintHeapAtGC_withConcurrent.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertEquals("number of events", 3, model.size());
        assertEquals("number of concurrent events", 2, model.getConcurrentEventPauses().size());
       
        ConcurrentGCEvent concurrentEvent = (ConcurrentGCEvent) model.get(0);
        assertEquals("GC concurrent-root-region-scan-end expected", "GC concurrent-root-region-scan-end", concurrentEvent.getTypeAsString());

        concurrentEvent = (ConcurrentGCEvent) model.get(1);
        assertEquals("GC concurrent-mark-start expected", "GC concurrent-mark-start", concurrentEvent.getTypeAsString());

        GCEvent fullGcEvent = (GCEvent) model.get(2);
        assertEquals("full gc", "Full GC", fullGcEvent.getTypeAsString());

        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);

        final InputStream in = getInputStream("SampleSun1_7_0_40PrintHeapAtGC.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("type name", "GC pause (G1 Evacuation Pause) (young)", event.getTypeAsString());
        assertEquals("gc pause", 0.0147015, model.getPause().getMax(), 0.000000001);
        assertEquals("error count", 0, handler.getCount());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);

        final InputStream in = getInputStream("SampleSun1_7_0G1AdaptiveSize_Reference.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertThat("count", model.size(), is(3));
        GCEvent event = (GCEvent) model.get(0);
        assertThat("type name", event.getTypeAsString(), equalTo("GC pause (G1 Evacuation Pause) (young)"));
        assertThat("gc pause", event.getPause(), closeTo(0.0107924, 0.00000001));
       
        GCEvent event2 = (GCEvent) model.get(1);
        assertThat("type name 2", event2.getTypeAsString(), equalTo("GC pause (young)"));
        assertThat("gc pause 2", event2.getPause(), closeTo(0.0130642, 0.00000001));
       
        GCEvent event3 = (GCEvent) model.get(2);
        assertThat("type name 3", event3.getTypeAsString(), equalTo("GC remark; GC ref-proc"));
        assertThat("gc pause 3", event3.getPause(), closeTo(0.0013608, 0.00000001));

        assertThat("error count", handler.getCount(), is(0));
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);

        final InputStream in = getInputStream("SampleSun1_7_0G1PrintReferencePolicy.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertThat("count", model.size(), is(1));
        GCEvent event = (GCEvent) model.get(0);
        assertThat("type name", event.getTypeAsString(), equalTo("GC pause (young)"));
        assertThat("gc pause", event.getPause(), closeTo(0.0049738, 0.00000001));
        assertThat("error count", handler.getCount(), is(0));
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);

        final InputStream in = getInputStream("SampleSun1_7_0G1_DetailsWoTimestamp.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertThat("count", model.size(), is(1));
        GCEvent event = (GCEvent) model.get(0);
        assertThat("type name", event.getTypeAsString(), equalTo("GC pause (young)"));
        assertThat("gc pause", event.getPause(), closeTo(0.0055310, 0.00000001));
        assertThat("error count", handler.getCount(), is(0));
    }
View Full Code Here

        final InputStream in = new ByteArrayInputStream(
                ("2013-12-21T15:48:44.062+0100: 0.441: [GC pause (G1 Evacuation Pause) (young)-- 90M->94M(128M), 0.0245257 secs]")
                .getBytes());

        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
        assertEquals("gc pause", 0.0245257, model.getGCPause().getMax(), 0.000001);

    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);

        final InputStream in = getInputStream("SampleSun1_7_0G1_PauseWithComma.txt");
        final DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7G1);
        GCModel model = reader.read();
       
        assertThat("count", model.size(), is(1));
        GCEvent event = (GCEvent) model.get(0);
        assertThat("type name", event.getTypeAsString(), equalTo("GC pause (young)"));
        assertThat("gc pause", event.getPause(), closeTo(0.0665670, 0.00000001));
        assertThat("error count", handler.getCount(), is(0));
    }
View Full Code Here

TOP

Related Classes of com.tagtraum.perf.gcviewer.model.GCModel$FileInformation

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.