37 if (!config.has_name() || !config.has_interval()) {
38 AERROR <<
"Missing required field in config file.";
48 auto role_attr = std::make_shared<proto::RoleAttributes>();
49 role_attr->set_node_name(config.
name());
50 role_attr->set_channel_name(statistics::TIMER_COMPONENT_CHAN_NAME);
51 statistics::Statistics::Instance()->RegisterChanVar(*role_attr);
53 std::shared_ptr<TimerComponent> self =
54 std::dynamic_pointer_cast<TimerComponent>(shared_from_this());
55 auto func = [self, role_attr]() {
60 statistics::Statistics::Instance()->SamplingProcLatency<
61 uint64_t>(*role_attr, (end_time-start_time)/1000);