woolfel     2004/03/12 21:52:07

  Modified:    src/core/org/apache/jmeter/samplers SampleResult.java
  Log:
  Added a new attribute for SampleResults to indicate if a sampler is

  used as a monitor sampler.

  

  peter lin
  
  Revision  Changes    Path
  1.28      +20 -2     
jakarta-jmeter/src/core/org/apache/jmeter/samplers/SampleResult.java
  
  Index: SampleResult.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/samplers/SampleResult.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- SampleResult.java 22 Feb 2004 14:36:46 -0000      1.27
  +++ SampleResult.java 13 Mar 2004 05:52:07 -0000      1.28
  @@ -88,6 +88,7 @@
       private long time = 0;
       private boolean stopThread = false; //Should thread terminate?
        private boolean stopTest = false;   //Should test terminate?
  +     private boolean isMonitor = false;
        //TODO do contentType and/or dataEncoding belong in HTTPSampleResult instead?
   
       private final static String TOTAL_TIME = "totalTime";
  @@ -614,6 +615,23 @@
                }
                idleTime += System.currentTimeMillis() - pauseTime;
                pauseTime=0;
  +     }
  +     
  +     /**
  +      * When a Sampler is working as a monitor
  +      * @param monitor
  +      */
  +     public void setMonitor(boolean monitor){
  +             isMonitor = monitor;
  +     }
  +
  +     /**
  +      * If the sampler is a monitor, method will
  +      * return true.
  +      * @return
  +      */
  +     public boolean isMonitor(){
  +             return isMonitor;
        }
        
   ////////////////////////////// Start of Test Code ///////////////////////////
  
  
  

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

Reply via email to