We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time.perf_counter_ns()
time.time_ns()
First, thank you for this great project!
However, I fear, that there is some issue with the time measurement. Using time.get_clock_info() we can get this information:
time.get_clock_info()
>>> time.get_clock_info("time") namespace(implementation='clock_gettime(CLOCK_REALTIME)', monotonic=False, adjustable=True, resolution=1e-09) >>> time.get_clock_info("perf_counter") namespace(implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, adjustable=False, resolution=1e-09)
time.time()
Note: This is platform dependent, in this case run in Python 3.11.5 on Linux 6.5.6-arch2-1.
I would suggest switching time.time_ns() with time.perf_counter_ns() as is usually done for reliable performance measurements.
There is a PR open fixing this at #5.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
First, thank you for this great project!
However, I fear, that there is some issue with the time measurement. Using
time.get_clock_info()
we can get this information:time.time()
and thereforetime.time_ns()
make no claim for being monotonic, meaning that it is possible that a later reading returns a lower number.Note: This is platform dependent, in this case run in Python 3.11.5 on Linux 6.5.6-arch2-1.
I would suggest switching
time.time_ns()
withtime.perf_counter_ns()
as is usually done for reliable performance measurements.There is a PR open fixing this at #5.
The text was updated successfully, but these errors were encountered: