Skip to content

Added measurement of dead time to time log.

Bert Vandenbroucke requested to merge dead-time-in-time-log into master

The current dead time statistics is gathered as part of the task statistics over multiple time steps and therefore contains no information about how much dead time there is in steps of certain sizes. To account for this, this MR adds a lightweight dead time measurement to the time log (both stdout and timesteps.txt file).

Each runner is equipped with a tick counter that effectively counts how long the runner spends in the switch statement in runner_main. These counters are reset in engine_launch before the runners are released, and there values are accumulated into a new field in the scheduler once the runners are done. Another field accumulates the ticks between the start of engine_launch and the end, keeping track of the waiting time. Both fields are reset in engine_step. This means measurements are accumulated over multiple calls to engine_launch, but reset for every step.

To compute the dead time for a step, the waiting time is multiplied with the number of runners and then the active runner time is subtracted from this. The result is converted into ms and then averaged over all threads to provide a value that can be directly compared with the wallclock time for the same step.

The resulting dead time is added as a new column in the stdout output and in the timesteps.txt file.

Edited by Bert Vandenbroucke

Merge request reports