Package com.tagtraum.perf.gcviewer.model

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


    @Test
    public void testParseTsGCReportParallel() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_4_2ts-gcreport-parallel.txt");
        DataReader reader = new DataReaderJRockit1_4_2(in);
        GCModel model = reader.read();
       
        assertEquals("count", 31, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 20.547, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 32768, event.getPreUsed());
        assertEquals("after", 5552, event.getPostUsed());
        assertEquals("total", 32768, event.getTotal());
View Full Code Here


        InputStream in = getInputStream("SampleJRockit1_4_2ts-gcreport-gcpriopausetime.txt");
        DataReader reader = new DataReaderFactory().getDataReader(in);
       
        assertTrue("should be DataReaderJRockit1_4_2 (but was " + reader.toString() + ")", reader instanceof DataReaderJRockit1_4_2);

        GCModel model = reader.read();
       
        assertEquals("count", 64, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 18.785, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 32260, event.getPreUsed());
        assertEquals("after", 4028, event.getPostUsed());
        assertEquals("total", 32768, event.getTotal());
View Full Code Here

    @Test
    public void testParseTsGCReportPrioThroughput() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_4_2ts-gcreport-gcpriothroughput.txt");
        DataReader reader = new DataReaderJRockit1_4_2(in);
        GCModel model = reader.read();
       
        assertEquals("count", 70, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 20.021, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 32768, event.getPreUsed());
        assertEquals("after", 5561, event.getPostUsed());
        assertEquals("total", 32768, event.getTotal());
View Full Code Here

    @Test
    public void testParseTsGCReportSinglecon() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_4_2ts-gcreport-singlecon.txt");
        DataReader reader = new DataReaderJRockit1_4_2(in);
        GCModel model = reader.read();
       
        assertEquals("count", 41, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 18.906, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 32260, event.getPreUsed());
        assertEquals("after", 3997, event.getPostUsed());
        assertEquals("total", 32768, event.getTotal());
View Full Code Here

      IMP_LOGGER.addHandler(handler);
      DATA_READER_FACTORY_LOGGER.addHandler(handler);
     
        InputStream in = getInputStream("SampleSun1_6_0G1_gc_verbose.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();
       
        assertEquals("gc pause sum", 62.616796, model.getPause().getSum(), 0.000000001);
        assertEquals("throughput", 47.7730602904, model.getThroughput(), 0.000000001);
        assertEquals("longest pause", 0.1581177, model.getPause().getMax(), 0.000001);
        assertEquals("total runtime", 119.8936724, model.getRunningTime(), 0.000001);
       
        assertEquals("number of errors", 0, handler.getCount());
       
        assertEquals("max interval", 0.211, model.getPauseInterval().getMax(), 0.000001);
        assertEquals("avg interval", 0.048291297, model.getPauseInterval().average(), 0.0000001);
       
        assertThat("count footprint after full gc", model.getFootprintAfterFullGC().getN(), is(5));
        assertThat("max footprint after full gc", model.getFootprintAfterFullGC().getMax(), is(33*1024));
       
        assertThat("tenured: count after concurrent sizes", model.getPostConcurrentCycleTenuredUsedSizes().getN(), is(242));
        assertThat("tenured: max size after concurrent", model.getPostConcurrentCycleTenuredUsedSizes().getMax(), is(152576));
       
        assertThat("count after concurrent sizes", model.getPostConcurrentCycleHeapUsedSizes().getN(), is(242));
        assertThat("max size after concurrent", model.getPostConcurrentCycleHeapUsedSizes().getMax(), is(152576));
    }
View Full Code Here

        InputStream in = new ByteArrayInputStream(
                ("2012-02-29T13:41:00.721+0100: 0.163: [GC pause (young) 4096K->3936K(16M), 0.0032067 secs]")
                .getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("count", 1, model.size());
        assertEquals("gc pause", 0.0032067, model.getGCPause().getMax(), 0.000001);
        assertEquals("datestamp",
                dateParser.parse("2012-02-29T13:41:00.721+0100"),
                model.getGCEvents().next().getDatestamp());
    }
View Full Code Here

      InputStream in = new ByteArrayInputStream(
        ("9.978: [Full GC (System.gc()) 597M->1142K(7168K), 0.1604955 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.1604955, model.getFullGCPause().getMax(), 0.000001);

    }
View Full Code Here

                ("0.388: [GC pause (young) (initial-mark) 10080K->10080K(16M)0.390: [GC concurrent-mark-start]" +
                    "\n, 0.0013065 secs]")
                .getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("count", 2, model.size());
        assertEquals("gc pause", 0.0013065, model.getGCPause().getMax(), 0.000001);
    }
View Full Code Here

                ("61.059: [GC pause (young) (initial-mark) 135M->127M(256M)61.078: , 0.0187031 secs]" +
                        "\n[GC concurrent-mark-start]")
                .getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();

        assertEquals("count", 2, model.size());
        assertEquals("concurrent event type", Type.G1_CONCURRENT_MARK_START.toString(), model.getConcurrentGCEvents().next().getTypeAsString());
        assertEquals("gc pause", 0.0187031, model.getGCPause().getMax(), 0.000001);
    }
View Full Code Here

    @Test
    public void testDetailedYoungCollection() throws Exception {
        // parse one detailed event
        InputStream in = getInputStream("SampleSun1_6_0G1_Detailed-young.txt");
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_6G1);
        GCModel model = reader.read();
       
        assertEquals("number of pauses", 1, model.getPause().getN());
        assertEquals("gc pause sum", 0.00594747, model.getPause().getSum(), 0.000000001);
        assertEquals("gc memory", 4096 - 3936, model.getFreedMemoryByGC().getMax());
    }
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.