1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include "common/perf_counters.h"
7 #include <seastar/core/sharded.hh>
9 using crimson::common::PerfCountersCollectionImpl
;
10 namespace crimson::common
{
11 class PerfCountersCollection
: public seastar::sharded
<PerfCountersCollection
>
13 using ShardedPerfCountersCollection
= seastar::sharded
<PerfCountersCollection
>;
16 std::unique_ptr
<PerfCountersCollectionImpl
> perf_collection
;
17 static ShardedPerfCountersCollection sharded_perf_coll
;
18 friend PerfCountersCollection
& local_perf_coll();
19 friend ShardedPerfCountersCollection
& sharded_perf_coll();
22 PerfCountersCollection();
23 ~PerfCountersCollection();
24 PerfCountersCollectionImpl
* get_perf_collection();
28 inline PerfCountersCollection::ShardedPerfCountersCollection
& sharded_perf_coll(){
29 return PerfCountersCollection::sharded_perf_coll
;
32 inline PerfCountersCollection
& local_perf_coll() {
33 return PerfCountersCollection::sharded_perf_coll
.local();