PerfCounters::avg_tracker<uint64_t> os_commit_latency;
PerfCounters::avg_tracker<uint64_t> os_apply_latency;
- filestore_perf_stat_t get_cur_stats() const {
- filestore_perf_stat_t ret;
+ objectstore_perf_stat_t get_cur_stats() const {
+ objectstore_perf_stat_t ret;
ret.filestore_commit_latency = os_commit_latency.avg();
ret.filestore_apply_latency = os_apply_latency.avg();
return ret;
void update_from_perfcounters(PerfCounters &logger);
} perf_tracker;
- filestore_perf_stat_t get_cur_stats() {
+ objectstore_perf_stat_t get_cur_stats() {
perf_tracker.update_from_perfcounters(*logger);
return perf_tracker.get_cur_stats();
}
return 0;
}
-filestore_perf_stat_t MemStore::get_cur_stats()
+objectstore_perf_stat_t MemStore::get_cur_stats()
{
// fixme
- return filestore_perf_stat_t();
+ return objectstore_perf_stat_t();
}
MemStore::CollectionRef MemStore::get_collection(coll_t cid)
void set_fsid(uuid_d u);
uuid_d get_fsid();
- filestore_perf_stat_t get_cur_stats();
+ objectstore_perf_stat_t get_cur_stats();
int queue_transactions(
Sequencer *osr, list<Transaction*>& tls,
Logger *logger;
- virtual filestore_perf_stat_t get_cur_stats() = 0;
+ virtual objectstore_perf_stat_t get_cur_stats() = 0;
/**
* a sequencer orders transactions
ls.back()->h.push_back(2);
}
-void filestore_perf_stat_t::dump(Formatter *f) const
+void objectstore_perf_stat_t::dump(Formatter *f) const
{
f->dump_unsigned("commit_latency_ms", filestore_commit_latency);
f->dump_unsigned("apply_latency_ms", filestore_apply_latency);
}
-void filestore_perf_stat_t::encode(bufferlist &bl) const
+void objectstore_perf_stat_t::encode(bufferlist &bl) const
{
ENCODE_START(1, 1, bl);
::encode(filestore_commit_latency, bl);
ENCODE_FINISH(bl);
}
-void filestore_perf_stat_t::decode(bufferlist::iterator &bl)
+void objectstore_perf_stat_t::decode(bufferlist::iterator &bl)
{
DECODE_START(1, bl);
::decode(filestore_commit_latency, bl);
DECODE_FINISH(bl);
}
-void filestore_perf_stat_t::generate_test_instances(std::list<filestore_perf_stat_t*>& o)
+void objectstore_perf_stat_t::generate_test_instances(std::list<objectstore_perf_stat_t*>& o)
{
- o.push_back(new filestore_perf_stat_t());
- o.push_back(new filestore_perf_stat_t());
+ o.push_back(new objectstore_perf_stat_t());
+ o.push_back(new objectstore_perf_stat_t());
o.back()->filestore_commit_latency = 20;
o.back()->filestore_apply_latency = 30;
}
}
/**
- * filestore_perf_stat_t
+ * objectstore_perf_stat_t
*
* current perf information about the osd
*/
-struct filestore_perf_stat_t {
+struct objectstore_perf_stat_t {
// cur_op_latency is in ms since double add/sub are not associative
uint32_t filestore_commit_latency;
uint32_t filestore_apply_latency;
- filestore_perf_stat_t() :
+ objectstore_perf_stat_t() :
filestore_commit_latency(0), filestore_apply_latency(0) {}
- void add(const filestore_perf_stat_t &o) {
+ void add(const objectstore_perf_stat_t &o) {
filestore_commit_latency += o.filestore_commit_latency;
filestore_apply_latency += o.filestore_apply_latency;
}
- void sub(const filestore_perf_stat_t &o) {
+ void sub(const objectstore_perf_stat_t &o) {
filestore_commit_latency -= o.filestore_commit_latency;
filestore_apply_latency -= o.filestore_apply_latency;
}
void dump(Formatter *f) const;
void encode(bufferlist &bl) const;
void decode(bufferlist::iterator &bl);
- static void generate_test_instances(std::list<filestore_perf_stat_t*>& o);
+ static void generate_test_instances(std::list<objectstore_perf_stat_t*>& o);
};
-WRITE_CLASS_ENCODER(filestore_perf_stat_t)
+WRITE_CLASS_ENCODER(objectstore_perf_stat_t)
/** osd_stat
* aggregate stats for an osd
pow2_hist_t op_queue_age_hist;
- filestore_perf_stat_t fs_perf_stat;
+ objectstore_perf_stat_t fs_perf_stat;
osd_stat_t() : kb(0), kb_used(0), kb_avail(0),
snap_trim_queue_len(0), num_snap_trimming(0) {}
TYPE(request_redirect_t)
TYPE(pg_t)
TYPE(coll_t)
-TYPE(filestore_perf_stat_t)
+TYPE(objectstore_perf_stat_t)
TYPE(osd_stat_t)
TYPE(OSDSuperblock)
TYPE_FEATUREFUL(pool_snap_info_t)