pbwest      2002/11/26 19:04:02

  Modified:    src/org/apache/fop/apps Tag: FOP_0-20-0_Alt-Design Fop.java
  Log:
  Added some instrumentation.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.2   +32 -1     xml-fop/src/org/apache/fop/apps/Fop.java
  
  Index: Fop.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Fop.java,v
  retrieving revision 1.6.2.1
  retrieving revision 1.6.2.2
  diff -u -r1.6.2.1 -r1.6.2.2
  --- Fop.java  7 May 2002 04:51:00 -0000       1.6.2.1
  +++ Fop.java  27 Nov 2002 03:04:02 -0000      1.6.2.2
  @@ -10,16 +10,47 @@
   import org.apache.fop.messaging.MessageHandler;
   
   public class Fop {
  +
  +    public static Runtime runtime;
  +    public static long startTotal;
  +    public static long startFree;
  +    public static long startTime;
  +    public static long startPCi;
  +    public static long endPCi;
  +
       public static void main(String[] args) {
   
  +     long endtotal, endfree, gctotal, gcfree;
           Driver driver;
           Boolean bool = null;
   
  +     runtime = Runtime.getRuntime();
  +     startTotal = runtime.totalMemory();
  +     startFree = runtime.freeMemory();
  +     startTime = System.currentTimeMillis();
  +
           try {
               Options.configure(args);
               driver = new Driver();
               driver.run();
               System.out.println("Back from driver.run()");
  +         System.out.println("Elapsed time: " +
  +                             (System.currentTimeMillis() - startTime));
  +         endtotal = runtime.totalMemory();
  +         System.out.println("Total memory: " + endtotal);
  +         System.out.println("Total diff  : " + (endtotal - startTotal));
  +         endfree = runtime.freeMemory();
  +         System.out.println("Free  memory: " + endfree);
  +         System.out.println("Free  diff  : " + (endfree - startFree ));
  +         System.gc();
  +         gctotal = runtime.totalMemory();
  +         System.out.println("Total memory: " + gctotal);
  +         System.out.println("Total diff  : " + (gctotal - startTotal));
  +         gcfree = runtime.freeMemory();
  +         System.out.println("Free  memory: " + gcfree);
  +         System.out.println("Free  diff  : " + (gcfree - startFree ));
  +         System.out.println("cg() freed  : " + (gcfree - endfree));
  +         System.out.println("PC time     : " + (endPCi - startPCi));
               
           } catch (FOPException e) {
               MessageHandler.errorln("ERROR: " + e.getMessage());
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to