Skip to content
New issue

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

Bad precision of TimeStats on Windows #153

Open
andy-maier opened this issue Jan 12, 2017 · 1 comment
Open

Bad precision of TimeStats on Windows #153

andy-maier opened this issue Jan 12, 2017 · 1 comment

Comments

@andy-maier
Copy link
Member

Actual behavior

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
@abrezovsky
Copy link
Contributor

abrezovsky commented Jan 19, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants