tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1686789 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
Date Mon, 22 Jun 2015 07:47:33 GMT
Author: kfujino
Date: Mon Jun 22 07:47:32 2015
New Revision: 1686789

URL: http://svn.apache.org/r1686789
Log:
Override reportQuery method.

Modified:
    tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java?rev=1686789&r1=1686788&r2=1686789&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
Mon Jun 22 07:47:32 2015
@@ -111,6 +111,16 @@ public class SlowQueryReport extends Abs
     }
 
     @Override
+    protected String reportQuery(String query, Object[] args, final String name, long start,
long delta) {
+        String sql = super.reportQuery(query, args, name, start, delta);
+        if (this.maxQueries > 0 ) {
+            QueryStats qs = this.getQueryStats(sql);
+            qs.add(delta, start);
+        }
+        return sql;
+    }
+
+    @Override
     protected String reportSlowQuery(String query, Object[] args, String name, long start,
long delta) {
         String sql = super.reportSlowQuery(query, args, name, start, delta);
         if (this.maxQueries > 0 ) {



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


Mime
View raw message