You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2002/09/04 10:00:53 UTC

cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/profiler ProfilerData.java ProfilingXMLPipe.java

stephan     2002/09/04 01:00:53

  Modified:    src/java/org/apache/cocoon/components/profiler
                        ProfilerData.java ProfilingXMLPipe.java
  Log:
  Add the measurement for the last component(Serializer) to
  the ProfilerData.
  
  Revision  Changes    Path
  1.10      +10 -1     xml-cocoon2/src/java/org/apache/cocoon/components/profiler/ProfilerData.java
  
  Index: ProfilerData.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/profiler/ProfilerData.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ProfilerData.java	3 Sep 2002 07:44:31 -0000	1.9
  +++ ProfilerData.java	4 Sep 2002 08:00:53 -0000	1.10
  @@ -105,6 +105,15 @@
       }
   
       /**
  +     * Returns the count of components.
  +     *
  +     * @return Count of components.
  +     */
  +    public int getCount() {
  +        return entries.size();
  +    }
  +
  +    /**
        * Set the environment information.
        *
        * @param environmentinfo Environment information.
  
  
  
  1.3       +7 -1      xml-cocoon2/src/java/org/apache/cocoon/components/profiler/ProfilingXMLPipe.java
  
  Index: ProfilingXMLPipe.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/profiler/ProfilingXMLPipe.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ProfilingXMLPipe.java	3 Sep 2002 07:44:31 -0000	1.2
  +++ ProfilingXMLPipe.java	4 Sep 2002 08:00:53 -0000	1.3
  @@ -131,7 +131,13 @@
               this.data.setSAXFragment(this.index, fragment);
   
           this.deserializer.setConsumer(this.consumer);
  +
  +        this.time = System.currentTimeMillis(); // Startup time
           this.deserializer.deserialize(fragment);
  +        this.total = System.currentTimeMillis() - this.time;
  +
  +        if ((this.index != -1) && (this.index==(this.data.getCount()-2)))
  +            this.data.setTime(this.index+1, this.total);
       }
   
       public void setDocumentLocator(Locator locator) {
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org