You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config: Add "events" key in parse_task_phase_data()
Allow parsing an "events" key for phases with the following format:
"events": [
{"run": 1000},
{"timer": {"ref": "helloworld", "period": 16000}},
{"run": 9000},
{"sleep": 1000}
]
This allows:
* Enforced ordering of events. Relying on the order of keys in an
object is issue-prone, as interfaces to interact with mappings in
most languages are not designed around preserving such order. On
the contrary, array operations have always a well defined
order semantic.
* More critically, this allows repeating the same event an
arbitrary number of times. Complex workload might otherwise need
to be split among different phases to workaround that issue, which
comes with some overhead and extra bookeeping in external code.
Checked constraints:
* only event objects are allowed in the array
* objects can only have one key
* when "events" is in use, no event key is allowed in the phase
body. This means the user either uses the old format or the new
one but mixing is not allowed.
Signed-off-by: Douglas RAILLARD <[email protected]>
0 commit comments