diff --git a/rdsn b/rdsn index e946645a83..8379453692 160000 --- a/rdsn +++ b/rdsn @@ -1 +1 @@ -Subproject commit e946645a83d25932d13dfe3f3fc2c17d05e1c7d2 +Subproject commit 8379453692880cf24050eb37e135e1899ad6bc7d diff --git a/scripts/falcon_screen.json b/scripts/falcon_screen.json index 99a225605c..6a9436f205 100644 --- a/scripts/falcon_screen.json +++ b/scripts/falcon_screen.json @@ -700,6 +700,19 @@ "graph_type": "a", "method": "", "timespan": 86400 + }, + { + "title": "各节点 P99 RPC 报文长度", + "endpoints": ["cluster=${cluster.name} job=replica service=pegasus"], + "counters": [ + "zion*profiler*RPC_RRDB_RRDB_PUT.size.request.server/cluster=${cluster.name},job=replica,port=${replica.port},service=pegasus", + "zion*profiler*RPC_RRDB_RRDB_MULTI_PUT.size.request.server/cluster=${cluster.name},job=replica,port=${replica.port},service=pegasus", + "zion*profiler*RPC_RRDB_RRDB_GET.size.response.server/cluster=${cluster.name},job=replica,port=${replica.port},service=pegasus", + "zion*profiler*RPC_RRDB_RRDB_MULTI_GET.size.response.server/cluster=${cluster.name},job=replica,port=${replica.port},service=pegasus" + ], + "graph_type": "a", + "method": "", + "timespan": 86400 } ] } diff --git a/src/reporter/pegasus_counter_reporter.cpp b/src/reporter/pegasus_counter_reporter.cpp index 80fbb5ceed..4679b06a74 100644 --- a/src/reporter/pegasus_counter_reporter.cpp +++ b/src/reporter/pegasus_counter_reporter.cpp @@ -154,9 +154,9 @@ void pegasus_counter_reporter::update() oss << "logging perf counter(name, type, value):" << std::endl; oss << std::fixed << std::setprecision(2); perf_counters::instance().iterate_snapshot( - [&oss](const dsn::perf_counter_ptr &ptr, double val) { - oss << "[" << ptr->full_name() << ", " << dsn_counter_type_to_string(ptr->type()) - << ", " << val << "]" << std::endl; + [&oss](const dsn::perf_counters::counter_snapshot &cs) { + oss << "[" << cs.name << ", " << dsn_counter_type_to_string(cs.type) << ", " + << cs.value << "]" << std::endl; }); ddebug("%s", oss.str().c_str()); } @@ -168,9 +168,9 @@ void pegasus_counter_reporter::update() bool first_append = true; _falcon_metric.timestamp = timestamp; perf_counters::instance().iterate_snapshot( - [&oss, &first_append, this](const dsn::perf_counter_ptr &ptr, double val) { - _falcon_metric.metric = ptr->full_name(); - _falcon_metric.value = val; + [&oss, &first_append, this](const dsn::perf_counters::counter_snapshot &cs) { + _falcon_metric.metric = cs.name; + _falcon_metric.value = cs.value; _falcon_metric.counterType = "GAUGE"; if (!first_append) oss << ","; diff --git a/src/server/brief_stat.cpp b/src/server/brief_stat.cpp index 302d896d63..35f15703a5 100644 --- a/src/server/brief_stat.cpp +++ b/src/server/brief_stat.cpp @@ -47,10 +47,10 @@ std::string get_brief_stat() oss << std::fixed << std::setprecision(0); bool first_item = true; dsn::perf_counters::snapshot_iterator iter = - [&oss, &first_item](const dsn::perf_counter_ptr &counter, double value) mutable { + [&oss, &first_item](const dsn::perf_counters::counter_snapshot &cs) mutable { if (!first_item) oss << ", "; - oss << s_brief_stat_map.find(counter->full_name())->second << "=" << value; + oss << s_brief_stat_map.find(cs.name)->second << "=" << cs.value; first_item = false; }; std::vector match_result; diff --git a/src/server/config-server.ini b/src/server/config-server.ini index bf06063073..9cb04b861b 100644 --- a/src/server/config-server.ini +++ b/src/server/config-server.ini @@ -435,6 +435,7 @@ profiler::inqueue = false ;profiler::qps = false profiler::cancelled = false ;profiler::latency.server = false +profiler::size.request.server = true [task.RPC_RRDB_RRDB_PUT_ACK] is_profile = true @@ -449,6 +450,7 @@ profiler::inqueue = false ;profiler::qps = false profiler::cancelled = false ;profiler::latency.server = false +profiler::size.request.server = true [task.RPC_RRDB_RRDB_MULTI_PUT_ACK] is_profile = true @@ -533,6 +535,7 @@ profiler::inqueue = false ;profiler::qps = false profiler::cancelled = false ;profiler::latency.server = false +profiler::size.response.server = true [task.RPC_RRDB_RRDB_GET_ACK] is_profile = true @@ -541,6 +544,7 @@ is_profile = true rpc_request_throttling_mode = TM_DELAY rpc_request_delays_milliseconds = 1000, 1000, 1000, 1000, 1000, 10000 is_profile = true +profiler::size.response.server = true [task.RPC_RRDB_RRDB_SORTKEY_COUNT] rpc_request_throttling_mode = TM_DELAY diff --git a/src/server/config.ini b/src/server/config.ini index 84edfc33c5..d8aa012fd9 100644 --- a/src/server/config.ini +++ b/src/server/config.ini @@ -465,6 +465,7 @@ rpc_request_throttling_mode = TM_DELAY rpc_request_delays_milliseconds = 50, 50, 50, 50, 50, 100 is_profile = true + profiler::size.request.server = true [task.RPC_RRDB_RRDB_PUT_ACK] is_profile = true @@ -473,6 +474,7 @@ rpc_request_throttling_mode = TM_DELAY rpc_request_delays_milliseconds = 50, 50, 50, 50, 50, 100 is_profile = true + profiler::size.request.server = true [task.RPC_RRDB_RRDB_MULTI_PUT_ACK] is_profile = true @@ -521,6 +523,7 @@ rpc_request_throttling_mode = TM_DELAY rpc_request_delays_milliseconds = 50, 50, 50, 50, 50, 100 is_profile = true + profiler::size.response.server = true [task.RPC_RRDB_RRDB_GET_ACK] is_profile = true @@ -529,6 +532,7 @@ rpc_request_throttling_mode = TM_DELAY rpc_request_delays_milliseconds = 50, 50, 50, 50, 50, 100 is_profile = true + profiler::size.response.server = true [task.RPC_RRDB_RRDB_MULTI_GET_ACK] is_profile = true