Skip to content

Commit bab6dc2

Browse files
MDLZCOOLdakejahl
authored andcommitted
fix(lib/perf): Fully reset mean and M2 in perf_counter
1 parent 42ef7a4 commit bab6dc2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/perf/perf_counter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ perf_reset(perf_counter_t handle)
411411
pce->time_total = 0;
412412
pce->time_least = 0;
413413
pce->time_most = 0;
414+
pce->mean = 0.0f;
415+
pce->M2 = 0.0f;
414416
break;
415417
}
416418

@@ -422,6 +424,8 @@ perf_reset(perf_counter_t handle)
422424
pci->time_last = 0;
423425
pci->time_least = 0;
424426
pci->time_most = 0;
427+
pci->mean = 0.0f;
428+
pci->M2 = 0.0f;
425429
break;
426430
}
427431
}

0 commit comments

Comments
 (0)