osd_plb.add_time_avg(l_osd_tier_promote_lat, "osd_tier_promote_lat", "Object promote latency");
osd_plb.add_time_avg(l_osd_tier_r_lat, "osd_tier_r_lat", "Object proxy read latency");
+ osd_plb.add_u64_counter(l_osd_pg_info, "osd_pg_info",
+ "PG updated its info (using any method)");
+ osd_plb.add_u64_counter(l_osd_pg_fastinfo, "osd_pg_fastinfo",
+ "PG updated its info using fastinfo attr");
+ osd_plb.add_u64_counter(l_osd_pg_biginfo, "osd_pg_biginfo",
+ "PG updated its biginfo attr");
+
logger = osd_plb.create_perf_counters();
cct->get_perfcounters_collection()->add(logger);
}
#include "ScrubStore.h"
#include "common/Timer.h"
+#include "common/perf_counters.h"
#include "messages/MOSDOp.h"
#include "messages/MOSDPGNotify.h"
map<epoch_t,pg_interval_t> &past_intervals,
bool dirty_big_info,
bool dirty_epoch,
- bool try_fast_info)
+ bool try_fast_info,
+ PerfCounters *logger)
{
if (dirty_epoch) {
::encode(epoch, (*km)[epoch_key]);
}
+ if (logger)
+ logger->inc(l_osd_pg_info);
+
// try to do info efficiently?
if (!dirty_big_info && try_fast_info &&
info.last_update > last_written_info.last_update) {
assert(did); // we verified last_update increased above
if (info == last_written_info) {
::encode(fast, (*km)[fastinfo_key]);
+ if (logger)
+ logger->inc(l_osd_pg_fastinfo);
return 0;
}
generic_dout(30) << __func__ << " fastinfo failed, info:\n";
::encode(past_intervals, bigbl);
::encode(info.purged_snaps, bigbl);
//dout(20) << "write_info bigbl " << bigbl.length() << dendl;
+ if (logger)
+ logger->inc(l_osd_pg_biginfo);
}
return 0;
last_written_info,
past_intervals,
dirty_big_info, need_update_epoch,
- g_conf->osd_fast_info);
+ g_conf->osd_fast_info,
+ osd->logger);
assert(ret == 0);
if (need_update_epoch)
last_epoch = get_osdmap()->get_epoch();
map<epoch_t,pg_interval_t> &past_intervals,
bool dirty_big_info,
bool dirty_epoch,
- bool try_fast_info);
+ bool try_fast_info,
+ PerfCounters *logger = NULL);
void write_if_dirty(ObjectStore::Transaction& t);
eversion_t get_next_version() const {