//void PGMonitor::dump_object_stat_sum(stringstream& ss, Formatter *f,
void PGMonitor::dump_object_stat_sum(TextTable &tbl, Formatter *f,
object_stat_sum_t &sum, uint64_t avail,
- bool verbose)
+ bool verbose) const
{
if (f) {
f->dump_int("kb_used", SHIFT_ROUND_UP(sum.num_bytes, 10));
}
}
-int64_t PGMonitor::get_rule_avail(OSDMap& osdmap, int ruleno)
+int64_t PGMonitor::get_rule_avail(OSDMap& osdmap, int ruleno) const
{
map<int,float> wm;
int r = osdmap.crush->get_rule_weight_osd_map(ruleno, &wm);
}
}
-void PGMonitor::dump_fs_stats(stringstream &ss, Formatter *f, bool verbose)
+void PGMonitor::dump_fs_stats(stringstream &ss, Formatter *f, bool verbose) const
{
if (f) {
f->open_object_section("stats");
}
-void PGMonitor::dump_info(Formatter *f)
+void PGMonitor::dump_info(Formatter *f) const
{
f->open_object_section("pgmap");
pg_map.dump(f);
void dump_object_stat_sum(TextTable &tbl, Formatter *f,
object_stat_sum_t &sum,
uint64_t avail,
- bool verbose);
+ bool verbose) const;
- int64_t get_rule_avail(OSDMap& osdmap, int ruleno);
+ int64_t get_rule_avail(OSDMap& osdmap, int ruleno) const;
public:
PGMonitor(Monitor *mn, Paxos *p, const string& service_name)
void check_osd_map(epoch_t epoch);
void dump_pool_stats(stringstream &ss, Formatter *f, bool verbose);
- void dump_fs_stats(stringstream &ss, Formatter *f, bool verbose);
+ void dump_fs_stats(stringstream &ss, Formatter *f, bool verbose) const;
- void dump_info(Formatter *f);
+ void dump_info(Formatter *f) const;
int _warn_slow_request_histogram(const pow2_hist_t& h, string suffix,
list<pair<health_status_t,string> >& summary,
*
* @returns Our first committed version (that is available)
*/
- version_t get_first_committed() {
+ version_t get_first_committed() const{
return cached_first_committed;
}
/**
*
* @returns Our last committed version
*/
- version_t get_last_committed() {
+ version_t get_last_committed() const{
return cached_last_committed;
}