Package com.tagtraum.perf.gcviewer.model

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


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

        final InputStream in = getInputStream(fileName);
        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(type.toString()));
        assertThat("gc pause", event.getPause(), equalTo(0.1156890));
        assertThat("error count", handler.getCount(), is(0));
    }
View Full Code Here


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

        InputStream in = getInputStream("SampleSun1_7_0_51_G1_PrintApplicationTimeTenuringDistribution.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_7);
        GCModel model = reader.read();

        assertThat("GC count", model.size(), is(3));
       
        // standard event
        assertThat("type name (0)", model.get(0).getTypeAsString(), equalTo("GC pause (young)"));
        assertThat("GC pause (0)", model.get(0).getPause(), closeTo(0.0007112, 0.00000001));
       
        // "application stopped" (as overhead added to previous event)
        assertThat("type name (1)", model.get(1).getTypeAsString(), equalTo("Total time for which application threads were stopped"));
        assertThat("GC pause (1)", model.get(1).getPause(), closeTo(0.0008648 - 0.0007112, 0.00000001));
       
        // standalone "application stopped", without immediate GC event before
        assertThat("type name (2)", model.get(2).getTypeAsString(), equalTo("Total time for which application threads were stopped"));
        assertThat("GC pause (2)", model.get(2).getPause(), closeTo(0.0000694, 0.00000001));
       
        assertThat("total pause", model.getPause().getSum(), closeTo(0.0009342, 0.00000001));
        assertThat("throughput", model.getThroughput(), closeTo(99.88663576, 0.000001));
       
        assertThat("number of parse problems", handler.getCount(), is(0));
    }
View Full Code Here

                ("2014-08-03T13:33:50.932+0200: 0.992: [Full GC0.995: [SoftReference, 34 refs, 0.0000090 secs]0.995: [WeakReference, 0 refs, 0.0000016 secs]0.996: [FinalReference, 4 refs, 0.0000020 secs]0.996: [PhantomReference, 0 refs, 0.0000012 secs]0.996: [JNI Weak Reference, 0.0000016 secs] 128M->63M(128M), 0.0434091 secs]"
                        + "\n [Times: user=0.03 sys=0.00, real=0.03 secs] ")
                .getBytes());

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

        assertThat("gc pause", model.getFullGCPause().getMax(), closeTo(0.0434091, 0.000000001));
        GCEvent heap = (GCEvent) model.getEvents().next();
        assertThat("heap", heap.getTotal(), is(128*1024));

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

    @Test
    public void testParse1() throws Exception {
        InputStream in = UnittestHelper.getResourceAsStream(UnittestHelper.FOLDER_IBM, "SampleIBM1_3_1.txt");
        DataReader reader = new DataReaderIBM1_3_1(in);
        GCModel model = reader.read();
       
        assertEquals("number of events", 21, model.size());
    }
View Full Code Here

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

        InputStream in = getInputStream("SampleJRockit1_6_gc_mode_singleparcon.txt");
        DataReader reader = new DataReaderJRockit1_6_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 42, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 24.930, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_16_OLD_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 464309, event.getPreUsed());
        assertEquals("after", 282831, event.getPostUsed());
        assertEquals("total", 524288, event.getTotal());
View Full Code Here

        InputStream in = getInputStream("SampleJRockit1_6_verbose_gc_mode_singleparcon.txt");
        DataReader reader = new DataReaderJRockit1_6_0(in);
       
        assertTrue("should be DataReaderJRockit1_6_0 (but was " + reader.toString() + ")", reader instanceof DataReaderJRockit1_6_0);

        GCModel model = reader.read();
       
        assertEquals("count", 52, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 26.242, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_16_OLD_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 270909, event.getPreUsed());
        assertEquals("after", 210916, event.getPostUsed());
        assertEquals("total", 524288, event.getTotal());
View Full Code Here

     */
    @Test
    public void testGenConVerbose() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_6_verbose_gc_mode_gencon.txt");
        DataReader reader = new DataReaderJRockit1_6_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 15, model.size());
    }
View Full Code Here

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

        InputStream in = getInputStream("SampleJRockit1_6_33_gc_mode_genpar_verbosenursery.txt");
        DataReader reader = new DataReaderJRockit1_6_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 3, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 124.644, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_16_YOUNG_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 453996, event.getPreUsed());
        assertEquals("after", 188846, event.getPostUsed());
        assertEquals("total", 786432, event.getTotal());
        assertEquals("pause", 0.055369, event.getPause(), 0.0000001);
       
        // generational algorithms have information about the generation sizing in the introduction of the gc log
        // -> check that it is present in the event
        event = event.getYoung();
        assertEquals("total", 393216, event.getTotal());

        event = (GCEvent) model.get(2);
        assertEquals("timestamp", 148.254, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_16_OLD_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 691255, event.getPreUsed());
        assertEquals("after", 279876, event.getPostUsed());
        assertEquals("total", 786432, event.getTotal());
View Full Code Here

        final ByteArrayInputStream in = new ByteArrayInputStream(
                ("[INFO ][memory ] [YC#1] 9.743-9.793: YC 294974KB->122557KB (524288KB), 0.050 s, sum of pauses 49.692 ms, longest pause 49.692 ms.")
                        .getBytes());
       
        DataReader reader = new DataReaderJRockit1_6_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 1, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 9.743, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_16_YOUNG_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 294974, event.getPreUsed());
        assertEquals("after", 122557, event.getPostUsed());
        assertEquals("total", 524288, event.getTotal());
View Full Code Here

        handler.setLevel(Level.WARNING);
        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);

        DataReader reader = getDataReader("SampleSun1_8_0G1_ConcurrentCycle.txt");
        GCModel model = reader.read();
       
        assertThat("size", model.size(), is(10));
       
        assertThat("tenured size after concurrent cycle", model.getPostConcurrentCycleTenuredUsedSizes().getMax(), is(31949 - 10*1024 - 3072));
        assertThat("heap size after concurrent cycle", model.getPostConcurrentCycleHeapUsedSizes().getMax(), is(31949));
       
        assertThat("initiatingOccupancyFraction", model.getCmsInitiatingOccupancyFraction().getMax(), closeTo(0.69, 0.001));
       
        assertThat("number of errors", handler.getCount(), is(0));
    }
View Full Code Here

TOP

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

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.