-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Timing profiles don't include non-CPU times #86066
Comments
"CPU time" generally is the time the process is scheduled on a CPU. Network requests are not included in that time, since they are an I/O operation. |
Yes, but it would have been helpful to have timings include the network / non-CPU times as well to make it more obvious what the problem was. Is that something which could be added? |
|
Thanks for clarifying @wesleywiser . So should the output file be changed to not say |
Is there a way to reproduce the issue (ideally, without For example, I am unable to trigger this behavior if I just
Could multiple builds without changes have been involved ? So that maybe some of the proc macros weren't re-run on the subsequent profiled run (I also believe |
I'm not sure, I haven't used any other macros that make network requests before.
For these stats, I built the entire project, added a newline to invalidate the cache, recorded the time, removed the newline, profiled it with timings, so to the best of my understanding it should be an apples to apples comparison. Also, the |
When debugging slow compile times, I ran
cargo rustc --profile check --manifest-path ./my-crate/Cargo.toml -- -Zself-profile
.summarize
gaveTotal cpu time: 2.6826241s
, but the former command said it finished in 1 minute 45 seconds.The issue turned out to be SQLx query macros, which make network requests to a live database when expanded.
I think it would be useful to include that information in timing profiles.
The text was updated successfully, but these errors were encountered: