jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1700122 - /jmeter/branches/SampleTimeout/src/components/org/apache/jmeter/timers/InterruptTimer.java
Date Sun, 30 Aug 2015 13:34:11 GMT
Author: sebb
Date: Sun Aug 30 13:34:10 2015
New Revision: 1700122

URL: http://svn.apache.org/r1700122
Log:
The execService is not Serializable, so must be marked transient else GUI copy fails

Modified:
    jmeter/branches/SampleTimeout/src/components/org/apache/jmeter/timers/InterruptTimer.java

Modified: jmeter/branches/SampleTimeout/src/components/org/apache/jmeter/timers/InterruptTimer.java
URL: http://svn.apache.org/viewvc/jmeter/branches/SampleTimeout/src/components/org/apache/jmeter/timers/InterruptTimer.java?rev=1700122&r1=1700121&r2=1700122&view=diff
==============================================================================
--- jmeter/branches/SampleTimeout/src/components/org/apache/jmeter/timers/InterruptTimer.java
(original)
+++ jmeter/branches/SampleTimeout/src/components/org/apache/jmeter/timers/InterruptTimer.java
Sun Aug 30 13:34:10 2015
@@ -46,7 +46,7 @@ public class InterruptTimer extends Abst
 
     private ScheduledFuture<?> future;
     
-    private final ScheduledExecutorService execService;
+    private final transient ScheduledExecutorService execService;
     
     private final boolean debug;
 
@@ -104,14 +104,16 @@ public class InterruptTimer extends Abst
         final Interruptible sampler = (Interruptible) samp;
         Runnable run=new Runnable() {
             public void run() {
-                  boolean interrupted = sampler.interrupt();
-                  if (interrupted) {
-                      LOG.warn("Done interrupting " + getInfo(samp));
-                  } else {
-                      if (debug) {
-                          LOG.debug("Didn't interrupt: " + getInfo(samp));              
           
-                      }
-                  }
+                long start = System.nanoTime();
+                boolean interrupted = sampler.interrupt();
+                long end = System.nanoTime();
+                if (interrupted) {
+                    LOG.warn("Done interrupting " + getInfo(samp) + " took(ns) " + (end-start));
+                } else {
+                    if (debug) {
+                        LOG.debug("Didn't interrupt: " + getInfo(samp) + " took(ns) " + (end-start));
+                    }
+                }
             }
         };
 



Mime
View raw message