Commit 31f57fb
committed
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 <douglas.raillard@arm.com>1 parent 37667fe commit 31f57fb
2 files changed
Lines changed: 102 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
295 | 295 | | |
296 | | - | |
297 | | - | |
| 296 | + | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
344 | 368 | | |
345 | 369 | | |
346 | 370 | | |
| |||
650 | 674 | | |
651 | 675 | | |
652 | 676 | | |
653 | | - | |
| 677 | + | |
654 | 678 | | |
655 | 679 | | |
656 | 680 | | |
| |||
756 | 780 | | |
757 | 781 | | |
758 | 782 | | |
759 | | - | |
760 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
987 | 990 | | |
988 | 991 | | |
989 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
990 | 996 | | |
991 | 997 | | |
992 | 998 | | |
993 | | - | |
994 | | - | |
995 | 999 | | |
996 | | - | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
997 | 1018 | | |
| 1019 | + | |
| 1020 | + | |
998 | 1021 | | |
999 | 1022 | | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1000 | 1030 | | |
1001 | 1031 | | |
1002 | 1032 | | |
1003 | | - | |
1004 | 1033 | | |
1005 | 1034 | | |
1006 | 1035 | | |
1007 | | - | |
1008 | 1036 | | |
1009 | 1037 | | |
1010 | 1038 | | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1017 | 1074 | | |
1018 | 1075 | | |
1019 | 1076 | | |
| |||
0 commit comments