Actions
Task #5716
closedImplement the possibility to process template code multiple times (e.g. atomic (:repeat => N) {})
Start date:
03/17/2015
Due date:
% Done:
100%
Estimated time:
Detected in build:
svn
Published in build:
2.3.12
Description
See my comments in Bug #5691. Need a construct like this:
atomic (:repeat => 1000000) {
...
}
This is needed to repeat fragments of a test template and gives the following advantages over the "1000000.times { ... }" Ruby construct, which is now used:
- Only one copy which is processed N times (the iterator returns the same sequence N times).
- No processor time is spent to create N identical objects (no time-consuming interactions between Ruby and Java).
- No memory is wasted to store N identical objects.
- This will work in any place in a test template (not only for top-level blocks)
Updated by Andrei Tatarnikov about 9 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Such a facility was implemented in r5633 (see also Task #6438). Syntax is the following:
atomic {
...
}.run(1000000)
Updated by Andrei Tatarnikov about 9 years ago
- Status changed from Resolved to Closed
- Published in build set to 2.3.12
Actions