We should print statistics about how many cache hits / misses we had when the remote cache is enabled.
This is technically a feature request, but we really shouldn't release this without printing stats.
No assignee and no activity for more than a month, so this is apparently not really P1.
You mean, make it a part of the Profiler? Number of remote cache hits for a single build? Also, do you mean any blob hits, or action results?
This issue specifically isn't about the profiler, but about printing basic stats (actions remotely executed / actions remotely cached / total CPU used) at the end of every build. Might want to look at what our internal implementation prints as an example.
There's also profiling, for which I have some ideas, but that's separate from this specific issue.
Is there any progress on this? It seems like the RemoteSpawnRunner doesn't even indicate right now whether an action was cached or not. https://github.com/bazelbuild/bazel/blob/92d425fa73837bd53a5d5d82b73c6b33012f26c7/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java#L153
I would be happy with just cache hits vs misses. We are starting to try to do something hacky by parsing and recording metrics remote/standalone info out from our bazel log output but having something that's a bit more first class would be great!
I haven't started working on it yet ... so many things to do :(. Btw we love contributions 馃槂
We could really use this functionality for our builds at Stripe. I'm happy to contribute-- are there any existing pull requests I can reference showing how something like this could be implemented?
A few discussions on how to build this have delayed it somewhat, but I expect to submit the pr early next week. It will add a line after each build, detailing the number of processes that were remote cache hits, remote, linux, linux-sandbox etc.
This issue possibly a generalization of the more recently filed issue https://github.com/bazelbuild/bazel/issues/4776
This has been fixed. Yay!
Could you post the commit that fixes this?
Most helpful comment
https://github.com/bazelbuild/bazel/commit/a8023b796db7d05e329d0eb9a51cb4ce8222e4a0