Bazel Record Cache如何命中
嗨,所有的Bazel用户,
我都在尝试了解Bazel的缓存命中率和动作执行环境的记录。
首先,我注意到有一个action_cache.proto文件,该文件提供有关缓存命中的信息。我可以假设这是本地缓存命中量计数吗?
其次,在ActionResult.java
类中,有一个布尔值本地删除的
,如果所有动作的产卵均已在本地执行,则返回true。在我的理解中,1动作= 1个产卵,这是否意味着1个动作= X产生,并且某些产卵可以在本地/远程执行?这会令人困惑,因为spawnstats.java
中的跑步者列表基于每个产卵,但是当在构建摘要(在控制台中)中打印时,我们可以看到该跑步者数量=操作数量。
最后,在spawnmetrics.java
中,我们可以找到不同的执行方式,即远程,本地,工作,其他
。我只是想知道Worker
是否属于本地执行?
感谢您的帮助!
Hi all the Bazel users,
I am trying to understand the logging of the cache hit and action execution environment in Bazel.
Firstly, I have noticed that there is a Action_cache.proto file which provides information about the cache hits. Can I assume that it is the local cache hits count?
Secondly, in ActionResult.java
class there is a boolean locallyExecuted
which returns true if all spawns of action were executed locally. In my understanding 1 action = 1 spawn, so does it mean 1 action = x spawn, and some spawns could be executed locally/remotely? That would be confusing since the runner's list in SpawnStats.java
is based on each spawn but when printed in the build summary (in the console) we can see that number of runners = number of actions.
Lastly, in SpawnMetrics.java
we can find the different execution kinds namely REMOTE, LOCAL, WORKER, OTHER
. I was just wondering if WORKER
belongs to local execution?
Thanks for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提到检查缓存率的计算此处
信息:7个过程:3个远程缓存命中,4个linux-sandbox。
这意味着这意味着在7次尝试的操作中,有3个远程缓存命中,而4个动作没有缓存命中,并且使用Linux-Sandbox策略在本地执行。本摘要中不包括本地缓存命中。如果您要获得0个进程(或比预期的数字低),则运行Bazel Clean,然后是您的build/test命令。
Calculations for checking the cache rate is mentioned here
INFO: 7 processes: 3 remote cache hit, 4 linux-sandbox.
This means that out of 7 attempted actions, 3 got a remote cache hit and 4 actions did not have cache hits and were executed locally using linux-sandbox strategy. Local cache hits are not included in this summary. If you are getting 0 processes (or a number lower than expected), run bazel clean followed by your build/test command.