mstover1    2002/08/14 09:38:44

  Modified:    docs/usermanual component_reference.html
               src/components/org/apache/jmeter/visualizers
                        RunningSample.java StatVisualizerModel.java
               xdocs/usermanual component_reference.xml
  Added:       docs/images/screenshots aggregate_report.png
               docs/images/screenshots/gen-controller http-request.png
  Removed:     docs/images/screenshots aggregate_report.gif
               docs/images/screenshots/gen-controller http-request.gif
  Log:
  Updating Aggregate report's throughput calculation
  updating documentation
  
  Revision  Changes    Path
  1.1                  jakarta-jmeter/docs/images/screenshots/aggregate_report.png
  
        <<Binary file>>
  
  
  1.1                  
jakarta-jmeter/docs/images/screenshots/gen-controller/http-request.png
  
        <<Binary file>>
  
  
  1.22      +41 -5     jakarta-jmeter/docs/usermanual/component_reference.html
  
  Index: component_reference.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/docs/usermanual/component_reference.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- component_reference.html  11 Aug 2002 15:41:57 -0000      1.21
  +++ component_reference.html  14 Aug 2002 16:38:44 -0000      1.22
  @@ -92,6 +92,7 @@
                                        <li><a href="#Spline_Visualizer">Spline 
Visualizer</a></li>
                                        <li><a href="#Assertion_Results">Assertion 
Results</a></li>
                                        <li><a href="#View_Result_Tree">View Result 
Tree</a></li>
  +                                     <li><a href="#Aggregate_Report">Aggregate 
Report</a></li>
                                </ul>
                        <li><a href="#config_elements">13.4 Configuration 
Elements</a></li>
                <ul>
  @@ -277,7 +278,7 @@
        then see section
        
                                                                                       
         <a       href="build-adv-web-test-plan.html#url_rewriting">
  -                                                             6.x HTTP Requests and 
Session ID's: URL Rewriting
  +                                                             6.1 Handling User 
Sessions With URL Rewriting
                                                </a>
                                                                        
        for additional configuration steps.
  @@ -285,7 +286,7 @@
                                                                        
   
                                                                                       
                         <p><b>Control Panel</b></p>
  -                                             <div align="center"><img 
src="../images/screenshots/gen-controller/http-request.gif"></div>
  +                                             <div align="center"><img 
src="../images/screenshots/gen-controller/http-request.png"></div>
                                                                                       
                                                                                       
           <p>
        <b>Parameters</b>
        <table border="1" cellspacing="0" cellpadding="2">
  @@ -357,7 +358,15 @@
        appended to the URL, if POST, then it will be sent separately).  Also, if you 
are
        sending a file using a multipart form, the query string will be created using 
the
        multipart form specifications.
  -                     </td>
  +     
  +                                                                                    
         <p      >
  +                                                             
  +     Additionally, you can specify whether each paramter should be URL encoded.  If 
you are not sure what this
  +     means, it is probably best to select it.  If your values contain characters 
such as &amp; or spaces, or 
  +     question marks, then encoding is usually required.  The column labeled "Url 
Encoded Value" shows how the
  +     parameter name and value will be sent to the server.  Do not edit this field - 
it will have no effect.
  +                                             </p>
  +                             </td>
                        <td>
                                                                                       
 No
                                                                </td>
  @@ -1261,8 +1270,19 @@
                <tr><td>
                                                                                       
                                                                                 <p    
  >
                                                                The Graph Results 
listener generates a simple graph that plots all sample times.  Along
  -the right side of the graph, the current sample (black), the current average of all 
samples(blue), and the
  -current standard deviation (red) are displayed in milliseconds.
  +the bottom of the graph, the current sample (black), the current average of all 
samples(blue), the
  +current standard deviation (red), and the current throughput rate (green) are 
displayed in milliseconds.
  +                                             </p>
  +                                                                     
  +
  +                                                                                    
         <p      >
  +                                                             The throughput number 
represents the actual number of requests/minute the server handled.  This calculation
  +includes any delays you added to your test and JMeter's own internal processing 
time.  The advantage
  +of doing the calculation like this is that this number represents something
  +real - your server in fact handled that many requests per minute, and you can 
increase the number of threads
  +and/or decrease the delays to discover your server's maximum throughput.  Whereas 
if you made calculations 
  +that factored out delays and JMeter's processing, it would be unclear what you 
could conclude from that
  +number.
                                                </p>
                                                                                       
                                 <p><b>Control Panel</b></p>
                                                <div align="center"><img 
src="../images/screenshots/graph_results.gif"></div>
  @@ -1329,6 +1349,22 @@
   this response, and some response codes.
                                                                                       
                         <p><b>Control Panel</b></p>
                                                <div align="center"><img 
src="../images/screenshots/view_results_tree.png"></div>
  +                                                                                    
                 </td></tr>
  +             <tr><td><br/></td></tr>
  +      </table>
  +     <hr>
  +                                                                                    
                                                                         <table 
border="0" cellspacing="0" cellpadding="2">
  +             <tr><td>
  +               <font face="arial,helvetica,sanserif">
  +                      <a name="Aggregate_Report"><h3>13.3.7 Aggregate 
Report</h3></a>
  +               </font>
  +             </td></tr>
  +             <tr><td>
  +                                                                                    
                                                 The aggregate report creates a table 
row for each differently named request in your test.  For each
  +request, it totals the response information and provides request count, min, max, 
average, error rate, and an
  +idealized throughput calculation.
  +                                                                                    
                         <p><b>Control Panel</b></p>
  +                                             <div align="center"><img 
src="../images/screenshots/aggregate_report.png"></div>
                                                                                       
                 </td></tr>
                <tr><td><br/></td></tr>
         </table>
  
  
  
  1.2       +22 -10    
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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RunningSample.java        11 Aug 2002 19:24:41 -0000      1.1
  +++ RunningSample.java        14 Aug 2002 16:38:44 -0000      1.2
  @@ -56,6 +56,8 @@
   
   // java
   import java.text.DecimalFormat;
  +import java.util.HashSet;
  +import java.util.Set;
   
   import org.apache.jmeter.samplers.SampleResult;
   
  @@ -74,6 +76,9 @@
    * @version 1.0
    */
   public class RunningSample {
  +     
  +     private static DecimalFormat rateFormatter = new DecimalFormat("#.0");  
  +   private static DecimalFormat errorFormatter = new DecimalFormat("#0.00%");
   
       private long counter;
       private long runningSum;
  @@ -81,6 +86,7 @@
       private long errorCount;
       private long firstTime;
       private long lastTime;
  +    private Set threadNames;
   
       /**
        * use this constructor.
  @@ -93,10 +99,18 @@
           errorCount = 0L;
           firstTime = 0L;
           lastTime = 0L;
  +        threadNames = new HashSet();
       }
   
       /**
  -     * Returns a String that shows the rate the samples are being taken.
  +     * Returns a String that represents the idealized throughput for that
  +     * sample.  Uses the following equation:<p>
  +     * Rn = (TotalTime * NumberOfThreads) / averageTime
  +     * <p>
  +     * Where Rn = # requests per TotalTime period.
  +     * <p>
  +     * This number is then represented in requests/second or requests/minute or 
requests/hour.
  +     * <p>
        * Examples:
        *      "34.2/sec"
        *      "0.1/sec"
  @@ -108,7 +122,9 @@
           long howLongRunning = lastTime - firstTime;
   
           if (howLongRunning == 0) return ("N/A");
  -        double samplesPerSecond = ((double) counter / ((double) howLongRunning / 
1000.0));
  +        double samplesPerSecond = (double)((double)howLongRunning * 
threadNames.size()) / (double)getAverage();
  +        double factor = (double)((double)1000 / (double)howLongRunning);
  +        samplesPerSecond = samplesPerSecond * factor;
   //        System.out.println("Running for " + howLongRunning + " seconds - " + 
samplesPerSecond + " samples per second.");
           String perString = "/sec";
           if (samplesPerSecond < 1.0) {
  @@ -119,12 +135,8 @@
               samplesPerSecond *= 60;
               perString = "/hour";
           }
  -        // i guess now, samplesPerSECOND really might NOT be that. :-)
  -
  -        /** @todo probably should turn this DecimalFormat (and the one used below a 
few methods) into static member
  -         variables, so the decimal formatter isn't instantiated in each call to 
this method.. */
  -        DecimalFormat myDF = new DecimalFormat("#.0");
  -        String rval = myDF.format(samplesPerSecond) + perString;
  +        
  +        String rval = rateFormatter.format(samplesPerSecond) + perString;
           return (rval);
       }
   
  @@ -135,6 +147,7 @@
        * @arg aSuccessFlag Flag for if this sample was successful or not
        */
       public synchronized void addSample(SampleResult res) {
  +     threadNames.add(res.getThreadName());
                long aTimeInMillis = res.getTime();
                boolean aSuccessFlag = res.isSuccessful();
                lastTime = res.getTimeStamp();
  @@ -209,8 +222,7 @@
        */
       public String getErrorPercentageString() {
           double myErrorPercentage = this.getErrorPercentage();
  -        DecimalFormat myDF = new DecimalFormat("#0.00%");
  -        return (myDF.format(myErrorPercentage));
  +        return (errorFormatter.format(myErrorPercentage));
       }
   
       /**
  
  
  
  1.2       +0 -32     
jakarta-jmeter/src/components/org/apache/jmeter/visualizers/StatVisualizerModel.java
  
  Index: StatVisualizerModel.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/visualizers/StatVisualizerModel.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StatVisualizerModel.java  11 Aug 2002 19:24:41 -0000      1.1
  +++ StatVisualizerModel.java  14 Aug 2002 16:38:44 -0000      1.2
  @@ -78,8 +78,6 @@
        private String name;
   
        private List listeners;
  -
  -     private Map responseCodeMap;
        private Map labelMap;
   
        /****************************************
  @@ -89,7 +87,6 @@
        public StatVisualizerModel()
        {
                listeners = new LinkedList();
  -             responseCodeMap = Collections.synchronizedMap(new HashMap(10));
                labelMap = Collections.synchronizedMap(new HashMap(10));
        }
   
  @@ -106,23 +103,6 @@
   
        }
   
  -
  -
  -     /****************************************
  -      * Returns the Map containing a list of HTTP/FTP Response Codes and their
  -      * corresponding counts.
  -      *
  -      *@return   The ResponseCodeMap value
  -      ***************************************/
  -
  -     public Map getResponseCodeMap()
  -     {
  -
  -             return (responseCodeMap);
  -     }
  -
  -
  -
        /****************************************
         * Returns the Map containing the Samples we've collected and their
         * corresponding RunningSample instance.
  @@ -184,17 +164,6 @@
                String responseCode = res.getResponseCode();
                RunningSample myRS;
   
  -             if (responseCodeMap.containsKey(responseCode))
  -             {
  -                     long tempLong =
  -                             ((Long)responseCodeMap.get(responseCode)).longValue();
  -                     responseCodeMap.put(responseCode, new Long(++tempLong));
  -             }
  -             else
  -             {
  -                     responseCodeMap.put(responseCode, new Long(1));
  -             }
  -
                if (labelMap.containsKey(aLabel))
                {
                        myRS = (RunningSample)labelMap.get(aLabel);
  @@ -218,7 +187,6 @@
        {
   //        System.out.println("StatVisualizerModel.clear() called");
                // clear the data structures
  -             responseCodeMap.clear();
                labelMap.clear();
                this.fireDataChanged();
        }
  
  
  
  1.22      +23 -5     jakarta-jmeter/xdocs/usermanual/component_reference.xml
  
  Index: component_reference.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/xdocs/usermanual/component_reference.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- component_reference.xml   11 Aug 2002 15:41:46 -0000      1.21
  +++ component_reference.xml   14 Aug 2002 16:38:44 -0000      1.22
  @@ -32,7 +32,7 @@
   
   </component>
   
  -<component name="HTTP Request" index="13.1.2" 
screenshot="../images/screenshots/gen-controller/http-request.gif">
  +<component name="HTTP Request" index="13.1.2" 
screenshot="../images/screenshots/gen-controller/http-request.png">
   
   <description>
        <p>This sampler lets you send an HTTP/HTTPS request to a web server.  It
  @@ -59,7 +59,7 @@
   
        <p>If the request uses a technique called "URL Rewriting" to maintain sessions,
        then see section
  -     <a href="build-adv-web-test-plan.html#url_rewriting">6.x HTTP Requests and 
Session ID's: URL Rewriting</a>
  +     <a href="build-adv-web-test-plan.html#url_rewriting">6.1 Handling User 
Sessions With URL Rewriting</a>
        for additional configuration steps.</p>
   </description>
   
  @@ -78,7 +78,12 @@
        the choice of "Method" you made (ie if you chose GET, the query string will be
        appended to the URL, if POST, then it will be sent separately).  Also, if you 
are
        sending a file using a multipart form, the query string will be created using 
the
  -     multipart form specifications.</property>
  +     multipart form specifications.
  +     <p>
  +     Additionally, you can specify whether each paramter should be URL encoded.  If 
you are not sure what this
  +     means, it is probably best to select it.  If your values contain characters 
such as &amp;amp; or spaces, or 
  +     question marks, then encoding is usually required.  The column labeled "Url 
Encoded Value" shows how the
  +     parameter name and value will be sent to the server.  Do not edit this field - 
it will have no effect.</p></property>
        <property name="Filename" required="No">Name of the file to send.  If left 
blank, JMeter
        does not send a file, if filled in, JMeter automatically sends the request as
        a multipart form request.</property>
  @@ -385,8 +390,15 @@
   
   <component index="13.3.3" name="Graph Results" 
screenshot="../images/screenshots/graph_results.gif">
   <description><p>The Graph Results listener generates a simple graph that plots all 
sample times.  Along
  -the right side of the graph, the current sample (black), the current average of all 
samples(blue), and the
  -current standard deviation (red) are displayed in milliseconds.</p></description>
  +the bottom of the graph, the current sample (black), the current average of all 
samples(blue), the
  +current standard deviation (red), and the current throughput rate (green) are 
displayed in milliseconds.</p>
  +<p>The throughput number represents the actual number of requests/minute the server 
handled.  This calculation
  +includes any delays you added to your test and JMeter's own internal processing 
time.  The advantage
  +of doing the calculation like this is that this number represents something
  +real - your server in fact handled that many requests per minute, and you can 
increase the number of threads
  +and/or decrease the delays to discover your server's maximum throughput.  Whereas 
if you made calculations 
  +that factored out delays and JMeter's processing, it would be unclear what you 
could conclude from that
  +number.</p></description>
   </component>
   
   <component index="13.3.4" name="Spline Visualizer" 
screenshot="../images/screenshots/spline_visualizer.gif">
  @@ -410,6 +422,12 @@
   <description>The View Results Tree shows a tree of all sample responses, allowing 
you to view the
   response for any sample.  In addition to showing the response, you can see the time 
it took to get
   this response, and some response codes.</description>
  +</component>
  +
  +<component index="13.3.7" name="Aggregate Report" 
screenshot="../images/screenshots/aggregate_report.png">
  +<description>The aggregate report creates a table row for each differently named 
request in your test.  For each
  +request, it totals the response information and provides request count, min, max, 
average, error rate, and an
  +idealized throughput calculation.</description>
   </component>
   
   </section>
  
  
  

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

Reply via email to