Package com.tagtraum.perf.gcviewer.model

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


    @Test
    public void testGcMemoryPausePattern() throws Exception {
        InputStream in = new ByteArrayInputStream(("0.360: [GC cleanup 19M->19M(36M), 0.0007889 secs]").getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
        assertEquals("full gc pause", 0, model.getFullGCPause().getN());
        assertEquals("gc pause", 0.0007889, model.getGCPause().getMax(), 0.0000001);
        assertEquals("memory", 0, model.getFreedMemoryByGC().getMax());
    }
View Full Code Here


        InputStream in = new ByteArrayInputStream(
                ("0.319: [GC pause (young) (initial-mark), 0.00188271 secs]" +
                        "\n [Times: user=0.00 sys=0.00, real=0.00 secs] ").getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
        assertEquals("full gc pause", 0, model.getFullGCPause().getN());
        assertEquals("gc pause", 0.00188271, model.getGCPause().getMax(), 0.0000001);
        assertEquals("memory", 0, model.getFreedMemoryByGC().getMax());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        InputStream in = getInputStream("SampleSun1_6_0G1InitialMarkMixed.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertThat("GC count", model.size(), is(2));
        assertThat("GC pause", model.getGCPause().getSum(), closeTo(0.03643900, 0.000000001));
        assertThat("heap size", model.getHeapAllocatedSizes().getMax(), is(10240 * 1024));
        assertThat("number of errors", handler.getCount(), is(0));
       
        assertThat("concurrent type name",
                model.getConcurrentGCEvents().next().getTypeAsString(),
                equalTo("GC concurrent-mark-start"));
    }
View Full Code Here

        InputStream in = new ByteArrayInputStream(
                ("0.334: [GC remark, 0.0009506 secs]" +
                        "\n [Times: user=0.00 sys=0.00, real=0.00 secs] ").getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
        assertEquals("full gc pause", 0, model.getFullGCPause().getN());
        assertEquals("gc pause", 0.0009506, model.getGCPause().getMax(), 0.0000001);
        assertEquals("memory", 0, model.getFreedMemoryByGC().getMax());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        InputStream in = getInputStream("SampleSun1_6_0G1_PrintHeapAtGC.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("GC count", 2, model.size());
        assertEquals("GC pause", 0.00582962 + 0.00228253, model.getGCPause().getSum(), 0.000000001);
        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        InputStream in = getInputStream("SampleSun1_6_0G1_MarkStackFull.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("GC count", 1, model.size());
        assertEquals("GC pause", 0.08032150, model.getGCPause().getSum(), 0.000000001);
        assertEquals("heap size", 3985 * 1024, model.getHeapAllocatedSizes().getMax());
        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here

        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        InputStream in = getInputStream("SampleSun1_6_0G1FullGcTenuringDistribution.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertThat("GC count", model.size(), is(1));
        assertThat("GC pause", model.getFullGCPause().getSum(), closeTo(37.0629320, 0.000000001));
        assertThat("heap size", model.getHeapAllocatedSizes().getMax(), is(10240 * 1024));
        assertThat("number of errors", handler.getCount(), is(0));
    }
View Full Code Here

        AbstractGCEvent<GCEvent> event2 = new GCEvent(1, 8968, 8230, 10912, 0.0037192d, AbstractGCEvent.Type.GC);
        AbstractGCEvent<GCEvent> event3 = new GCEvent(2, 8968, 8230, 10912, 0.0037192d, AbstractGCEvent.Type.GC);
        AbstractGCEvent<GCEvent> event4 = new GCEvent(3, 10753, 6046, 10912, 0.3146707d, AbstractGCEvent.Type.FULL_GC);
        ByteArrayInputStream in = new ByteArrayInputStream("[GC 8968K->8230K(10912K), 0.0037192 secs]\r\n[GC 8968K->8230K(10[GC 8968K->8230K(10912K), 0.0037192 secs]912K), 0.0037192 secs]\r\n[Full GC 10753K->6046K(10912K), 0.3146707 secs]".getBytes());
        DataReader reader = new DataReaderSun1_3_1(in, GcLogType.SUN1_3_1);
        GCModel model = reader.read();
        assertTrue(model.size() == 4);
        Iterator<AbstractGCEvent<?>> i = model.getStopTheWorldEvents();
        AbstractGCEvent<?> event = i.next();
        assertEquals(event, event1);
        event = i.next();
        assertEquals(event, event2);
        event = i.next();
        assertEquals(event, event3);
        event = i.next();
        assertEquals(event, event4);

        assertEquals("throughput", 90.17011554119, model.getThroughput(), 0.00000001);
    }
View Full Code Here

   
    @Test
    public void afTenuredGlobal() throws Exception {
        final InputStream in = getInputStream("SampleIBMJ9_5_0af-global-200811_07.txt");
        final DataReader reader = new DataReaderIBM_J9_5_0(in);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("pause", 0.035912, event.getPause(), 0.0000001);

        assertEquals("timestamp", 0, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.FULL_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", (52428800 - 2621440) / 1024, event.getPreUsed());
View Full Code Here

   
    @Test
    public void afTenuredGlobal_20090417_AA() throws Exception {
        final InputStream in = getInputStream("SampleIBMJ9_5_0af-global-20090417_AA.txt");
        final DataReader reader = new DataReaderIBM_J9_5_0(in);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("pause", 0.837024, event.getPause(), 0.0000001);

        assertEquals("timestamp", 0, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.FULL_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", (12884901888L - 4626919608L) / 1024, event.getPreUsed());
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.