Project

General

Profile

Actions

Task #5716

closed

Implement the possibility to process template code multiple times (e.g. atomic (:repeat => N) {})

Added by Andrei Tatarnikov over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
High
Assignee:
Andrei Tatarnikov
Category:
Template Processor
Target version:
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)
Actions

Also available in: Atom PDF