]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/driver/rados/rgw_sync_counters.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #include "common/ceph_context.h"
5 #include "rgw_sync_counters.h"
7 namespace sync_counters
{
9 PerfCountersRef
build(CephContext
*cct
, const std::string
& name
)
11 PerfCountersBuilder
b(cct
, name
, l_first
, l_last
);
13 // share these counters with ceph-mgr
14 b
.set_prio_default(PerfCountersBuilder::PRIO_USEFUL
);
16 b
.add_u64_avg(l_fetch
, "fetch_bytes", "Number of object bytes replicated");
17 b
.add_u64_counter(l_fetch_not_modified
, "fetch_not_modified", "Number of objects already replicated");
18 b
.add_u64_counter(l_fetch_err
, "fetch_errors", "Number of object replication errors");
20 b
.add_time_avg(l_poll
, "poll_latency", "Average latency of replication log requests");
21 b
.add_u64_counter(l_poll_err
, "poll_errors", "Number of replication log request errors");
23 auto logger
= PerfCountersRef
{ b
.create_perf_counters(), cct
};
24 cct
->get_perfcounters_collection()->add(logger
.get());
28 } // namespace sync_counters