Author: sebb
Date: Mon Nov 28 16:50:58 2005
New Revision: 349564

URL: http://svn.apache.org/viewcvs?rev=349564&view=rev
Log:
Save latency (time to first response)

Modified:
    
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java

Modified: 
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
URL: 
http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java?rev=349564&r1=349563&r2=349564&view=diff
==============================================================================
--- 
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
 (original)
+++ 
jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
 Mon Nov 28 16:50:58 2005
@@ -530,7 +530,12 @@
                     //contentLength > 0 ? contentLength : 
DEFAULT_INITIAL_BUFFER_SIZE);
             byte[] buffer = new byte[4096];
             int len;
+            boolean first = true;// first response
             while ((len = instream.read(buffer)) > 0) {
+                if (first) { // save the latency
+                    res.latencyEnd();
+                    first = false;
+                }
                 outstream.write(buffer, 0, len);
             }
             outstream.close();



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

Reply via email to