From 3acb2cb53e777e95dfca55e9f374b0a4a322159f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 19 May 2021 12:00:19 +0800 Subject: [PATCH] crimson/os: drop seastore_perf_counters.h it is not used anymore after the seastar::metrics migration Signed-off-by: Kefu Chai --- .../os/seastore/seastore_perf_counters.h | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/crimson/os/seastore/seastore_perf_counters.h diff --git a/src/crimson/os/seastore/seastore_perf_counters.h b/src/crimson/os/seastore/seastore_perf_counters.h deleted file mode 100644 index eb45524c313d3..0000000000000 --- a/src/crimson/os/seastore/seastore_perf_counters.h +++ /dev/null @@ -1,65 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -#pragma once - -#include "crimson/common/perf_counters_collection.h" - -namespace crimson::os::seastore { - -using PerfCountersRef = std::unique_ptr; -enum { - seastore_perfcounters_first = 30000, - ss_tm_extents_mutated_total, - ss_tm_extents_mutated_bytes, - ss_tm_extents_retired_total, - ss_tm_extents_retired_bytes, - ss_tm_extents_allocated_total, - ss_tm_extents_allocated_bytes, - seastore_perfcounters_last, -}; - -class PerfService { - PerfCountersRef build_seastore_perf() { - std::string name = fmt::format("seastore::shard-{}", seastar::this_shard_id()); - PerfCountersBuilder ss_plb(nullptr, name, seastore_perfcounters_first, - seastore_perfcounters_last); - ss_plb.add_u64_counter( - ss_tm_extents_mutated_total, "extents_mutated_num", - "the number of extents which have been mutated"); - ss_plb.add_u64_counter( - ss_tm_extents_mutated_bytes, "extents_mutated_bytes", - "the total bytes of extents which have been mutated"); - ss_plb.add_u64_counter( - ss_tm_extents_retired_total, "extents_retired_num", - "the number of extents which have been retired"); - ss_plb.add_u64_counter( - ss_tm_extents_retired_bytes, "extents_retired_bytes", - "the total bytes of extents which have been retired"); - ss_plb.add_u64_counter( - ss_tm_extents_allocated_total, "extents_allocated_num", - "the number of extents which have been allocated"); - ss_plb.add_u64_counter( - ss_tm_extents_allocated_bytes, "extents_allocated_bytes", - "the total bytes of extents which have been allocated"); - return PerfCountersRef(ss_plb.create_perf_counters()); - } - - PerfCountersRef ss_perf = nullptr; -public: - PerfService() - : ss_perf(build_seastore_perf()) {} - - ~PerfService() {} - - PerfCounters& get_counters() { - return *ss_perf; - } - void add_to_collection() { - crimson::common::local_perf_coll().get_perf_collection()->add(ss_perf.get()); - } - void remove_from_collection() { - crimson::common::local_perf_coll().get_perf_collection()->remove(ss_perf.get()); - } -}; -using PerfServiceRef = std::unique_ptr; -} -- 2.39.5