You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2014/10/27 14:42:37 UTC
svn commit: r1634536 - in
/jmeter/trunk/src/functions/org/apache/jmeter/functions: LogFunction.java
LogFunction2.java
Author: pmouawad
Date: Mon Oct 27 13:42:36 2014
New Revision: 1634536
URL: http://svn.apache.org/r1634536
Log:
Bug 57114 - Performance : Functions that only have values as instance variable should not synchronize execute
Keep synchronized where it is needed
Bugzilla Id: 57114
Modified:
jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java
jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction2.java
Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java?rev=1634536&r1=1634535&r2=1634536&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction.java Mon Oct 27 13:42:36 2014
@@ -76,7 +76,7 @@ public class LogFunction extends Abstrac
/** {@inheritDoc} */
@Override
- public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
+ public String execute(SampleResult previousResult, Sampler currentSampler)
throws InvalidVariableException {
// The method is synchronized to avoid interference of messages from multiple threads
String stringToLog = ((CompoundVariable) values[0]).execute();
@@ -134,7 +134,7 @@ public class LogFunction extends Abstrac
}
// Routine to perform the output (also used by __logn() function)
- static void logDetails(Logger l, String s, String prio, Throwable t, String c) {
+ static synchronized void logDetails(Logger l, String s, String prio, Throwable t, String c) {
if (prio.equalsIgnoreCase("OUT")) //$NON-NLS-1
{
printDetails(System.out, s, t, c);
Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction2.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction2.java?rev=1634536&r1=1634535&r2=1634536&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction2.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/LogFunction2.java Mon Oct 27 13:42:36 2014
@@ -71,7 +71,7 @@ public class LogFunction2 extends Abstra
/** {@inheritDoc} */
@Override
- public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
+ public String execute(SampleResult previousResult, Sampler currentSampler)
throws InvalidVariableException {
String stringToLog = ((CompoundVariable) values[0]).execute();