avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/profile ProfileReport.java Profiler.java
Date Thu, 13 Dec 2001 20:42:38 GMT
bloritsch    01/12/13 12:42:38

  Modified:    src/scratchpad/org/apache/avalon/excalibur/profile
                        Profiler.java
  Added:       src/scratchpad/org/apache/avalon/excalibur/profile
                        ProfileReport.java
  Log:
  add ProfileReport interface
  
  Revision  Changes    Path
  1.3       +9 -10     jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/profile/Profiler.java
  
  Index: Profiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/profile/Profiler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Profiler.java	2001/12/13 20:37:13	1.2
  +++ Profiler.java	2001/12/13 20:42:37	1.3
  @@ -50,19 +50,18 @@
       void add( Profilable profileSource );
   
       /**
  -     * Serializes the results of the profiling to a file.  The actual format
  -     * depends on the Profiler in use.  It can be simple Comma Separated Values
  -     * (CSV) with the columns representing a unique Profilable.  Most spreadsheet
  -     * programs can import this and generate meaningful graphs from it.  Another
  -     * alternative is to output the information in a tool specific format.  The
  -     * actual format depends on the Profiler in question, and the Profiler merely
  -     * needs the reference to the output file.
  +     * Reports the results of the profiling to a ProfileReport.  The actual
  +     * format depends on the ProfileReport given.  It can be simple Comma
  +     * Separated Values (CSV) with the columns representing a unique Profilable.
  +     * Most spreadsheet programs can import this and generate meaningful graphs
  +     * from it.  Another alternative is to output the information in a tool
  +     * specific format.  The actual format depends on the ProfileReport in
  +     * question, and the Profiler merely needs to reference to the object.
        *
        * @parameter  outputInfo  The handle of the file the profiler serializes the
        *                         results to.
        *
  -     * @throws <code>IOException</code> If the file is not valid, or cannot
be
  -     *         written to.
  +     * @throws <code>NullPointerException</code> If the ProfileReport is null.
        */
  -    void serialize( File outputInfo ) throws IOException;
  +    void report( ProfileReport outputInfo );
   }
  
  
  
  1.1                  jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/profile/ProfileReport.java
  
  Index: ProfileReport.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.excalibur.profile;
  
  
  /**
   * The ProfileReport interface is an event based reporting mechanism.  It is
   * modeled after the Simple API for XML (SAX), and is effectively simple itself.
   * The ProfileReport may or may not serialize information to a persistent source,
   * but this is how the Profiler publishes it's information.
   *
   * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
   */
  public interface ProfileReport {
  
      /**
       * The report is started with this method.  This is called once at the
       * beginning of a profile run, and signifies to the ProfileReport object
       * that it should prepare to handle more requests.
       */
      void startReport();
  
      /**
       * This method is used to write the names for the individual sample points.
       * It is called once at the beginning of a profile run, but after
       * <code>startReport</code>.  If this method is not called, then the report
       * must supply it's own default names (typically "column1", "column2", etc).
       */
      void setColumnNames(String[] columnNames);
  
      /**
       * This method is called each time the Profiler takes a sample.  It has the
       * timestamp that the samples were called, and an array of the actual
       * values.
       */
      void sample( long timestamp, int[] values );
  
      /**
       * This method is called once at the end of a profile run, and signifies
       * that the ProfileReport object may close it's resources, and no other
       * events will be called.
       */
      void endReport();
  }
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message