process_artifacts: Diagnose cache hits

This patch adds --diagnose-cache-hits that analyzes a compact execlog to
diagnose cache hits.

Example output: https://paste.googleplex.com/4877861987287040

BUG=b:331890379
TEST=bazel test //bazel/portage/tools/process_artifacts:all

Change-Id: Ifca206f3f009881aefc7c544db3ce0ec7b07667f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/bazel/+/5528444
Commit-Queue: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
9 files changed