-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Windows user & system times incorrect #368
Comments
Thank you for reporting this! That should be fixed. |
Also related: #336 |
Hi! I'm a student using hyperfine for the research for my Master's thesis. I'm not quite sure my issue is related, since you said this problem should already be solved and my user and system times are actually above zero, but maybe this issue wasn't properly fixed? Or maybe I just have a very wrong understanding of what exactly do the user and system time show. I'm currently benchmarking C++,C# and Java implementations of one of the problems from the Computer Language Benchmarks game. The user and system times are always very small compared to the wall clock time. One of the example results that confuse me is:
which is for a sequential C++ program which should be spending most of its time dynamically allocating and deallocating memory. I've even done some profiling (using a sampling profiler) which confirms that this program spends at least 75% of its time in Windows kernel code. Why is the system time so low then? Shouldn't it be 3 orders of magnitude bigger? And the same for user time... |
Sorry for the misunderstanding. By "this should be fixed", I meant: we should fix this. It has not been fixed yet, otherwise the issue would be closed. The user/system times you are seeing are probably the spawning times of Any help on this would be very appreciated. The easiest "fix" or workaround might be to implement #336. |
Oh, that's unfortunate. I have no experience with making pull requests to open-source or with Rust, so I doubt I can be of much help... But isn't #336 almost done? It looks to me that cipriancraciun already did everything, but just forgot to make the final push. |
In hyperfine 1.13, we now have the option to disable the intermediate shell using A quick fix for this ticket might be to hide user/system times on Windows by default, unless the |
I confirm it's now working fine :) Without disabling the intermediate shell:
With
|
Okay. So an easy fix for now could be to disable the display of user and system times on Windows, unless |
Looks like user and kernel time on Windows is calculated for the shell process only, which is only used for spawning other processes and waiting for them, resulting in zero times.
I tried running processes directly instead of using the shell by using this and this way I do get relevant results:
The text was updated successfully, but these errors were encountered: