Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.10.7, 3.11.3, 4.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
MDL-72921_311 -
Description
When a jmeter plan is created:
1) A site of a given size (XS, S, M....) is created. Now we are using S.
2) A jmeter plan (testplan.jmx) and a users file (users.csv) are created, using the same size used in previous point, aka, S.
The there is a problem that has been long with us (since 2013!). And it's that, for the S size, 100 users are enrolled in the courses. But the test plan is created with 30 concurrent threads only. In other words, for the S size... the number of users and the number of plan threads don't match (they used to match before 2013).
And... it's absolutely important, that, not matter if a course has 100, 1000 or 10^6 enrolled... that the users.csv file generated for the plan... only has exactly as many users as the plan concurrency is being set.
But, right now, plans for 30 threads are using a users.csv with 100 users, so the loops in the plan aren't really looping 5 times over 30 users... but using the 100 users in the cvs. file, so first users run 4 loops, others only 3...
And all that leads to random stats here and there (because of problems when performing the "warm-up" loop that the test does only for the 1st 30 users in the file)
To be comparable... 2 plans and the loops must be 100% the same (same users, against same site, with same concurrency...).
So this patch only aims to do one thing... and it's to ensure that the users.csv file generated contains exactly as many users and the threads are going to need (defined by the plan size).
In practice, that means that, for our current S size sites... we'll get users.csv files with 30 users (matching the number of threads in the plan) and not the 100 users that are currently being enrolled in courses by default.
This must be implemented in a BC way (although I don't think that there will be many uses out from core), but old calls to the changed methods, not passing the new param must behave like they were doing before the patch.
And applied to all supported branches, so comparisons between them can be performed consistently.