Skip to content

Commit 009333e

Browse files
committed
Add step to resource metrics
1 parent 8f797c1 commit 009333e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

simvue/run.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,9 @@ def _heartbeat(
355355

356356
if self._resources_metrics_interval:
357357
self._add_metrics_to_dispatch(
358-
self._get_sysinfo(interval=1), join_on_fail=False
358+
self._get_sysinfo(interval=1), join_on_fail=False, step=0
359359
)
360+
res_step = 1
360361

361362
while not heartbeat_trigger.is_set():
362363
time.sleep(0.1)
@@ -371,9 +372,10 @@ def _heartbeat(
371372
# join would be called on this thread and a thread cannot
372373
# join itself!
373374
self._add_metrics_to_dispatch(
374-
self._get_sysinfo(), join_on_fail=False
375+
self._get_sysinfo(), join_on_fail=False, step=res_step
375376
)
376377
last_res_metric_call = res_time
378+
res_step += 1
377379

378380
if time.time() - last_heartbeat < self._heartbeat_interval:
379381
continue

0 commit comments

Comments
 (0)