Package com.tagtraum.perf.gcviewer.model

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


                        + "\n  [Eden: 4096.0K(532.0M)->0.0B(612.0M) Survivors: 80.0M->0.0B Heap: 5811.9M(12.0G)->3097.8M(12.0G)], [Metaspace: 95902K->95450K(1140736K)]"
                        + "\n [Times: user=12.34 sys=0.22, real=8.99 secs]")
                        .getBytes());
       
        DataReader reader = new DataReaderSun1_6_0G1(in, GcLogType.SUN1_8);
        GCModel model = reader.read();

        GCEvent event = (GCEvent) model.get(0);
        assertThat("footprint", event.getTotal(), is(12*1024*1024));
        assertThat("yound before", event.getYoung().getPreUsed(), is(4096 + 80*1024));
        assertThat("tenured", event.getTenured().getTotal(), is(12*1024*1024 - 612*1024));
        assertThat("metaspace", event.getPerm().getTotal(), is(1140736));
       
        assertThat("perm", model.getPermAllocatedSizes().getN(), is(1));
       
        assertThat("warning count", handler.getCount(), is(0));
    }
View Full Code Here


        handler.setLevel(Level.WARNING);
        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        DataReader reader = getDataReader("SampleSun1_8_0G1PrintGCCausePrintTenuringDistribution.txt");
        GCModel model = reader.read();
       
        assertEquals("gc pause sum", 16.7578613, model.getPause().getSum(), 0.000000001);
       
        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here

        handler.setLevel(Level.WARNING);
        IMP_LOGGER.addHandler(handler);
        DATA_READER_FACTORY_LOGGER.addHandler(handler);
       
        DataReader reader = getDataReader("SampleSun1_8_0G1PrintHeapAtGc.txt");
        GCModel model = reader.read();
       
        assertEquals("gc pause sum", 0.0055924, model.getPause().getSum(), 0.000000001);
       
        assertEquals("number of errors", 0, handler.getCount());
    }
View Full Code Here

        try (InputStream in = getInputStreamOpenJdk(sampleGz)) {
       
          final DataReader reader = new DataReaderFactory().getDataReader(in);
          assertDataReader("getDataReader() reading " + sampleGz, DataReaderSun1_6_0.class, reader.getClass());
         
          GCModel model = reader.read();
          assertEquals("# events", 2, model.size());
        }
    }
View Full Code Here

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

        InputStream in = getInputStream("SampleJRockit1_5_12_gcpriopausetime.txt");
        DataReader reader = new DataReaderJRockit1_5_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 10, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 6.290, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 3128161, event.getPreUsed());
        assertEquals("after", 296406, event.getPostUsed());
        assertEquals("total", 3145728, event.getTotal());
View Full Code Here

   
    @Test
    public void testGcPrioThroughput() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_5_12_gcpriothroughput.txt");
        DataReader reader = new DataReaderJRockit1_5_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 8, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 4.817, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 1641728, event.getPreUsed());
        assertEquals("after", 148365, event.getPostUsed());
        assertEquals("total", 3145728, event.getTotal());
View Full Code Here

   
    @Test
    public void testGenCon() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_5_12_gencon.txt");
        DataReader reader = new DataReaderJRockit1_5_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 8, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 6.038, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 3089328, event.getPreUsed());
        assertEquals("after", 352551, event.getPostUsed());
        assertEquals("total", 3145728, event.getTotal());
View Full Code Here

        // allthough this log file was written with JRockit 1.5 VM, it has the same structure
        // as a JRockit 1.6 gc log file.
        // TODO refactor JRockit DataReader
        InputStream in = getInputStream("SampleJRockit1_5_20_memstats2.txt");
        DataReader reader = new DataReaderJRockit1_6_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 11, model.size());
    }
View Full Code Here

   
    @Test
    public void testGenPar() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_5_12_genpar.txt");
        DataReader reader = new DataReaderJRockit1_5_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 17, model.size());

        // 2 types of events excpected: "GC" and "parallel nursery GC"
        Map<String, DoubleData> gcEventPauses = model.getGcEventPauses();
        assertEquals("2 types of events found", 2, gcEventPauses.entrySet().size());
    }
View Full Code Here

   
    @Test
    public void testSimpleOpts() throws Exception {
        InputStream in = getInputStream("SampleJRockit1_5_12-gcreport-simpleopts-singlecon.txt");
        DataReader reader = new DataReaderJRockit1_5_0(in);
        GCModel model = reader.read();
       
        assertEquals("count", 5, model.size());
       
        GCEvent event = (GCEvent) model.get(0);
        assertEquals("timestamp", 6.771, event.getTimestamp(), 0.000001);
        assertEquals("name", Type.JROCKIT_GC.getName(), event.getExtendedType().getName());
        assertEquals("before", 3145728, event.getPreUsed());
        assertEquals("after", 296406, event.getPostUsed());
        assertEquals("total", 3145728, event.getTotal());
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.