Created attachment 33386 [details] Use invokeLater instead of invokeAndWait The usage of invokeAndWait in runSafe will slow down the samplers in gui mode, when listeners are used. When running with 1000 threads in 500 loops using just a simple java sampler (0ms wait) and a Summary Report the version with invokeAndWait will do about 30.000 req/s and the one with invokeLater around 100.000 req/s. (Tested on my ubunutu notebook with local X). When run over remote X the version with invokeAndWait can perform a lot worse, due to heavy lock contention. The proposed patch ignores the potentially thrown exceptions, as they are probably ignored by the other usages of invokeLater in other parts of jmeter code.
Created attachment 33390 [details] Use invokeLater instead of invokeAndWait everywhere except in proxycontrol As pointed out by Phillip, the proxy control has problems when runSafe is asynchronous. So leave runSafe synchronous per default, but add a version which is configurable, whether it should do the runnable synchronously or asynchronously.
Date: Fri Jan 1 12:51:20 2016 New Revision: 1722493 URL: http://svn.apache.org/viewvc?rev=1722493&view=rev Log: Make JMeterUtils#runSafe sync/async awt invocation configurable and change the visualizers to use the async version. Bugzilla Id: 58784 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/AssertionVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/ComparisonVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/DistributionGraphVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/GraphVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/MailerVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/SplineVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java jmeter/trunk/xdocs/changes.xml
Date: Fri Jan 1 19:21:40 2016 New Revision: 1722543 URL: http://svn.apache.org/viewvc?rev=1722543&view=rev Log: Correct (flip) sync/async usage of JMeterUtils#runSafe as noted by pmouawad. Followup to r1722493 Bugzilla Id: 58784
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3749