sebb        2003/10/31 10:32:55

  Modified:    src/components/org/apache/jmeter/visualizers
                        RunningSample.java
  Log:
  Added clear() and getErrorCount() methods
  
  Revision  Changes    Path
  1.13      +22 -1     
jakarta-jmeter/src/components/org/apache/jmeter/visualizers/RunningSample.java
  
  Index: RunningSample.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/visualizers/RunningSample.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- RunningSample.java        20 Oct 2003 23:56:22 -0000      1.12
  +++ RunningSample.java        31 Oct 2003 18:32:55 -0000      1.13
  @@ -82,6 +82,9 @@
       private String label;
       private int index;
   
  +    private RunningSample(){// Don't (can't) use this...
  +    }
  +    
       /**
        * Use this constructor.
        */
  @@ -89,6 +92,10 @@
       {
           this.label = label;
           this.index = index;
  +        init();
  +    }
  +
  +    private void init(){
           counter = 0L;
           runningSum = 0L;
           max = Long.MIN_VALUE;
  @@ -99,6 +106,13 @@
       }
   
       /**
  +     * Clear the counters (useful for differential stats)
  +     *
  +     */
  +     public synchronized void clear(){
  +             init();
  +     }
  +    /**
        * Returns the throughput associated to this sampler in requests per second.
        * May be slightly skewed because it takes the timestamps of the first and
        * last samples as the total time passed, and the test may actually have
  @@ -327,5 +341,12 @@
           mySB.append("Sample Rate: " + this.getRateString());
           return (mySB.toString());
       }
  +
  +     /**
  +      * @return errorCount
  +      */
  +     public long getErrorCount() {
  +             return errorCount;
  +     }
   
   } // class RunningSample
  
  
  

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

Reply via email to