Hi there, I have a small question on the remote ca...
# general
p
Hi there, I have a small question on the remote cache summary. Am I correct that the cache hit rate should be calculated as
(remote_cache_requests_cached+remote_cache_speculation_remote_completed_first) / remote_cache_requests
? Also, we are using an on-prem deployed bazel-remote cache. Thanks!
I am a little bit confused from the summary I pasted here:
remote_cache_requests_cached+remote_cache_speculation_remote_completed_first+remote_cache_requests_uncached = 310 != remote_cache_requests
.
w
you probably want
remote_cache_requests_cached / (remote_cache_requests_cached + remote_cache_requests_uncached)
1. speculation might complete first, but be for a missed cache entry, so you don’t include it here 2. the reason not to use the
remote_cache_requests
value is again because of speculation: if the process finishes before the cache lookup, then a request will be canceled, and so we don’t know whether it was a hit or miss
p
Thanks Stu👍