Skip to content

Use perf_counter for timing metrics

Ed Baunton requested to merge edbaunton/timer-with-perf-counter into master

As of 3.3 the Python time library provides a perf_counter[1] method to measure durations between two points in time. Rather than use absolute timestamps as we were before, switch to using perf_counter to measure the times between the start and stop of the timer metric.

Add additional tests to ensure conversions work as expected.

[1] https://docs.python.org/3/library/time.html#time.perf_counter

Merge request reports