command == "perf schema") {
_perf_counters_collection->dump_formatted(f, true);
}
+ else if (command == "perf reset") {
+ std::string var;
+ if (!cmd_getval(this, cmdmap, "var", var)) {
+ f->dump_string("error", "syntax error: 'perf reset <var>'");
+ } else {
+ if(!_perf_counters_collection->reset(var))
+ f->dump_stream("error") << "Not find: " << var;
+ }
+ }
else {
- f->open_object_section(command.c_str());
+ string section = command;
+ boost::replace_all(section, " ", "_");
+ f->open_object_section(section.c_str());
if (command == "config show") {
_conf->show_config(f);
}