jakarta-jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r582440 - /jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Date Sat, 06 Oct 2007 02:57:46 GMT
Author: sebb
Date: Fri Oct  5 19:57:45 2007
New Revision: 582440

URL: http://svn.apache.org/viewvc?rev=582440&view=rev
Log:
Ensure latency is measured even if connection not obtained

Modified:
    jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java

Modified: jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java?rev=582440&r1=582439&r2=582440&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
(original)
+++ jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Fri Oct  5 19:57:45 2007
@@ -148,8 +148,11 @@
 
 		try {
 
-			conn = DataSourceElement.getConnection(getDataSource());
-			res.latencyEnd(); // use latency to measure connection time
+			try {
+			    conn = DataSourceElement.getConnection(getDataSource());
+			} finally {
+				res.latencyEnd(); // use latency to measure connection time
+			}
 			res.setResponseHeaders(conn.toString());
 
             // Based on query return value, get results



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Mime
View raw message