-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 build time per subninja #1080
Comments
You could add a phony target (called |
My target is not to time the whole build process, but to time each subninja seperately. |
I think I got that. When you pass a target as argument to ninja (like You can repeat this process for all your subninja. |
You can also have a look to |
Does it list it in all versions of ninja? My version of ninja is probably 2015-12-28 20:22 GMT+02:00 Ilya Popov notifications@github.com:
|
I just checked 1.3.4 and it does. What do you see in your |
I'm currently not at my workplace, I'll return an answer tomorrow 2015-12-29 11:54 GMT+02:00 Ilya Popov notifications@github.com:
|
See also https://groups.google.com/forum/#!topic/ninja-build/aD82sxwD3_o -- seems more like a support question than an issue in ninja itself, so closing this. |
Here's some AWK stuff which shows per-target build time averaged through your build history. #!/usr/bin/awk -f
!/^#/ {
TIMES[$4] += ($2 - $1)/1000
COUNT[$4] += 1
}
END {
for (TGT in TIMES)
AVG[TGT]=TIMES[TGT]/COUNT[TGT]
asorti(AVG, SORTED, "@val_num_desc")
for (num in SORTED)
print AVG[SORTED[num]] " " SORTED[num]
} After saving as, say, Thanks for that tip for checking this log file, @ilyapopov. |
I need to time how much time each subninja takes to build.
I've encountered 2 main problems:
Would there be another way other then time each module?
&
Is there a way to export a $subninja as a variable, like $out?
Sincerely, giorag.
Edit: If adding this as a feature to ninja(timing each submodule build time) would be possible, it would be great!
The text was updated successfully, but these errors were encountered: