You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TimeStats timer uses time.time() which has a high precision on UNIX/Linux, but a pretty bad precision of only 1/60 sec on Windows.
Expected behavior
The precision on Windows should be improved.
Possible solutions
time.clock() provides high precision on Windows, but no good precision on UNIX/Linux. besides that, it is deprecated since Python 3.3.
timeit.default_timer() seems to be a solution but requires to fit the code to be measured into a statement string that is interpreted inside of a timeit() method. That might be a solution but requires more investigation.
Execution environment
zhmcclient version: 0.9.0
Operating system (type+version): Windows 7
The text was updated successfully, but these errors were encountered:
I don't think timeit is the solution we're looking for. It would likely require a complete rewrite of TimeStats if it even could provide the same functionality, which I don't think it can.
Actual behavior
The
TimeStats
timer usestime.time()
which has a high precision on UNIX/Linux, but a pretty bad precision of only 1/60 sec on Windows.Expected behavior
The precision on Windows should be improved.
Possible solutions
time.clock()
provides high precision on Windows, but no good precision on UNIX/Linux. besides that, it is deprecated since Python 3.3.timeit.default_timer()
seems to be a solution but requires to fit the code to be measured into a statement string that is interpreted inside of atimeit()
method. That might be a solution but requires more investigation.Execution environment
The text was updated successfully, but these errors were encountered: