You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2014/04/17 23:17:21 UTC

svn commit: r1588374 - /uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java

Author: schor
Date: Thu Apr 17 21:17:20 2014
New Revision: 1588374

URL: http://svn.apache.org/r1588374
Log:
no Jira - add commented out test case code for measuring heap use in growing the cas test.  Only useful when comparing against previous runs.  Is highly variable depending on the JVM.

Modified:
    uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java

Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java?rev=1588374&r1=1588373&r2=1588374&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/GrowingTheCasTest.java Thu Apr 17 21:17:20 2014
@@ -140,6 +140,24 @@ public class GrowingTheCasTest extends T
       e.printStackTrace();
       assertTrue(false);
     }
+//    try {  // uncomment for memory use profiling
+//      Thread.sleep(10000000);
+//    } catch (InterruptedException e) {
+//      // TODO Auto-generated catch block
+//      e.printStackTrace();
+//    }  // debug
+//    Runtime r = Runtime.getRuntime();
+//    System.out.format("Size of 2 heaps: %,d%n", r.totalMemory() - r.freeMemory());
+//    System.gc();
+//    System.gc();
+//    System.out.format("Size of 2 heaps: %,d after 2 gcs%n", r.totalMemory() - r.freeMemory());
+//    
+//    smallHeapCas = null;
+//    jcas = null;
+//    System.out.format("Size of 0 heaps: %,d%n", r.totalMemory() - r.freeMemory());
+//    System.gc();
+//    System.gc();
+//    System.out.format("Size of 0 heaps: %,d after 2 gcs%n", r.totalMemory() - r.freeMemory());   
   }
 
   public static void main(String[] args) {