Пример #1
0
  @Test
  public void testCMSAbortingPrecleanDatestamp() throws Exception {
    ByteArrayInputStream in =
        new ByteArrayInputStream(
            " CMS: abort preclean due to time 2011-10-07T08:10:25.312+0200: 13454.979: [CMS-concurrent-abortable-preclean: 3.849/5.012 secs] [Times: user=5.58 sys=0.08, real=5.01 secs]"
                .getBytes());
    final DataReader reader = new DataReaderSun1_6_0(in, GcLogType.SUN1_6);
    GCModel model = reader.read();

    assertEquals("GC count", 1, model.size());

    assertEquals(
        "gc pause",
        3.849,
        ((ConcurrentGCEvent) model.getConcurrentGCEvents().next()).getPause(),
        0.0001);
  }
Пример #2
0
  @Test
  public void testCMSAbortingPrecleanTimestamp() throws Exception {
    ByteArrayInputStream in =
        new ByteArrayInputStream(
            " CMS: abort preclean due to time 12467.886: [CMS-concurrent-abortable-preclean: 5.300/5.338 secs] [Times: user=10.70 sys=0.13, real=5.34 secs]"
                .getBytes());
    final DataReader reader = new DataReaderSun1_6_0(in, GcLogType.SUN1_6);
    GCModel model = reader.read();

    assertEquals("GC count", 1, model.size());

    assertEquals(
        "gc pause",
        5.3,
        ((ConcurrentGCEvent) model.getConcurrentGCEvents().next()).getPause(),
        0.001);
  }