]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/cache: remove derived metrics
authorYingxin Cheng <yingxin.cheng@intel.com>
Tue, 27 Jul 2021 08:50:52 +0000 (16:50 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 30 Jul 2021 01:42:22 +0000 (09:42 +0800)
Only keep the basic metrics to minimize the total number of metrics.

Derived metrics can be numerous according to different needs and can be
confusing with labels.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/cache.cc

index 82a5712fef4543ed743365c9cab7fa1614306670..2dcd402690553a4a2eabff053a44030be9809cce 100644 (file)
@@ -137,24 +137,6 @@ void Cache::register_metrics()
     register_trans_created(src);
   }
 
-  metrics.add_group(
-    "cache",
-    {
-      sm::make_counter(
-        "trans_created",
-        [this] {
-          uint64_t total = 0;
-          for (auto& v : stats.trans_created_by_src) {
-            total += v;
-          }
-          return total;
-        },
-        sm::description("total number of transaction created"),
-        {src_label("ALL")}
-      ),
-    }
-  );
-
   /*
    * trans_committed
    */
@@ -183,24 +165,6 @@ void Cache::register_metrics()
     register_trans_committed(src);
   }
 
-  metrics.add_group(
-    "cache",
-    {
-      sm::make_counter(
-        "trans_committed",
-        [this] {
-          uint64_t total = 0;
-          for (auto& v : stats.trans_committed_by_src) {
-            total += v;
-          }
-          return total;
-        },
-        sm::description("total number of transaction committed"),
-        {src_label("ALL")}
-      ),
-    }
-  );
-
   /*
    * trans_invalidated
    */