From 069fb67bb0473e18b041d5888765bbb57112a417 Mon Sep 17 00:00:00 2001 From: Liubov Dmitrieva Date: Tue, 29 Oct 2024 04:45:24 -0700 Subject: [PATCH] cas: add .misses counters Summary: add .misses counters They are present for all other storages Reviewed By: lmvasquezg Differential Revision: D65083457 fbshipit-source-id: 5c42ae68261e0d68915c2f30b89be2bbfb7025ad --- eden/scm/lib/revisionstore/src/scmstore/file/fetch.rs | 1 + eden/scm/lib/revisionstore/src/scmstore/tree/fetch.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/eden/scm/lib/revisionstore/src/scmstore/file/fetch.rs b/eden/scm/lib/revisionstore/src/scmstore/file/fetch.rs index 9bfb79f16aafe..dd9f5efaaa9bd 100644 --- a/eden/scm/lib/revisionstore/src/scmstore/file/fetch.rs +++ b/eden/scm/lib/revisionstore/src/scmstore/file/fetch.rs @@ -898,6 +898,7 @@ impl FetchState { self.metrics.cas.fetch(keys_fetch_count); self.metrics.cas.err(error); self.metrics.cas.hit(keys_found_count); + self.metrics.cas.miss(keys_fetch_count - keys_found_count); self.metrics .cas_backend .zdb_bytes(total_stats.total_bytes_zdb); diff --git a/eden/scm/lib/revisionstore/src/scmstore/tree/fetch.rs b/eden/scm/lib/revisionstore/src/scmstore/tree/fetch.rs index 6fd06923cbc0e..da959a6c4f366 100644 --- a/eden/scm/lib/revisionstore/src/scmstore/tree/fetch.rs +++ b/eden/scm/lib/revisionstore/src/scmstore/tree/fetch.rs @@ -321,6 +321,7 @@ impl FetchState { self.metrics.cas.fetch(keys_fetch_count); self.metrics.cas.err(error); self.metrics.cas.hit(keys_found_count); + self.metrics.cas.miss(keys_fetch_count - keys_found_count); self.metrics .cas_backend .zdb_bytes(total_stats.total_bytes_zdb);