Bug 58281 - RandomOrderController : Improve randomization algorithm performance
Summary: RandomOrderController : Improve randomization algorithm performance
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 20:56 UTC by Graham Russell
Modified: 2015-10-03 20:11 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Russell 2015-08-24 20:56:44 UTC
While looking at replacing old style for loops I came across the reorder method on the RandomOrderController.

Can we replace this custom O(n^2) method with a call to Collections.shuffle() O(n)?
Comment 1 Philippe Mouawad 2015-10-03 20:10:46 UTC
Author: pmouawad
Date: Sat Oct  3 20:10:26 2015
New Revision: 1706620

URL: http://svn.apache.org/viewvc?rev=1706620&view=rev
Log:
Bug 58281 - RandomOrderController : Improve randomization algorithm performance
Bugzilla Id: 58281

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/RandomOrderController.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2015-10-03 20:11:04 UTC
(In reply to Philippe Mouawad from comment #1)
> Author: pmouawad
> Date: Sat Oct  3 20:10:26 2015
> New Revision: 1706620
> 
> URL: http://svn.apache.org/viewvc?rev=1706620&view=rev
> Log:
> Bug 58281 - RandomOrderController : Improve randomization algorithm
> performance
> Bugzilla Id: 58281
> 
> Modified:
>    
> jmeter/trunk/src/components/org/apache/jmeter/control/RandomOrderController.
> java
>     jmeter/trunk/xdocs/changes.xml

(In reply to Graham Russell from comment #0)
> While looking at replacing old style for loops I came across the reorder
> method on the RandomOrderController.
> 
> Can we replace this custom O(n^2) method with a call to
> Collections.shuffle() O(n)?

Thanks, commited.