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

Wall-clock vs CPU clock #28

Open
pitrou opened this issue Jan 7, 2020 · 1 comment
Open

Wall-clock vs CPU clock #28

pitrou opened this issue Jan 7, 2020 · 1 comment

Comments

@pitrou
Copy link

pitrou commented Jan 7, 2020

While looking at the clang patch that added -ftime-trace, I noticed that it uses std::chrono::steady_clock. That is most certainly a wall clock, not a CPU clock. That means the numbers obtained when running a parallel build (which is almost unavoidable on a large project) may be unreliable, depending on scheduling. Did you consider this issue?

@ben-craig
Copy link

I would argue that all times are unreliable. CPU or user time can still be unreliable just based off of what the rest of the system is doing.

If you are concerned about reproducible timings, then you can collect timings with a -j1 build

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

No branches or pull requests

2 participants