From ae3866bf6b58bd4a0f4c5d1f2e88e3dcea799213 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 4 May 2018 15:03:08 -0700 Subject: [PATCH 1/4] Try removing stats --- src/core/lib/debug/stats.h | 15 +- src/core/lib/debug/stats_data.h | 349 +++------- src/core/lib/iomgr/exec_ctx.h | 3 +- tools/codegen/core/gen_stats_data.py | 9 +- .../performance/massage_qps_stats.py | 629 +++++------------- 5 files changed, 300 insertions(+), 705 deletions(-) diff --git a/src/core/lib/debug/stats.h b/src/core/lib/debug/stats.h index 749665262aa..0c666742031 100644 --- a/src/core/lib/debug/stats.h +++ b/src/core/lib/debug/stats.h @@ -35,13 +35,14 @@ extern grpc_stats_data* grpc_stats_per_cpu_storage; #define GRPC_THREAD_STATS_DATA() \ (&grpc_stats_per_cpu_storage[grpc_core::ExecCtx::Get()->starting_cpu()]) -#define GRPC_STATS_INC_COUNTER(ctr) \ - (gpr_atm_no_barrier_fetch_add(&GRPC_THREAD_STATS_DATA()->counters[(ctr)], 1)) - -#define GRPC_STATS_INC_HISTOGRAM(histogram, index) \ - (gpr_atm_no_barrier_fetch_add( \ - &GRPC_THREAD_STATS_DATA()->histograms[histogram##_FIRST_SLOT + (index)], \ - 1)) +#define GRPC_STATS_INC_COUNTER(ctr) /* \ + (gpr_atm_no_barrier_fetch_add(&GRPC_THREAD_STATS_DATA()->counters[(ctr)], \ + 1))*/ + +#define GRPC_STATS_INC_HISTOGRAM(histogram, index) /* \ +(gpr_atm_no_barrier_fetch_add( \ +&GRPC_THREAD_STATS_DATA()->histograms[histogram##_FIRST_SLOT + (index)], \ +1))*/ void grpc_stats_init(void); void grpc_stats_shutdown(void); diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h index da1266ad736..f8e54c689d0 100644 --- a/src/core/lib/debug/stats_data.h +++ b/src/core/lib/debug/stats_data.h @@ -174,258 +174,127 @@ typedef enum { GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED_BUCKETS = 8, GRPC_STATS_HISTOGRAM_BUCKETS = 840 } grpc_stats_histogram_constants; -#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED) -#define GRPC_STATS_INC_SERVER_CALLS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CALLS_CREATED) -#define GRPC_STATS_INC_CQS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQS_CREATED) -#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CHANNELS_CREATED) -#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_SUBCHANNELS_CREATED) -#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CHANNELS_CREATED) -#define GRPC_STATS_INC_SYSCALL_POLL() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_POLL) -#define GRPC_STATS_INC_SYSCALL_WAIT() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WAIT) -#define GRPC_STATS_INC_POLLSET_KICK() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK) -#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_WITHOUT_POLLER) -#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_AGAIN) -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_FD) -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_CV) -#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_OWN_THREAD) -#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS) -#define GRPC_STATS_INC_SYSCALL_WRITE() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WRITE) -#define GRPC_STATS_INC_SYSCALL_READ() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_READ) -#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLERS_CREATED) -#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLER_POLLS) -#define GRPC_STATS_INC_HTTP2_OP_BATCHES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_BATCHES) -#define GRPC_STATS_INC_HTTP2_OP_CANCEL() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_CANCEL) -#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_INITIAL_METADATA) -#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_MESSAGE) -#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_TRAILING_METADATA) -#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_INITIAL_METADATA) -#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_MESSAGE) -#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA) -#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SETTINGS_WRITES) -#define GRPC_STATS_INC_HTTP2_PINGS_SENT() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PINGS_SENT) -#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN) -#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_OFFLOADED) -#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_CONTINUED) -#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PARTIAL_WRITES) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM) -#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN) -#define GRPC_STATS_INC_HPACK_RECV_INDEXED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_INDEXED) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX_V) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX_V) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX_V) -#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_UNCOMPRESSED) -#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_HUFFMAN) -#define GRPC_STATS_INC_HPACK_RECV_BINARY() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY) -#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY_BASE64) -#define GRPC_STATS_INC_HPACK_SEND_INDEXED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_INDEXED) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX_V) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX_V) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX_V) -#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_UNCOMPRESSED) -#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_HUFFMAN) -#define GRPC_STATS_INC_HPACK_SEND_BINARY() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY) -#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY_BASE64) -#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED) -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS) -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() \ - GRPC_STATS_INC_COUNTER( \ - GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS) -#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_OFFLOADED) -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_INITIATED) -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS) -#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_SET_NOTIFY_ON_CANCEL) -#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_CANCELLED) -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_SHORT_ITEMS) -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_LONG_ITEMS) -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_TO_SELF) -#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED) -#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED) -#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES) -#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_REQUESTED_CALLS) -#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_SLOWPATH_REQUESTS_QUEUED) -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_FAILURES) -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_SUCCESSES) -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() \ - GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES) -#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) \ - grpc_stats_inc_call_initial_size((int)(value)) +#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() +#define GRPC_STATS_INC_SERVER_CALLS_CREATED() +#define GRPC_STATS_INC_CQS_CREATED() +#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() +#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() +#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() +#define GRPC_STATS_INC_SYSCALL_POLL() +#define GRPC_STATS_INC_SYSCALL_WAIT() +#define GRPC_STATS_INC_POLLSET_KICK() +#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() +#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() +#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() +#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() +#define GRPC_STATS_INC_SYSCALL_WRITE() +#define GRPC_STATS_INC_SYSCALL_READ() +#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() +#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() +#define GRPC_STATS_INC_HTTP2_OP_BATCHES() +#define GRPC_STATS_INC_HTTP2_OP_CANCEL() +#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() +#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() +#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() +#define GRPC_STATS_INC_HTTP2_PINGS_SENT() +#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() +#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() +#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() +#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() +#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() +#define GRPC_STATS_INC_HPACK_RECV_INDEXED() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() +#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() +#define GRPC_STATS_INC_HPACK_RECV_BINARY() +#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() +#define GRPC_STATS_INC_HPACK_SEND_INDEXED() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() +#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() +#define GRPC_STATS_INC_HPACK_SEND_BINARY() +#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() +#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() +#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() +#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() +#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() +#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() +#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() +#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() +#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() +#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() +#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) void grpc_stats_inc_call_initial_size(int x); -#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) \ - grpc_stats_inc_poll_events_returned((int)(value)) +#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) void grpc_stats_inc_poll_events_returned(int x); -#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) \ - grpc_stats_inc_tcp_write_size((int)(value)) +#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) void grpc_stats_inc_tcp_write_size(int x); -#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) \ - grpc_stats_inc_tcp_write_iov_size((int)(value)) +#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) void grpc_stats_inc_tcp_write_iov_size(int x); -#define GRPC_STATS_INC_TCP_READ_SIZE(value) \ - grpc_stats_inc_tcp_read_size((int)(value)) +#define GRPC_STATS_INC_TCP_READ_SIZE(value) void grpc_stats_inc_tcp_read_size(int x); -#define GRPC_STATS_INC_TCP_READ_OFFER(value) \ - grpc_stats_inc_tcp_read_offer((int)(value)) +#define GRPC_STATS_INC_TCP_READ_OFFER(value) void grpc_stats_inc_tcp_read_offer(int x); -#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) \ - grpc_stats_inc_tcp_read_offer_iov_size((int)(value)) +#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) void grpc_stats_inc_tcp_read_offer_iov_size(int x); -#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) \ - grpc_stats_inc_http2_send_message_size((int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) void grpc_stats_inc_http2_send_message_size(int x); -#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) \ - grpc_stats_inc_http2_send_initial_metadata_per_write((int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) void grpc_stats_inc_http2_send_initial_metadata_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) \ - grpc_stats_inc_http2_send_message_per_write((int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) void grpc_stats_inc_http2_send_message_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) \ - grpc_stats_inc_http2_send_trailing_metadata_per_write((int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) void grpc_stats_inc_http2_send_trailing_metadata_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) \ - grpc_stats_inc_http2_send_flowctl_per_write((int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) void grpc_stats_inc_http2_send_flowctl_per_write(int x); -#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) \ - grpc_stats_inc_server_cqs_checked((int)(value)) +#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) void grpc_stats_inc_server_cqs_checked(int x); extern const int grpc_stats_histo_buckets[13]; extern const int grpc_stats_histo_start[13]; diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 72d0ae58c10..eedc66f24e7 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -102,7 +102,7 @@ class ExecCtx { ExecCtx& operator=(const ExecCtx&) = delete; /** Return starting_cpu */ - unsigned starting_cpu() const { return starting_cpu_; } + // unsigned starting_cpu() const { return starting_cpu_; } struct CombinerData { /* currently active combiner: updated only via combiner.c */ @@ -197,7 +197,6 @@ on outside context */ grpc_closure_list closure_list_ = GRPC_CLOSURE_LIST_INIT; CombinerData combiner_data_ = {nullptr, nullptr}; uintptr_t flags_; - unsigned starting_cpu_ = gpr_cpu_current_cpu(); bool now_is_valid_ = false; grpc_millis now_ = 0; diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py index 3ebd00d049f..1f443ac1d00 100755 --- a/tools/codegen/core/gen_stats_data.py +++ b/tools/codegen/core/gen_stats_data.py @@ -266,12 +266,11 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: print >> H, "} grpc_stats_histogram_constants;" for ctr in inst_map['Counter']: - print >> H, ("#define GRPC_STATS_INC_%s() " + - "GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_%s)") % ( - ctr.name.upper(), ctr.name.upper()) + print >> H, ("#define GRPC_STATS_INC_%s() ") % ( + ctr.name.upper()) for histogram in inst_map['Histogram']: - print >> H, "#define GRPC_STATS_INC_%s(value) grpc_stats_inc_%s( (int)(value))" % ( - histogram.name.upper(), histogram.name.lower()) + print >> H, "#define GRPC_STATS_INC_%s(value)" % ( + histogram.name.upper()) print >> H, "void grpc_stats_inc_%s(int x);" % histogram.name.lower() for i, tbl in enumerate(static_tables): diff --git a/tools/run_tests/performance/massage_qps_stats.py b/tools/run_tests/performance/massage_qps_stats.py index 790202c43ee..48c57581a52 100644 --- a/tools/run_tests/performance/massage_qps_stats.py +++ b/tools/run_tests/performance/massage_qps_stats.py @@ -15,455 +15,182 @@ # Autogenerated by tools/codegen/core/gen_stats_data.py import massage_qps_stats_helpers - - def massage_qps_stats(scenario_result): - for stats in scenario_result["serverStats"] + scenario_result["clientStats"]: - if "coreStats" not in stats: return - core_stats = stats["coreStats"] - del stats["coreStats"] - stats["core_client_calls_created"] = massage_qps_stats_helpers.counter( - core_stats, "client_calls_created") - stats["core_server_calls_created"] = massage_qps_stats_helpers.counter( - core_stats, "server_calls_created") - stats["core_cqs_created"] = massage_qps_stats_helpers.counter( - core_stats, "cqs_created") - stats[ - "core_client_channels_created"] = massage_qps_stats_helpers.counter( - core_stats, "client_channels_created") - stats[ - "core_client_subchannels_created"] = massage_qps_stats_helpers.counter( - core_stats, "client_subchannels_created") - stats[ - "core_server_channels_created"] = massage_qps_stats_helpers.counter( - core_stats, "server_channels_created") - stats["core_syscall_poll"] = massage_qps_stats_helpers.counter( - core_stats, "syscall_poll") - stats["core_syscall_wait"] = massage_qps_stats_helpers.counter( - core_stats, "syscall_wait") - stats["core_pollset_kick"] = massage_qps_stats_helpers.counter( - core_stats, "pollset_kick") - stats[ - "core_pollset_kicked_without_poller"] = massage_qps_stats_helpers.counter( - core_stats, "pollset_kicked_without_poller") - stats["core_pollset_kicked_again"] = massage_qps_stats_helpers.counter( - core_stats, "pollset_kicked_again") - stats[ - "core_pollset_kick_wakeup_fd"] = massage_qps_stats_helpers.counter( - core_stats, "pollset_kick_wakeup_fd") - stats[ - "core_pollset_kick_wakeup_cv"] = massage_qps_stats_helpers.counter( - core_stats, "pollset_kick_wakeup_cv") - stats[ - "core_pollset_kick_own_thread"] = massage_qps_stats_helpers.counter( - core_stats, "pollset_kick_own_thread") - stats[ - "core_histogram_slow_lookups"] = massage_qps_stats_helpers.counter( - core_stats, "histogram_slow_lookups") - stats["core_syscall_write"] = massage_qps_stats_helpers.counter( - core_stats, "syscall_write") - stats["core_syscall_read"] = massage_qps_stats_helpers.counter( - core_stats, "syscall_read") - stats[ - "core_tcp_backup_pollers_created"] = massage_qps_stats_helpers.counter( - core_stats, "tcp_backup_pollers_created") - stats[ - "core_tcp_backup_poller_polls"] = massage_qps_stats_helpers.counter( - core_stats, "tcp_backup_poller_polls") - stats["core_http2_op_batches"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_batches") - stats["core_http2_op_cancel"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_cancel") - stats[ - "core_http2_op_send_initial_metadata"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_send_initial_metadata") - stats["core_http2_op_send_message"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_send_message") - stats[ - "core_http2_op_send_trailing_metadata"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_send_trailing_metadata") - stats[ - "core_http2_op_recv_initial_metadata"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_recv_initial_metadata") - stats["core_http2_op_recv_message"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_recv_message") - stats[ - "core_http2_op_recv_trailing_metadata"] = massage_qps_stats_helpers.counter( - core_stats, "http2_op_recv_trailing_metadata") - stats["core_http2_settings_writes"] = massage_qps_stats_helpers.counter( - core_stats, "http2_settings_writes") - stats["core_http2_pings_sent"] = massage_qps_stats_helpers.counter( - core_stats, "http2_pings_sent") - stats["core_http2_writes_begun"] = massage_qps_stats_helpers.counter( - core_stats, "http2_writes_begun") - stats[ - "core_http2_writes_offloaded"] = massage_qps_stats_helpers.counter( - core_stats, "http2_writes_offloaded") - stats[ - "core_http2_writes_continued"] = massage_qps_stats_helpers.counter( - core_stats, "http2_writes_continued") - stats["core_http2_partial_writes"] = massage_qps_stats_helpers.counter( - core_stats, "http2_partial_writes") - stats[ - "core_http2_initiate_write_due_to_initial_write"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_initial_write") - stats[ - "core_http2_initiate_write_due_to_start_new_stream"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_start_new_stream") - stats[ - "core_http2_initiate_write_due_to_send_message"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_send_message") - stats[ - "core_http2_initiate_write_due_to_send_initial_metadata"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_send_initial_metadata") - stats[ - "core_http2_initiate_write_due_to_send_trailing_metadata"] = massage_qps_stats_helpers.counter( - core_stats, - "http2_initiate_write_due_to_send_trailing_metadata") - stats[ - "core_http2_initiate_write_due_to_retry_send_ping"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_retry_send_ping") - stats[ - "core_http2_initiate_write_due_to_continue_pings"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_continue_pings") - stats[ - "core_http2_initiate_write_due_to_goaway_sent"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_goaway_sent") - stats[ - "core_http2_initiate_write_due_to_rst_stream"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_rst_stream") - stats[ - "core_http2_initiate_write_due_to_close_from_api"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_close_from_api") - stats[ - "core_http2_initiate_write_due_to_stream_flow_control"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_stream_flow_control") - stats[ - "core_http2_initiate_write_due_to_transport_flow_control"] = massage_qps_stats_helpers.counter( - core_stats, - "http2_initiate_write_due_to_transport_flow_control") - stats[ - "core_http2_initiate_write_due_to_send_settings"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_send_settings") - stats[ - "core_http2_initiate_write_due_to_bdp_estimator_ping"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_bdp_estimator_ping") - stats[ - "core_http2_initiate_write_due_to_flow_control_unstalled_by_setting"] = massage_qps_stats_helpers.counter( - core_stats, - "http2_initiate_write_due_to_flow_control_unstalled_by_setting") - stats[ - "core_http2_initiate_write_due_to_flow_control_unstalled_by_update"] = massage_qps_stats_helpers.counter( - core_stats, - "http2_initiate_write_due_to_flow_control_unstalled_by_update") - stats[ - "core_http2_initiate_write_due_to_application_ping"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_application_ping") - stats[ - "core_http2_initiate_write_due_to_keepalive_ping"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_keepalive_ping") - stats[ - "core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter( - core_stats, - "http2_initiate_write_due_to_transport_flow_control_unstalled") - stats[ - "core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_ping_response") - stats[ - "core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter( - core_stats, "http2_initiate_write_due_to_force_rst_stream") - stats[ - "core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter( - core_stats, "http2_spurious_writes_begun") - stats["core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_indexed") - stats[ - "core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_lithdr_incidx") - stats[ - "core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_lithdr_incidx_v") - stats[ - "core_hpack_recv_lithdr_notidx"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_lithdr_notidx") - stats[ - "core_hpack_recv_lithdr_notidx_v"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_lithdr_notidx_v") - stats[ - "core_hpack_recv_lithdr_nvridx"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_lithdr_nvridx") - stats[ - "core_hpack_recv_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_lithdr_nvridx_v") - stats[ - "core_hpack_recv_uncompressed"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_uncompressed") - stats["core_hpack_recv_huffman"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_huffman") - stats["core_hpack_recv_binary"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_binary") - stats[ - "core_hpack_recv_binary_base64"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_recv_binary_base64") - stats["core_hpack_send_indexed"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_indexed") - stats[ - "core_hpack_send_lithdr_incidx"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_lithdr_incidx") - stats[ - "core_hpack_send_lithdr_incidx_v"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_lithdr_incidx_v") - stats[ - "core_hpack_send_lithdr_notidx"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_lithdr_notidx") - stats[ - "core_hpack_send_lithdr_notidx_v"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_lithdr_notidx_v") - stats[ - "core_hpack_send_lithdr_nvridx"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_lithdr_nvridx") - stats[ - "core_hpack_send_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_lithdr_nvridx_v") - stats[ - "core_hpack_send_uncompressed"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_uncompressed") - stats["core_hpack_send_huffman"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_huffman") - stats["core_hpack_send_binary"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_binary") - stats[ - "core_hpack_send_binary_base64"] = massage_qps_stats_helpers.counter( - core_stats, "hpack_send_binary_base64") - stats[ - "core_combiner_locks_initiated"] = massage_qps_stats_helpers.counter( - core_stats, "combiner_locks_initiated") - stats[ - "core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter( - core_stats, "combiner_locks_scheduled_items") - stats[ - "core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter( - core_stats, "combiner_locks_scheduled_final_items") - stats[ - "core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter( - core_stats, "combiner_locks_offloaded") - stats[ - "core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter( - core_stats, "call_combiner_locks_initiated") - stats[ - "core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter( - core_stats, "call_combiner_locks_scheduled_items") - stats[ - "core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter( - core_stats, "call_combiner_set_notify_on_cancel") - stats[ - "core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter( - core_stats, "call_combiner_cancelled") - stats[ - "core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter( - core_stats, "executor_scheduled_short_items") - stats[ - "core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter( - core_stats, "executor_scheduled_long_items") - stats[ - "core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter( - core_stats, "executor_scheduled_to_self") - stats[ - "core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter( - core_stats, "executor_wakeup_initiated") - stats[ - "core_executor_queue_drained"] = massage_qps_stats_helpers.counter( - core_stats, "executor_queue_drained") - stats["core_executor_push_retries"] = massage_qps_stats_helpers.counter( - core_stats, "executor_push_retries") - stats[ - "core_server_requested_calls"] = massage_qps_stats_helpers.counter( - core_stats, "server_requested_calls") - stats[ - "core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter( - core_stats, "server_slowpath_requests_queued") - stats[ - "core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter( - core_stats, "cq_ev_queue_trylock_failures") - stats[ - "core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter( - core_stats, "cq_ev_queue_trylock_successes") - stats[ - "core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter( - core_stats, "cq_ev_queue_transient_pop_failures") - h = massage_qps_stats_helpers.histogram(core_stats, "call_initial_size") - stats["core_call_initial_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_call_initial_size_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_call_initial_size_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_call_initial_size_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_call_initial_size_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "poll_events_returned") - stats["core_poll_events_returned"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_poll_events_returned_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_poll_events_returned_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_poll_events_returned_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_poll_events_returned_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_write_size") - stats["core_tcp_write_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_write_size_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats["core_tcp_write_size_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats["core_tcp_write_size_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats["core_tcp_write_size_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "tcp_write_iov_size") - stats["core_tcp_write_iov_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_write_iov_size_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_tcp_write_iov_size_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_tcp_write_iov_size_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_tcp_write_iov_size_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_size") - stats["core_tcp_read_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_read_size_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats["core_tcp_read_size_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats["core_tcp_read_size_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats["core_tcp_read_size_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_offer") - stats["core_tcp_read_offer"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_read_offer_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats["core_tcp_read_offer_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats["core_tcp_read_offer_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats["core_tcp_read_offer_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "tcp_read_offer_iov_size") - stats["core_tcp_read_offer_iov_size"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_tcp_read_offer_iov_size_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_tcp_read_offer_iov_size_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_tcp_read_offer_iov_size_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_tcp_read_offer_iov_size_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "http2_send_message_size") - stats["core_http2_send_message_size"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_http2_send_message_size_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_http2_send_message_size_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_http2_send_message_size_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_http2_send_message_size_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram( - core_stats, "http2_send_initial_metadata_per_write") - stats["core_http2_send_initial_metadata_per_write"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_http2_send_initial_metadata_per_write_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_http2_send_initial_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_http2_send_initial_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_http2_send_initial_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "http2_send_message_per_write") - stats["core_http2_send_message_per_write"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_http2_send_message_per_write_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_http2_send_message_per_write_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_http2_send_message_per_write_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_http2_send_message_per_write_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram( - core_stats, "http2_send_trailing_metadata_per_write") - stats["core_http2_send_trailing_metadata_per_write"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_http2_send_trailing_metadata_per_write_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_http2_send_trailing_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_http2_send_trailing_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_http2_send_trailing_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "http2_send_flowctl_per_write") - stats["core_http2_send_flowctl_per_write"] = ",".join( - "%f" % x for x in h.buckets) - stats["core_http2_send_flowctl_per_write_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, - "server_cqs_checked") - stats["core_server_cqs_checked"] = ",".join("%f" % x for x in h.buckets) - stats["core_server_cqs_checked_bkts"] = ",".join( - "%f" % x for x in h.boundaries) - stats[ - "core_server_cqs_checked_50p"] = massage_qps_stats_helpers.percentile( - h.buckets, 50, h.boundaries) - stats[ - "core_server_cqs_checked_95p"] = massage_qps_stats_helpers.percentile( - h.buckets, 95, h.boundaries) - stats[ - "core_server_cqs_checked_99p"] = massage_qps_stats_helpers.percentile( - h.buckets, 99, h.boundaries) + for stats in scenario_result["serverStats"] + scenario_result["clientStats"]: + if "coreStats" not in stats: return + core_stats = stats["coreStats"] + del stats["coreStats"] + stats["core_client_calls_created"] = massage_qps_stats_helpers.counter(core_stats, "client_calls_created") + stats["core_server_calls_created"] = massage_qps_stats_helpers.counter(core_stats, "server_calls_created") + stats["core_cqs_created"] = massage_qps_stats_helpers.counter(core_stats, "cqs_created") + stats["core_client_channels_created"] = massage_qps_stats_helpers.counter(core_stats, "client_channels_created") + stats["core_client_subchannels_created"] = massage_qps_stats_helpers.counter(core_stats, "client_subchannels_created") + stats["core_server_channels_created"] = massage_qps_stats_helpers.counter(core_stats, "server_channels_created") + stats["core_syscall_poll"] = massage_qps_stats_helpers.counter(core_stats, "syscall_poll") + stats["core_syscall_wait"] = massage_qps_stats_helpers.counter(core_stats, "syscall_wait") + stats["core_pollset_kick"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick") + stats["core_pollset_kicked_without_poller"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kicked_without_poller") + stats["core_pollset_kicked_again"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kicked_again") + stats["core_pollset_kick_wakeup_fd"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick_wakeup_fd") + stats["core_pollset_kick_wakeup_cv"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick_wakeup_cv") + stats["core_pollset_kick_own_thread"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick_own_thread") + stats["core_histogram_slow_lookups"] = massage_qps_stats_helpers.counter(core_stats, "histogram_slow_lookups") + stats["core_syscall_write"] = massage_qps_stats_helpers.counter(core_stats, "syscall_write") + stats["core_syscall_read"] = massage_qps_stats_helpers.counter(core_stats, "syscall_read") + stats["core_tcp_backup_pollers_created"] = massage_qps_stats_helpers.counter(core_stats, "tcp_backup_pollers_created") + stats["core_tcp_backup_poller_polls"] = massage_qps_stats_helpers.counter(core_stats, "tcp_backup_poller_polls") + stats["core_http2_op_batches"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_batches") + stats["core_http2_op_cancel"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_cancel") + stats["core_http2_op_send_initial_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_send_initial_metadata") + stats["core_http2_op_send_message"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_send_message") + stats["core_http2_op_send_trailing_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_send_trailing_metadata") + stats["core_http2_op_recv_initial_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_recv_initial_metadata") + stats["core_http2_op_recv_message"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_recv_message") + stats["core_http2_op_recv_trailing_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_recv_trailing_metadata") + stats["core_http2_settings_writes"] = massage_qps_stats_helpers.counter(core_stats, "http2_settings_writes") + stats["core_http2_pings_sent"] = massage_qps_stats_helpers.counter(core_stats, "http2_pings_sent") + stats["core_http2_writes_begun"] = massage_qps_stats_helpers.counter(core_stats, "http2_writes_begun") + stats["core_http2_writes_offloaded"] = massage_qps_stats_helpers.counter(core_stats, "http2_writes_offloaded") + stats["core_http2_writes_continued"] = massage_qps_stats_helpers.counter(core_stats, "http2_writes_continued") + stats["core_http2_partial_writes"] = massage_qps_stats_helpers.counter(core_stats, "http2_partial_writes") + stats["core_http2_initiate_write_due_to_initial_write"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_initial_write") + stats["core_http2_initiate_write_due_to_start_new_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_start_new_stream") + stats["core_http2_initiate_write_due_to_send_message"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_message") + stats["core_http2_initiate_write_due_to_send_initial_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_initial_metadata") + stats["core_http2_initiate_write_due_to_send_trailing_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_trailing_metadata") + stats["core_http2_initiate_write_due_to_retry_send_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_retry_send_ping") + stats["core_http2_initiate_write_due_to_continue_pings"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_continue_pings") + stats["core_http2_initiate_write_due_to_goaway_sent"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_goaway_sent") + stats["core_http2_initiate_write_due_to_rst_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_rst_stream") + stats["core_http2_initiate_write_due_to_close_from_api"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_close_from_api") + stats["core_http2_initiate_write_due_to_stream_flow_control"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_stream_flow_control") + stats["core_http2_initiate_write_due_to_transport_flow_control"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_transport_flow_control") + stats["core_http2_initiate_write_due_to_send_settings"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_settings") + stats["core_http2_initiate_write_due_to_bdp_estimator_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_bdp_estimator_ping") + stats["core_http2_initiate_write_due_to_flow_control_unstalled_by_setting"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_flow_control_unstalled_by_setting") + stats["core_http2_initiate_write_due_to_flow_control_unstalled_by_update"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_flow_control_unstalled_by_update") + stats["core_http2_initiate_write_due_to_application_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_application_ping") + stats["core_http2_initiate_write_due_to_keepalive_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_keepalive_ping") + stats["core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_transport_flow_control_unstalled") + stats["core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_ping_response") + stats["core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_force_rst_stream") + stats["core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter(core_stats, "http2_spurious_writes_begun") + stats["core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_indexed") + stats["core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_incidx") + stats["core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_incidx_v") + stats["core_hpack_recv_lithdr_notidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_notidx") + stats["core_hpack_recv_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_notidx_v") + stats["core_hpack_recv_lithdr_nvridx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_nvridx") + stats["core_hpack_recv_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_nvridx_v") + stats["core_hpack_recv_uncompressed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_uncompressed") + stats["core_hpack_recv_huffman"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_huffman") + stats["core_hpack_recv_binary"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_binary") + stats["core_hpack_recv_binary_base64"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_binary_base64") + stats["core_hpack_send_indexed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_indexed") + stats["core_hpack_send_lithdr_incidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_incidx") + stats["core_hpack_send_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_incidx_v") + stats["core_hpack_send_lithdr_notidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_notidx") + stats["core_hpack_send_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_notidx_v") + stats["core_hpack_send_lithdr_nvridx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_nvridx") + stats["core_hpack_send_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_nvridx_v") + stats["core_hpack_send_uncompressed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_uncompressed") + stats["core_hpack_send_huffman"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_huffman") + stats["core_hpack_send_binary"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_binary") + stats["core_hpack_send_binary_base64"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_binary_base64") + stats["core_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_initiated") + stats["core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_items") + stats["core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_final_items") + stats["core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_offloaded") + stats["core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_locks_initiated") + stats["core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_locks_scheduled_items") + stats["core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_set_notify_on_cancel") + stats["core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_cancelled") + stats["core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_short_items") + stats["core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_long_items") + stats["core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_to_self") + stats["core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter(core_stats, "executor_wakeup_initiated") + stats["core_executor_queue_drained"] = massage_qps_stats_helpers.counter(core_stats, "executor_queue_drained") + stats["core_executor_push_retries"] = massage_qps_stats_helpers.counter(core_stats, "executor_push_retries") + stats["core_server_requested_calls"] = massage_qps_stats_helpers.counter(core_stats, "server_requested_calls") + stats["core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter(core_stats, "server_slowpath_requests_queued") + stats["core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_trylock_failures") + stats["core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_trylock_successes") + stats["core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_transient_pop_failures") + h = massage_qps_stats_helpers.histogram(core_stats, "call_initial_size") + stats["core_call_initial_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_call_initial_size_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_call_initial_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_call_initial_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_call_initial_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "poll_events_returned") + stats["core_poll_events_returned"] = ",".join("%f" % x for x in h.buckets) + stats["core_poll_events_returned_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_poll_events_returned_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_poll_events_returned_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_poll_events_returned_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_write_size") + stats["core_tcp_write_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_write_size_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_tcp_write_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_tcp_write_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_tcp_write_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_write_iov_size") + stats["core_tcp_write_iov_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_write_iov_size_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_tcp_write_iov_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_tcp_write_iov_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_tcp_write_iov_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_size") + stats["core_tcp_read_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_read_size_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_tcp_read_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_tcp_read_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_tcp_read_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_offer") + stats["core_tcp_read_offer"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_read_offer_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_tcp_read_offer_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_tcp_read_offer_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_tcp_read_offer_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_offer_iov_size") + stats["core_tcp_read_offer_iov_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_read_offer_iov_size_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_tcp_read_offer_iov_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_tcp_read_offer_iov_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_tcp_read_offer_iov_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_message_size") + stats["core_http2_send_message_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_http2_send_message_size_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_http2_send_message_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_http2_send_message_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_http2_send_message_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_initial_metadata_per_write") + stats["core_http2_send_initial_metadata_per_write"] = ",".join("%f" % x for x in h.buckets) + stats["core_http2_send_initial_metadata_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_http2_send_initial_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_http2_send_initial_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_http2_send_initial_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_message_per_write") + stats["core_http2_send_message_per_write"] = ",".join("%f" % x for x in h.buckets) + stats["core_http2_send_message_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_http2_send_message_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_http2_send_message_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_http2_send_message_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_trailing_metadata_per_write") + stats["core_http2_send_trailing_metadata_per_write"] = ",".join("%f" % x for x in h.buckets) + stats["core_http2_send_trailing_metadata_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_http2_send_trailing_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_http2_send_trailing_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_http2_send_trailing_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_flowctl_per_write") + stats["core_http2_send_flowctl_per_write"] = ",".join("%f" % x for x in h.buckets) + stats["core_http2_send_flowctl_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "server_cqs_checked") + stats["core_server_cqs_checked"] = ",".join("%f" % x for x in h.buckets) + stats["core_server_cqs_checked_bkts"] = ",".join("%f" % x for x in h.boundaries) + stats["core_server_cqs_checked_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) + stats["core_server_cqs_checked_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) + stats["core_server_cqs_checked_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) From 519d2b1fae0657c57acfeec51cf0d56938addf18 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 14 May 2018 15:17:43 -0700 Subject: [PATCH 2/4] Cleanup stats removal for opt build. Stats will only be collected on debug builds or if GRPC_COLLECT_STATS is defined. --- src/core/lib/debug/stats.h | 22 +- src/core/lib/debug/stats_data.cc | 1062 ++++++++------------- src/core/lib/debug/stats_data.h | 346 ++++--- src/core/lib/iomgr/exec_ctx.h | 44 +- test/core/debug/stats_test.cc | 5 + test/core/end2end/tests/simple_request.cc | 2 + tools/codegen/core/gen_stats_data.py | 13 +- 7 files changed, 711 insertions(+), 783 deletions(-) diff --git a/src/core/lib/debug/stats.h b/src/core/lib/debug/stats.h index 0c666742031..9e88ad7000f 100644 --- a/src/core/lib/debug/stats.h +++ b/src/core/lib/debug/stats.h @@ -35,14 +35,20 @@ extern grpc_stats_data* grpc_stats_per_cpu_storage; #define GRPC_THREAD_STATS_DATA() \ (&grpc_stats_per_cpu_storage[grpc_core::ExecCtx::Get()->starting_cpu()]) -#define GRPC_STATS_INC_COUNTER(ctr) /* \ - (gpr_atm_no_barrier_fetch_add(&GRPC_THREAD_STATS_DATA()->counters[(ctr)], \ - 1))*/ - -#define GRPC_STATS_INC_HISTOGRAM(histogram, index) /* \ -(gpr_atm_no_barrier_fetch_add( \ -&GRPC_THREAD_STATS_DATA()->histograms[histogram##_FIRST_SLOT + (index)], \ -1))*/ +/* Only collect stats if GRPC_COLLECT_STATS is defined or it is a debug build. + */ +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) +#define GRPC_STATS_INC_COUNTER(ctr) \ + (gpr_atm_no_barrier_fetch_add(&GRPC_THREAD_STATS_DATA()->counters[(ctr)], 1)) + +#define GRPC_STATS_INC_HISTOGRAM(histogram, index) \ + (gpr_atm_no_barrier_fetch_add( \ + &GRPC_THREAD_STATS_DATA()->histograms[histogram##_FIRST_SLOT + (index)], \ + 1)) +#else /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ +#define GRPC_STATS_INC_COUNTER(ctr) +#define GRPC_STATS_INC_HISTOGRAM(histogram, index) +#endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ void grpc_stats_init(void); void grpc_stats_shutdown(void); diff --git a/src/core/lib/debug/stats_data.cc b/src/core/lib/debug/stats_data.cc index 309ece94bb8..b4b179f1570 100644 --- a/src/core/lib/debug/stats_data.cc +++ b/src/core/lib/debug/stats_data.cc @@ -1,12 +1,12 @@ /* * Copyright 2017 gRPC authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,658 +25,438 @@ #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/exec_ctx.h" -const char* grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = { - "client_calls_created", - "server_calls_created", - "cqs_created", - "client_channels_created", - "client_subchannels_created", - "server_channels_created", - "syscall_poll", - "syscall_wait", - "pollset_kick", - "pollset_kicked_without_poller", - "pollset_kicked_again", - "pollset_kick_wakeup_fd", - "pollset_kick_wakeup_cv", - "pollset_kick_own_thread", - "histogram_slow_lookups", - "syscall_write", - "syscall_read", - "tcp_backup_pollers_created", - "tcp_backup_poller_polls", - "http2_op_batches", - "http2_op_cancel", - "http2_op_send_initial_metadata", - "http2_op_send_message", - "http2_op_send_trailing_metadata", - "http2_op_recv_initial_metadata", - "http2_op_recv_message", - "http2_op_recv_trailing_metadata", - "http2_settings_writes", - "http2_pings_sent", - "http2_writes_begun", - "http2_writes_offloaded", - "http2_writes_continued", - "http2_partial_writes", - "http2_initiate_write_due_to_initial_write", - "http2_initiate_write_due_to_start_new_stream", - "http2_initiate_write_due_to_send_message", - "http2_initiate_write_due_to_send_initial_metadata", - "http2_initiate_write_due_to_send_trailing_metadata", - "http2_initiate_write_due_to_retry_send_ping", - "http2_initiate_write_due_to_continue_pings", - "http2_initiate_write_due_to_goaway_sent", - "http2_initiate_write_due_to_rst_stream", - "http2_initiate_write_due_to_close_from_api", - "http2_initiate_write_due_to_stream_flow_control", - "http2_initiate_write_due_to_transport_flow_control", - "http2_initiate_write_due_to_send_settings", - "http2_initiate_write_due_to_bdp_estimator_ping", - "http2_initiate_write_due_to_flow_control_unstalled_by_setting", - "http2_initiate_write_due_to_flow_control_unstalled_by_update", - "http2_initiate_write_due_to_application_ping", - "http2_initiate_write_due_to_keepalive_ping", - "http2_initiate_write_due_to_transport_flow_control_unstalled", - "http2_initiate_write_due_to_ping_response", - "http2_initiate_write_due_to_force_rst_stream", - "http2_spurious_writes_begun", - "hpack_recv_indexed", - "hpack_recv_lithdr_incidx", - "hpack_recv_lithdr_incidx_v", - "hpack_recv_lithdr_notidx", - "hpack_recv_lithdr_notidx_v", - "hpack_recv_lithdr_nvridx", - "hpack_recv_lithdr_nvridx_v", - "hpack_recv_uncompressed", - "hpack_recv_huffman", - "hpack_recv_binary", - "hpack_recv_binary_base64", - "hpack_send_indexed", - "hpack_send_lithdr_incidx", - "hpack_send_lithdr_incidx_v", - "hpack_send_lithdr_notidx", - "hpack_send_lithdr_notidx_v", - "hpack_send_lithdr_nvridx", - "hpack_send_lithdr_nvridx_v", - "hpack_send_uncompressed", - "hpack_send_huffman", - "hpack_send_binary", - "hpack_send_binary_base64", - "combiner_locks_initiated", - "combiner_locks_scheduled_items", - "combiner_locks_scheduled_final_items", - "combiner_locks_offloaded", - "call_combiner_locks_initiated", - "call_combiner_locks_scheduled_items", - "call_combiner_set_notify_on_cancel", - "call_combiner_cancelled", - "executor_scheduled_short_items", - "executor_scheduled_long_items", - "executor_scheduled_to_self", - "executor_wakeup_initiated", - "executor_queue_drained", - "executor_push_retries", - "server_requested_calls", - "server_slowpath_requests_queued", - "cq_ev_queue_trylock_failures", - "cq_ev_queue_trylock_successes", - "cq_ev_queue_transient_pop_failures", +const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = { + "client_calls_created", + "server_calls_created", + "cqs_created", + "client_channels_created", + "client_subchannels_created", + "server_channels_created", + "syscall_poll", + "syscall_wait", + "pollset_kick", + "pollset_kicked_without_poller", + "pollset_kicked_again", + "pollset_kick_wakeup_fd", + "pollset_kick_wakeup_cv", + "pollset_kick_own_thread", + "histogram_slow_lookups", + "syscall_write", + "syscall_read", + "tcp_backup_pollers_created", + "tcp_backup_poller_polls", + "http2_op_batches", + "http2_op_cancel", + "http2_op_send_initial_metadata", + "http2_op_send_message", + "http2_op_send_trailing_metadata", + "http2_op_recv_initial_metadata", + "http2_op_recv_message", + "http2_op_recv_trailing_metadata", + "http2_settings_writes", + "http2_pings_sent", + "http2_writes_begun", + "http2_writes_offloaded", + "http2_writes_continued", + "http2_partial_writes", + "http2_initiate_write_due_to_initial_write", + "http2_initiate_write_due_to_start_new_stream", + "http2_initiate_write_due_to_send_message", + "http2_initiate_write_due_to_send_initial_metadata", + "http2_initiate_write_due_to_send_trailing_metadata", + "http2_initiate_write_due_to_retry_send_ping", + "http2_initiate_write_due_to_continue_pings", + "http2_initiate_write_due_to_goaway_sent", + "http2_initiate_write_due_to_rst_stream", + "http2_initiate_write_due_to_close_from_api", + "http2_initiate_write_due_to_stream_flow_control", + "http2_initiate_write_due_to_transport_flow_control", + "http2_initiate_write_due_to_send_settings", + "http2_initiate_write_due_to_bdp_estimator_ping", + "http2_initiate_write_due_to_flow_control_unstalled_by_setting", + "http2_initiate_write_due_to_flow_control_unstalled_by_update", + "http2_initiate_write_due_to_application_ping", + "http2_initiate_write_due_to_keepalive_ping", + "http2_initiate_write_due_to_transport_flow_control_unstalled", + "http2_initiate_write_due_to_ping_response", + "http2_initiate_write_due_to_force_rst_stream", + "http2_spurious_writes_begun", + "hpack_recv_indexed", + "hpack_recv_lithdr_incidx", + "hpack_recv_lithdr_incidx_v", + "hpack_recv_lithdr_notidx", + "hpack_recv_lithdr_notidx_v", + "hpack_recv_lithdr_nvridx", + "hpack_recv_lithdr_nvridx_v", + "hpack_recv_uncompressed", + "hpack_recv_huffman", + "hpack_recv_binary", + "hpack_recv_binary_base64", + "hpack_send_indexed", + "hpack_send_lithdr_incidx", + "hpack_send_lithdr_incidx_v", + "hpack_send_lithdr_notidx", + "hpack_send_lithdr_notidx_v", + "hpack_send_lithdr_nvridx", + "hpack_send_lithdr_nvridx_v", + "hpack_send_uncompressed", + "hpack_send_huffman", + "hpack_send_binary", + "hpack_send_binary_base64", + "combiner_locks_initiated", + "combiner_locks_scheduled_items", + "combiner_locks_scheduled_final_items", + "combiner_locks_offloaded", + "call_combiner_locks_initiated", + "call_combiner_locks_scheduled_items", + "call_combiner_set_notify_on_cancel", + "call_combiner_cancelled", + "executor_scheduled_short_items", + "executor_scheduled_long_items", + "executor_scheduled_to_self", + "executor_wakeup_initiated", + "executor_queue_drained", + "executor_push_retries", + "server_requested_calls", + "server_slowpath_requests_queued", + "cq_ev_queue_trylock_failures", + "cq_ev_queue_trylock_successes", + "cq_ev_queue_transient_pop_failures", }; -const char* grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = { - "Number of client side calls created by this process", - "Number of server side calls created by this process", - "Number of completion queues created", - "Number of client channels created", - "Number of client subchannels created", - "Number of server channels created", - "Number of polling syscalls (epoll_wait, poll, etc) made by this process", - "Number of sleeping syscalls made by this process", - "How many polling wakeups were performed by the process (only valid for " - "epoll1 right now)", - "How many times was a polling wakeup requested without an active poller " - "(only valid for epoll1 right now)", - "How many times was the same polling worker awoken repeatedly before " - "waking up (only valid for epoll1 right now)", - "How many times was an eventfd used as the wakeup vector for a polling " - "wakeup (only valid for epoll1 right now)", - "How many times was a condition variable used as the wakeup vector for a " - "polling wakeup (only valid for epoll1 right now)", - "How many times could a polling wakeup be satisfied by keeping the waking " - "thread awake? (only valid for epoll1 right now)", - "Number of times histogram increments went through the slow (binary " - "search) path", - "Number of write syscalls (or equivalent - eg sendmsg) made by this " - "process", - "Number of read syscalls (or equivalent - eg recvmsg) made by this process", - "Number of times a backup poller has been created (this can be expensive)", - "Number of polls performed on the backup poller", - "Number of batches received by HTTP2 transport", - "Number of cancelations received by HTTP2 transport", - "Number of batches containing send initial metadata", - "Number of batches containing send message", - "Number of batches containing send trailing metadata", - "Number of batches containing receive initial metadata", - "Number of batches containing receive message", - "Number of batches containing receive trailing metadata", - "Number of settings frames sent", - "Number of HTTP2 pings sent by process", - "Number of HTTP2 writes initiated", - "Number of HTTP2 writes offloaded to the executor from application threads", - "Number of HTTP2 writes that finished seeing more data needed to be " - "written", - "Number of HTTP2 writes that were made knowing there was still more data " - "to be written (we cap maximum write size to syscall_write)", - "Number of HTTP2 writes initiated due to 'initial_write'", - "Number of HTTP2 writes initiated due to 'start_new_stream'", - "Number of HTTP2 writes initiated due to 'send_message'", - "Number of HTTP2 writes initiated due to 'send_initial_metadata'", - "Number of HTTP2 writes initiated due to 'send_trailing_metadata'", - "Number of HTTP2 writes initiated due to 'retry_send_ping'", - "Number of HTTP2 writes initiated due to 'continue_pings'", - "Number of HTTP2 writes initiated due to 'goaway_sent'", - "Number of HTTP2 writes initiated due to 'rst_stream'", - "Number of HTTP2 writes initiated due to 'close_from_api'", - "Number of HTTP2 writes initiated due to 'stream_flow_control'", - "Number of HTTP2 writes initiated due to 'transport_flow_control'", - "Number of HTTP2 writes initiated due to 'send_settings'", - "Number of HTTP2 writes initiated due to 'bdp_estimator_ping'", - "Number of HTTP2 writes initiated due to " - "'flow_control_unstalled_by_setting'", - "Number of HTTP2 writes initiated due to " - "'flow_control_unstalled_by_update'", - "Number of HTTP2 writes initiated due to 'application_ping'", - "Number of HTTP2 writes initiated due to 'keepalive_ping'", - "Number of HTTP2 writes initiated due to " - "'transport_flow_control_unstalled'", - "Number of HTTP2 writes initiated due to 'ping_response'", - "Number of HTTP2 writes initiated due to 'force_rst_stream'", - "Number of HTTP2 writes initiated with nothing to write", - "Number of HPACK indexed fields received", - "Number of HPACK literal headers received with incremental indexing", - "Number of HPACK literal headers received with incremental indexing and " - "literal keys", - "Number of HPACK literal headers received with no indexing", - "Number of HPACK literal headers received with no indexing and literal " - "keys", - "Number of HPACK literal headers received with never-indexing", - "Number of HPACK literal headers received with never-indexing and literal " - "keys", - "Number of uncompressed strings received in metadata", - "Number of huffman encoded strings received in metadata", - "Number of binary strings received in metadata", - "Number of binary strings received encoded in base64 in metadata", - "Number of HPACK indexed fields sent", - "Number of HPACK literal headers sent with incremental indexing", - "Number of HPACK literal headers sent with incremental indexing and " - "literal keys", - "Number of HPACK literal headers sent with no indexing", - "Number of HPACK literal headers sent with no indexing and literal keys", - "Number of HPACK literal headers sent with never-indexing", - "Number of HPACK literal headers sent with never-indexing and literal keys", - "Number of uncompressed strings sent in metadata", - "Number of huffman encoded strings sent in metadata", - "Number of binary strings received in metadata", - "Number of binary strings received encoded in base64 in metadata", - "Number of combiner lock entries by process (first items queued to a " - "combiner)", - "Number of items scheduled against combiner locks", - "Number of final items scheduled against combiner locks", - "Number of combiner locks offloaded to different threads", - "Number of call combiner lock entries by process (first items queued to a " - "call combiner)", - "Number of items scheduled against call combiner locks", - "Number of times a cancellation callback was set on a call combiner", - "Number of times a call combiner was cancelled", - "Number of finite runtime closures scheduled against the executor (gRPC " - "thread pool)", - "Number of potentially infinite runtime closures scheduled against the " - "executor (gRPC thread pool)", - "Number of closures scheduled by the executor to the executor", - "Number of thread wakeups initiated within the executor", - "Number of times an executor queue was drained", - "Number of times we raced and were forced to retry pushing a closure to " - "the executor", - "How many calls were requested (not necessarily received) by the server", - "How many times was the server slow path taken (indicates too few " - "outstanding requests)", - "Number of lock (trylock) acquisition failures on completion queue event " - "queue. High value here indicates high contention on completion queues", - "Number of lock (trylock) acquisition successes on completion queue event " - "queue.", - "Number of times NULL was popped out of completion queue's event queue " - "even though the event queue was not empty", +const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = { + "Number of client side calls created by this process", + "Number of server side calls created by this process", + "Number of completion queues created", + "Number of client channels created", + "Number of client subchannels created", + "Number of server channels created", + "Number of polling syscalls (epoll_wait, poll, etc) made by this process", + "Number of sleeping syscalls made by this process", + "How many polling wakeups were performed by the process (only valid for epoll1 right now)", + "How many times was a polling wakeup requested without an active poller (only valid for epoll1 right now)", + "How many times was the same polling worker awoken repeatedly before waking up (only valid for epoll1 right now)", + "How many times was an eventfd used as the wakeup vector for a polling wakeup (only valid for epoll1 right now)", + "How many times was a condition variable used as the wakeup vector for a polling wakeup (only valid for epoll1 right now)", + "How many times could a polling wakeup be satisfied by keeping the waking thread awake? (only valid for epoll1 right now)", + "Number of times histogram increments went through the slow (binary search) path", + "Number of write syscalls (or equivalent - eg sendmsg) made by this process", + "Number of read syscalls (or equivalent - eg recvmsg) made by this process", + "Number of times a backup poller has been created (this can be expensive)", + "Number of polls performed on the backup poller", + "Number of batches received by HTTP2 transport", + "Number of cancelations received by HTTP2 transport", + "Number of batches containing send initial metadata", + "Number of batches containing send message", + "Number of batches containing send trailing metadata", + "Number of batches containing receive initial metadata", + "Number of batches containing receive message", + "Number of batches containing receive trailing metadata", + "Number of settings frames sent", + "Number of HTTP2 pings sent by process", + "Number of HTTP2 writes initiated", + "Number of HTTP2 writes offloaded to the executor from application threads", + "Number of HTTP2 writes that finished seeing more data needed to be written", + "Number of HTTP2 writes that were made knowing there was still more data to be written (we cap maximum write size to syscall_write)", + "Number of HTTP2 writes initiated due to 'initial_write'", + "Number of HTTP2 writes initiated due to 'start_new_stream'", + "Number of HTTP2 writes initiated due to 'send_message'", + "Number of HTTP2 writes initiated due to 'send_initial_metadata'", + "Number of HTTP2 writes initiated due to 'send_trailing_metadata'", + "Number of HTTP2 writes initiated due to 'retry_send_ping'", + "Number of HTTP2 writes initiated due to 'continue_pings'", + "Number of HTTP2 writes initiated due to 'goaway_sent'", + "Number of HTTP2 writes initiated due to 'rst_stream'", + "Number of HTTP2 writes initiated due to 'close_from_api'", + "Number of HTTP2 writes initiated due to 'stream_flow_control'", + "Number of HTTP2 writes initiated due to 'transport_flow_control'", + "Number of HTTP2 writes initiated due to 'send_settings'", + "Number of HTTP2 writes initiated due to 'bdp_estimator_ping'", + "Number of HTTP2 writes initiated due to 'flow_control_unstalled_by_setting'", + "Number of HTTP2 writes initiated due to 'flow_control_unstalled_by_update'", + "Number of HTTP2 writes initiated due to 'application_ping'", + "Number of HTTP2 writes initiated due to 'keepalive_ping'", + "Number of HTTP2 writes initiated due to 'transport_flow_control_unstalled'", + "Number of HTTP2 writes initiated due to 'ping_response'", + "Number of HTTP2 writes initiated due to 'force_rst_stream'", + "Number of HTTP2 writes initiated with nothing to write", + "Number of HPACK indexed fields received", + "Number of HPACK literal headers received with incremental indexing", + "Number of HPACK literal headers received with incremental indexing and literal keys", + "Number of HPACK literal headers received with no indexing", + "Number of HPACK literal headers received with no indexing and literal keys", + "Number of HPACK literal headers received with never-indexing", + "Number of HPACK literal headers received with never-indexing and literal keys", + "Number of uncompressed strings received in metadata", + "Number of huffman encoded strings received in metadata", + "Number of binary strings received in metadata", + "Number of binary strings received encoded in base64 in metadata", + "Number of HPACK indexed fields sent", + "Number of HPACK literal headers sent with incremental indexing", + "Number of HPACK literal headers sent with incremental indexing and literal keys", + "Number of HPACK literal headers sent with no indexing", + "Number of HPACK literal headers sent with no indexing and literal keys", + "Number of HPACK literal headers sent with never-indexing", + "Number of HPACK literal headers sent with never-indexing and literal keys", + "Number of uncompressed strings sent in metadata", + "Number of huffman encoded strings sent in metadata", + "Number of binary strings received in metadata", + "Number of binary strings received encoded in base64 in metadata", + "Number of combiner lock entries by process (first items queued to a combiner)", + "Number of items scheduled against combiner locks", + "Number of final items scheduled against combiner locks", + "Number of combiner locks offloaded to different threads", + "Number of call combiner lock entries by process (first items queued to a call combiner)", + "Number of items scheduled against call combiner locks", + "Number of times a cancellation callback was set on a call combiner", + "Number of times a call combiner was cancelled", + "Number of finite runtime closures scheduled against the executor (gRPC thread pool)", + "Number of potentially infinite runtime closures scheduled against the executor (gRPC thread pool)", + "Number of closures scheduled by the executor to the executor", + "Number of thread wakeups initiated within the executor", + "Number of times an executor queue was drained", + "Number of times we raced and were forced to retry pushing a closure to the executor", + "How many calls were requested (not necessarily received) by the server", + "How many times was the server slow path taken (indicates too few outstanding requests)", + "Number of lock (trylock) acquisition failures on completion queue event queue. High value here indicates high contention on completion queues", + "Number of lock (trylock) acquisition successes on completion queue event queue.", + "Number of times NULL was popped out of completion queue's event queue even though the event queue was not empty", }; -const char* grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = { - "call_initial_size", - "poll_events_returned", - "tcp_write_size", - "tcp_write_iov_size", - "tcp_read_size", - "tcp_read_offer", - "tcp_read_offer_iov_size", - "http2_send_message_size", - "http2_send_initial_metadata_per_write", - "http2_send_message_per_write", - "http2_send_trailing_metadata_per_write", - "http2_send_flowctl_per_write", - "server_cqs_checked", +const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = { + "call_initial_size", + "poll_events_returned", + "tcp_write_size", + "tcp_write_iov_size", + "tcp_read_size", + "tcp_read_offer", + "tcp_read_offer_iov_size", + "http2_send_message_size", + "http2_send_initial_metadata_per_write", + "http2_send_message_per_write", + "http2_send_trailing_metadata_per_write", + "http2_send_flowctl_per_write", + "server_cqs_checked", }; -const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = { - "Initial size of the grpc_call arena created at call start", - "How many events are called for each syscall_poll", - "Number of bytes offered to each syscall_write", - "Number of byte segments offered to each syscall_write", - "Number of bytes received by each syscall_read", - "Number of bytes offered to each syscall_read", - "Number of byte segments offered to each syscall_read", - "Size of messages received by HTTP2 transport", - "Number of streams initiated written per TCP write", - "Number of streams whose payload was written per TCP write", - "Number of streams terminated per TCP write", - "Number of flow control updates written per TCP write", - "How many completion queues were checked looking for a CQ that had " - "requested the incoming call", +const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = { + "Initial size of the grpc_call arena created at call start", + "How many events are called for each syscall_poll", + "Number of bytes offered to each syscall_write", + "Number of byte segments offered to each syscall_write", + "Number of bytes received by each syscall_read", + "Number of bytes offered to each syscall_read", + "Number of byte segments offered to each syscall_read", + "Size of messages received by HTTP2 transport", + "Number of streams initiated written per TCP write", + "Number of streams whose payload was written per TCP write", + "Number of streams terminated per TCP write", + "Number of flow control updates written per TCP write", + "How many completion queues were checked looking for a CQ that had requested the incoming call", }; -const int grpc_stats_table_0[65] = { - 0, 1, 2, 3, 4, 5, 7, 9, 11, 14, - 17, 21, 26, 32, 39, 47, 57, 68, 82, 98, - 117, 140, 167, 199, 238, 284, 339, 404, 482, 575, - 685, 816, 972, 1158, 1380, 1644, 1959, 2334, 2780, 3312, - 3945, 4699, 5597, 6667, 7941, 9459, 11267, 13420, 15984, 19038, - 22676, 27009, 32169, 38315, 45635, 54353, 64737, 77104, 91834, 109378, - 130273, 155159, 184799, 220100, 262144}; -const uint8_t grpc_stats_table_1[124] = { - 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, - 7, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, - 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 24, - 24, 25, 25, 26, 26, 26, 27, 27, 28, 29, 29, 30, 30, 30, 31, 31, 32, 33, - 33, 34, 34, 34, 35, 35, 36, 37, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41, - 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, 50, - 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 56, 56, 57, 57, 58, 58}; -const int grpc_stats_table_2[129] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, - 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 94, 98, 102, 106, 110, - 114, 118, 122, 126, 131, 136, 141, 146, 151, 156, 162, 168, 174, 180, 186, - 192, 199, 206, 213, 220, 228, 236, 244, 252, 260, 269, 278, 287, 297, 307, - 317, 327, 338, 349, 360, 372, 384, 396, 409, 422, 436, 450, 464, 479, 494, - 510, 526, 543, 560, 578, 596, 615, 634, 654, 674, 695, 717, 739, 762, 785, - 809, 834, 859, 885, 912, 939, 967, 996, 1024}; -const uint8_t grpc_stats_table_3[166] = { - 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, - 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, - 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 26, 27, 27, 28, - 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38, 39, - 40, 40, 41, 42, 42, 43, 44, 44, 45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, - 51, 52, 52, 53, 53, 54, 54, 55, 56, 57, 58, 59, 59, 60, 61, 62, 63, 63, 64, - 65, 65, 66, 67, 67, 68, 69, 69, 70, 71, 71, 72, 72, 73, 73, 74, 75, 75, 76, - 76, 77, 78, 79, 79, 80, 81, 82, 83, 84, 85, 85, 86, 87, 88, 88, 89, 90, 90, - 91, 92, 92, 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, 99}; -const int grpc_stats_table_4[65] = { - 0, 1, 2, 3, 4, 6, 8, 11, - 15, 20, 26, 34, 44, 57, 73, 94, - 121, 155, 199, 255, 327, 419, 537, 688, - 881, 1128, 1444, 1848, 2365, 3026, 3872, 4954, - 6338, 8108, 10373, 13270, 16976, 21717, 27782, 35541, - 45467, 58165, 74409, 95189, 121772, 155778, 199281, 254933, - 326126, 417200, 533707, 682750, 873414, 1117323, 1429345, 1828502, - 2339127, 2992348, 3827987, 4896985, 6264509, 8013925, 10251880, 13114801, - 16777216}; -const uint8_t grpc_stats_table_5[87] = { - 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 11, - 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 23, - 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 31, 32, 33, 34, 34, 35, 36, - 36, 37, 38, 39, 39, 40, 41, 41, 42, 43, 44, 44, 45, 45, 46, 47, 48, 48, - 49, 50, 51, 51, 52, 53, 53, 54, 55, 56, 56, 57, 58, 58, 59}; -const int grpc_stats_table_6[65] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 14, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, - 51, 56, 61, 66, 72, 78, 85, 92, 100, 109, 118, 128, 139, - 151, 164, 178, 193, 209, 226, 244, 264, 285, 308, 333, 359, 387, - 418, 451, 486, 524, 565, 609, 656, 707, 762, 821, 884, 952, 1024}; -const uint8_t grpc_stats_table_7[102] = { - 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 6, 7, 7, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, - 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, - 23, 24, 24, 24, 25, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, - 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41, - 42, 42, 43, 44, 44, 45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, 51}; -const int grpc_stats_table_8[9] = {0, 1, 2, 4, 7, 13, 23, 39, 64}; -const uint8_t grpc_stats_table_9[9] = {0, 0, 1, 2, 2, 3, 4, 4, 5}; -void grpc_stats_inc_call_initial_size(int value) { - value = GPR_CLAMP(value, 0, 262144); - if (value < 6) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4651092515166879744ull) { - int bucket = - grpc_stats_table_1[((_val.uint - 4618441417868443648ull) >> 49)] + 6; - _bkt.dbl = grpc_stats_table_0[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_0, 64)); +const int grpc_stats_table_0[65] = {0,1,2,3,4,5,7,9,11,14,17,21,26,32,39,47,57,68,82,98,117,140,167,199,238,284,339,404,482,575,685,816,972,1158,1380,1644,1959,2334,2780,3312,3945,4699,5597,6667,7941,9459,11267,13420,15984,19038,22676,27009,32169,38315,45635,54353,64737,77104,91834,109378,130273,155159,184799,220100,262144}; +const uint8_t grpc_stats_table_1[124] = {0,0,0,1,1,1,2,2,3,3,3,4,4,5,5,6,6,6,7,7,7,8,9,9,10,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,22,23,24,24,25,25,26,26,26,27,27,28,29,29,30,30,30,31,31,32,33,33,34,34,34,35,35,36,37,37,37,38,38,39,39,40,40,41,41,42,42,43,43,44,44,45,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,58,58}; +const int grpc_stats_table_2[129] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,63,66,69,72,75,78,81,84,87,90,94,98,102,106,110,114,118,122,126,131,136,141,146,151,156,162,168,174,180,186,192,199,206,213,220,228,236,244,252,260,269,278,287,297,307,317,327,338,349,360,372,384,396,409,422,436,450,464,479,494,510,526,543,560,578,596,615,634,654,674,695,717,739,762,785,809,834,859,885,912,939,967,996,1024}; +const uint8_t grpc_stats_table_3[166] = {0,0,0,1,1,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,16,17,17,18,19,19,20,21,21,22,23,23,24,25,25,26,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,36,36,37,38,39,40,40,41,42,42,43,44,44,45,46,46,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,56,57,58,59,59,60,61,62,63,63,64,65,65,66,67,67,68,69,69,70,71,71,72,72,73,73,74,75,75,76,76,77,78,79,79,80,81,82,83,84,85,85,86,87,88,88,89,90,90,91,92,92,93,94,94,95,95,96,97,97,98,98,99}; +const int grpc_stats_table_4[65] = {0,1,2,3,4,6,8,11,15,20,26,34,44,57,73,94,121,155,199,255,327,419,537,688,881,1128,1444,1848,2365,3026,3872,4954,6338,8108,10373,13270,16976,21717,27782,35541,45467,58165,74409,95189,121772,155778,199281,254933,326126,417200,533707,682750,873414,1117323,1429345,1828502,2339127,2992348,3827987,4896985,6264509,8013925,10251880,13114801,16777216}; +const uint8_t grpc_stats_table_5[87] = {0,0,1,1,2,3,3,4,4,5,6,6,7,8,8,9,10,11,11,12,13,13,14,15,15,16,17,17,18,19,20,20,21,22,22,23,24,25,25,26,27,27,28,29,29,30,31,31,32,33,34,34,35,36,36,37,38,39,39,40,41,41,42,43,44,44,45,45,46,47,48,48,49,50,51,51,52,53,53,54,55,56,56,57,58,58,59}; +const int grpc_stats_table_6[65] = {0,1,2,3,4,5,6,7,8,9,10,11,12,14,16,18,20,22,24,27,30,33,36,39,43,47,51,56,61,66,72,78,85,92,100,109,118,128,139,151,164,178,193,209,226,244,264,285,308,333,359,387,418,451,486,524,565,609,656,707,762,821,884,952,1024}; +const uint8_t grpc_stats_table_7[102] = {0,0,0,1,1,1,1,2,2,3,3,4,4,5,5,6,6,6,7,7,7,8,8,9,9,10,11,11,12,12,13,13,14,14,14,15,15,16,16,17,17,18,19,19,20,20,21,21,22,22,23,23,24,24,24,25,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,35,35,36,37,37,38,38,39,39,40,40,41,41,42,42,43,44,44,45,46,46,47,48,48,49,49,50,50,51,51}; +const int grpc_stats_table_8[9] = {0,1,2,4,7,13,23,39,64}; +const uint8_t grpc_stats_table_9[9] = {0,0,1,2,2,3,4,4,5}; +void grpc_stats_inc_call_initial_size(int value) {value = GPR_CLAMP(value, 0, 262144); +if (value < 6) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4651092515166879744ull) { +int bucket = grpc_stats_table_1[((_val.uint - 4618441417868443648ull) >> 49)] + 6; +_bkt.dbl = grpc_stats_table_0[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, bucket); +return; } -void grpc_stats_inc_poll_events_returned(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 29) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4642789003353915392ull) { - int bucket = - grpc_stats_table_3[((_val.uint - 4628855992006737920ull) >> 47)] + 29; - _bkt.dbl = grpc_stats_table_2[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_2, 128)); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_0, 64)); } -void grpc_stats_inc_tcp_write_size(int value) { - value = GPR_CLAMP(value, 0, 16777216); - if (value < 5) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4683743612465315840ull) { - int bucket = - grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; - _bkt.dbl = grpc_stats_table_4[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +void grpc_stats_inc_poll_events_returned(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 29) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4642789003353915392ull) { +int bucket = grpc_stats_table_3[((_val.uint - 4628855992006737920ull) >> 47)] + 29; +_bkt.dbl = grpc_stats_table_2[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, bucket); +return; } -void grpc_stats_inc_tcp_write_iov_size(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 13) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4637863191261478912ull) { - int bucket = - grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; - _bkt.dbl = grpc_stats_table_6[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_2, 128)); } -void grpc_stats_inc_tcp_read_size(int value) { - value = GPR_CLAMP(value, 0, 16777216); - if (value < 5) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4683743612465315840ull) { - int bucket = - grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; - _bkt.dbl = grpc_stats_table_4[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +void grpc_stats_inc_tcp_write_size(int value) {value = GPR_CLAMP(value, 0, 16777216); +if (value < 5) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4683743612465315840ull) { +int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; +_bkt.dbl = grpc_stats_table_4[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, bucket); +return; } -void grpc_stats_inc_tcp_read_offer(int value) { - value = GPR_CLAMP(value, 0, 16777216); - if (value < 5) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4683743612465315840ull) { - int bucket = - grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; - _bkt.dbl = grpc_stats_table_4[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -void grpc_stats_inc_tcp_read_offer_iov_size(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 13) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, - value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4637863191261478912ull) { - int bucket = - grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; - _bkt.dbl = grpc_stats_table_6[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, - bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +void grpc_stats_inc_tcp_write_iov_size(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 13) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4637863191261478912ull) { +int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; +_bkt.dbl = grpc_stats_table_6[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, bucket); +return; } -void grpc_stats_inc_http2_send_message_size(int value) { - value = GPR_CLAMP(value, 0, 16777216); - if (value < 5) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, - value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4683743612465315840ull) { - int bucket = - grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; - _bkt.dbl = grpc_stats_table_4[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, - bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -void grpc_stats_inc_http2_send_initial_metadata_per_write(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 13) { - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4637863191261478912ull) { - int bucket = - grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; - _bkt.dbl = grpc_stats_table_6[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +void grpc_stats_inc_tcp_read_size(int value) {value = GPR_CLAMP(value, 0, 16777216); +if (value < 5) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4683743612465315840ull) { +int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; +_bkt.dbl = grpc_stats_table_4[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, bucket); +return; } -void grpc_stats_inc_http2_send_message_per_write(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 13) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, - value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4637863191261478912ull) { - int bucket = - grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; - _bkt.dbl = grpc_stats_table_6[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, - bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -void grpc_stats_inc_http2_send_trailing_metadata_per_write(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 13) { - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4637863191261478912ull) { - int bucket = - grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; - _bkt.dbl = grpc_stats_table_6[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +void grpc_stats_inc_tcp_read_offer(int value) {value = GPR_CLAMP(value, 0, 16777216); +if (value < 5) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4683743612465315840ull) { +int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; +_bkt.dbl = grpc_stats_table_4[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, bucket); +return; } -void grpc_stats_inc_http2_send_flowctl_per_write(int value) { - value = GPR_CLAMP(value, 0, 1024); - if (value < 13) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, - value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4637863191261478912ull) { - int bucket = - grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; - _bkt.dbl = grpc_stats_table_6[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, - bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -void grpc_stats_inc_server_cqs_checked(int value) { - value = GPR_CLAMP(value, 0, 64); - if (value < 3) { - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, value); - return; - } - union { - double dbl; - uint64_t uint; - } _val, _bkt; - _val.dbl = value; - if (_val.uint < 4625196817309499392ull) { - int bucket = - grpc_stats_table_9[((_val.uint - 4613937818241073152ull) >> 51)] + 3; - _bkt.dbl = grpc_stats_table_8[bucket]; - bucket -= (_val.uint < _bkt.uint); - GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, bucket); - return; - } - GRPC_STATS_INC_HISTOGRAM( - GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, - grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_8, 8)); +void grpc_stats_inc_tcp_read_offer_iov_size(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 13) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4637863191261478912ull) { +int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; +_bkt.dbl = grpc_stats_table_6[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, bucket); +return; } -const int grpc_stats_histo_buckets[13] = {64, 128, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 8}; -const int grpc_stats_histo_start[13] = {0, 64, 192, 256, 320, 384, 448, - 512, 576, 640, 704, 768, 832}; -const int* const grpc_stats_histo_bucket_boundaries[13] = { - grpc_stats_table_0, grpc_stats_table_2, grpc_stats_table_4, - grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_4, - grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_6, - grpc_stats_table_6, grpc_stats_table_6, grpc_stats_table_6, - grpc_stats_table_8}; -void (*const grpc_stats_inc_histogram[13])(int x) = { - grpc_stats_inc_call_initial_size, - grpc_stats_inc_poll_events_returned, - grpc_stats_inc_tcp_write_size, - grpc_stats_inc_tcp_write_iov_size, - grpc_stats_inc_tcp_read_size, - grpc_stats_inc_tcp_read_offer, - grpc_stats_inc_tcp_read_offer_iov_size, - grpc_stats_inc_http2_send_message_size, - grpc_stats_inc_http2_send_initial_metadata_per_write, - grpc_stats_inc_http2_send_message_per_write, - grpc_stats_inc_http2_send_trailing_metadata_per_write, - grpc_stats_inc_http2_send_flowctl_per_write, - grpc_stats_inc_server_cqs_checked}; +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +} +void grpc_stats_inc_http2_send_message_size(int value) {value = GPR_CLAMP(value, 0, 16777216); +if (value < 5) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4683743612465315840ull) { +int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; +_bkt.dbl = grpc_stats_table_4[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, bucket); +return; +} +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +} +void grpc_stats_inc_http2_send_initial_metadata_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 13) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4637863191261478912ull) { +int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; +_bkt.dbl = grpc_stats_table_6[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, bucket); +return; +} +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +} +void grpc_stats_inc_http2_send_message_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 13) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4637863191261478912ull) { +int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; +_bkt.dbl = grpc_stats_table_6[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, bucket); +return; +} +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +} +void grpc_stats_inc_http2_send_trailing_metadata_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 13) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4637863191261478912ull) { +int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; +_bkt.dbl = grpc_stats_table_6[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, bucket); +return; +} +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +} +void grpc_stats_inc_http2_send_flowctl_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); +if (value < 13) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4637863191261478912ull) { +int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; +_bkt.dbl = grpc_stats_table_6[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, bucket); +return; +} +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +} +void grpc_stats_inc_server_cqs_checked(int value) {value = GPR_CLAMP(value, 0, 64); +if (value < 3) { +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, value); +return; +}union { double dbl; uint64_t uint; } _val, _bkt; +_val.dbl = value; +if (_val.uint < 4625196817309499392ull) { +int bucket = grpc_stats_table_9[((_val.uint - 4613937818241073152ull) >> 51)] + 3; +_bkt.dbl = grpc_stats_table_8[bucket]; +bucket -= (_val.uint < _bkt.uint); +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, bucket); +return; +} +GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_8, 8)); +} +const int grpc_stats_histo_buckets[13] = {64,128,64,64,64,64,64,64,64,64,64,64,8}; +const int grpc_stats_histo_start[13] = {0,64,192,256,320,384,448,512,576,640,704,768,832}; +const int *const grpc_stats_histo_bucket_boundaries[13] = {grpc_stats_table_0,grpc_stats_table_2,grpc_stats_table_4,grpc_stats_table_6,grpc_stats_table_4,grpc_stats_table_4,grpc_stats_table_6,grpc_stats_table_4,grpc_stats_table_6,grpc_stats_table_6,grpc_stats_table_6,grpc_stats_table_6,grpc_stats_table_8}; +void (*const grpc_stats_inc_histogram[13])(int x) = {grpc_stats_inc_call_initial_size,grpc_stats_inc_poll_events_returned,grpc_stats_inc_tcp_write_size,grpc_stats_inc_tcp_write_iov_size,grpc_stats_inc_tcp_read_size,grpc_stats_inc_tcp_read_offer,grpc_stats_inc_tcp_read_offer_iov_size,grpc_stats_inc_http2_send_message_size,grpc_stats_inc_http2_send_initial_metadata_per_write,grpc_stats_inc_http2_send_message_per_write,grpc_stats_inc_http2_send_trailing_metadata_per_write,grpc_stats_inc_http2_send_flowctl_per_write,grpc_stats_inc_server_cqs_checked}; diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h index f8e54c689d0..16862218aaa 100644 --- a/src/core/lib/debug/stats_data.h +++ b/src/core/lib/debug/stats_data.h @@ -1,12 +1,12 @@ /* * Copyright 2017 gRPC authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -125,8 +125,8 @@ typedef enum { GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES, GRPC_STATS_COUNTER_COUNT } grpc_stats_counters; -extern const char* grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT]; -extern const char* grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT]; +extern const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT]; +extern const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT]; typedef enum { GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, @@ -143,8 +143,8 @@ typedef enum { GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, GRPC_STATS_HISTOGRAM_COUNT } grpc_stats_histograms; -extern const char* grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT]; -extern const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT]; +extern const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT]; +extern const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT]; typedef enum { GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE_FIRST_SLOT = 0, GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE_BUCKETS = 64, @@ -174,131 +174,243 @@ typedef enum { GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED_BUCKETS = 8, GRPC_STATS_HISTOGRAM_BUCKETS = 840 } grpc_stats_histogram_constants; -#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() -#define GRPC_STATS_INC_SERVER_CALLS_CREATED() -#define GRPC_STATS_INC_CQS_CREATED() -#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() -#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() -#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() -#define GRPC_STATS_INC_SYSCALL_POLL() -#define GRPC_STATS_INC_SYSCALL_WAIT() -#define GRPC_STATS_INC_POLLSET_KICK() -#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() -#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() -#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() -#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() -#define GRPC_STATS_INC_SYSCALL_WRITE() -#define GRPC_STATS_INC_SYSCALL_READ() -#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() -#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() -#define GRPC_STATS_INC_HTTP2_OP_BATCHES() -#define GRPC_STATS_INC_HTTP2_OP_CANCEL() -#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() -#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() -#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() -#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() -#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() -#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() -#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() -#define GRPC_STATS_INC_HTTP2_PINGS_SENT() -#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() -#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() -#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() -#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() -#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() -#define GRPC_STATS_INC_HPACK_RECV_INDEXED() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() -#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() -#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() -#define GRPC_STATS_INC_HPACK_RECV_BINARY() -#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() -#define GRPC_STATS_INC_HPACK_SEND_INDEXED() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() -#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() -#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() -#define GRPC_STATS_INC_HPACK_SEND_BINARY() -#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() -#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() -#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() -#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() -#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() -#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() -#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() -#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() -#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() -#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() -#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) +#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED) +#define GRPC_STATS_INC_SERVER_CALLS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CALLS_CREATED) +#define GRPC_STATS_INC_CQS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQS_CREATED) +#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CHANNELS_CREATED) +#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_SUBCHANNELS_CREATED) +#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CHANNELS_CREATED) +#define GRPC_STATS_INC_SYSCALL_POLL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_POLL) +#define GRPC_STATS_INC_SYSCALL_WAIT() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WAIT) +#define GRPC_STATS_INC_POLLSET_KICK() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK) +#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_WITHOUT_POLLER) +#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_AGAIN) +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_FD) +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_CV) +#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_OWN_THREAD) +#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS) +#define GRPC_STATS_INC_SYSCALL_WRITE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WRITE) +#define GRPC_STATS_INC_SYSCALL_READ() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_READ) +#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLERS_CREATED) +#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLER_POLLS) +#define GRPC_STATS_INC_HTTP2_OP_BATCHES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_BATCHES) +#define GRPC_STATS_INC_HTTP2_OP_CANCEL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_CANCEL) +#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_INITIAL_METADATA) +#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_MESSAGE) +#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_TRAILING_METADATA) +#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_INITIAL_METADATA) +#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_MESSAGE) +#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA) +#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SETTINGS_WRITES) +#define GRPC_STATS_INC_HTTP2_PINGS_SENT() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PINGS_SENT) +#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN) +#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_OFFLOADED) +#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_CONTINUED) +#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PARTIAL_WRITES) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM) +#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN) +#define GRPC_STATS_INC_HPACK_RECV_INDEXED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_INDEXED) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX_V) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX_V) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX_V) +#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_UNCOMPRESSED) +#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_HUFFMAN) +#define GRPC_STATS_INC_HPACK_RECV_BINARY() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY) +#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY_BASE64) +#define GRPC_STATS_INC_HPACK_SEND_INDEXED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_INDEXED) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX_V) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX_V) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX_V) +#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_UNCOMPRESSED) +#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_HUFFMAN) +#define GRPC_STATS_INC_HPACK_SEND_BINARY() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY) +#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY_BASE64) +#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED) +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS) +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS) +#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_OFFLOADED) +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_INITIATED) +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS) +#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_SET_NOTIFY_ON_CANCEL) +#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_CANCELLED) +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_SHORT_ITEMS) +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_LONG_ITEMS) +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_TO_SELF) +#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED) +#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED) +#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES) +#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_REQUESTED_CALLS) +#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_SLOWPATH_REQUESTS_QUEUED) +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_FAILURES) +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_SUCCESSES) +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES) +#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) grpc_stats_inc_call_initial_size( (int)(value)) void grpc_stats_inc_call_initial_size(int x); -#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) +#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) grpc_stats_inc_poll_events_returned( (int)(value)) void grpc_stats_inc_poll_events_returned(int x); -#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) +#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) grpc_stats_inc_tcp_write_size( (int)(value)) void grpc_stats_inc_tcp_write_size(int x); -#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) +#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) grpc_stats_inc_tcp_write_iov_size( (int)(value)) void grpc_stats_inc_tcp_write_iov_size(int x); -#define GRPC_STATS_INC_TCP_READ_SIZE(value) +#define GRPC_STATS_INC_TCP_READ_SIZE(value) grpc_stats_inc_tcp_read_size( (int)(value)) void grpc_stats_inc_tcp_read_size(int x); -#define GRPC_STATS_INC_TCP_READ_OFFER(value) +#define GRPC_STATS_INC_TCP_READ_OFFER(value) grpc_stats_inc_tcp_read_offer( (int)(value)) void grpc_stats_inc_tcp_read_offer(int x); -#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) +#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) grpc_stats_inc_tcp_read_offer_iov_size( (int)(value)) void grpc_stats_inc_tcp_read_offer_iov_size(int x); -#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) grpc_stats_inc_http2_send_message_size( (int)(value)) void grpc_stats_inc_http2_send_message_size(int x); -#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) grpc_stats_inc_http2_send_initial_metadata_per_write( (int)(value)) void grpc_stats_inc_http2_send_initial_metadata_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) grpc_stats_inc_http2_send_message_per_write( (int)(value)) void grpc_stats_inc_http2_send_message_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) grpc_stats_inc_http2_send_trailing_metadata_per_write( (int)(value)) void grpc_stats_inc_http2_send_trailing_metadata_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) grpc_stats_inc_http2_send_flowctl_per_write( (int)(value)) void grpc_stats_inc_http2_send_flowctl_per_write(int x); -#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) +#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) grpc_stats_inc_server_cqs_checked( (int)(value)) void grpc_stats_inc_server_cqs_checked(int x); +#else +#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() +#define GRPC_STATS_INC_SERVER_CALLS_CREATED() +#define GRPC_STATS_INC_CQS_CREATED() +#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() +#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() +#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() +#define GRPC_STATS_INC_SYSCALL_POLL() +#define GRPC_STATS_INC_SYSCALL_WAIT() +#define GRPC_STATS_INC_POLLSET_KICK() +#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() +#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() +#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() +#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() +#define GRPC_STATS_INC_SYSCALL_WRITE() +#define GRPC_STATS_INC_SYSCALL_READ() +#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() +#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() +#define GRPC_STATS_INC_HTTP2_OP_BATCHES() +#define GRPC_STATS_INC_HTTP2_OP_CANCEL() +#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() +#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() +#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() +#define GRPC_STATS_INC_HTTP2_PINGS_SENT() +#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() +#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() +#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() +#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() +#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() +#define GRPC_STATS_INC_HPACK_RECV_INDEXED() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() +#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() +#define GRPC_STATS_INC_HPACK_RECV_BINARY() +#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() +#define GRPC_STATS_INC_HPACK_SEND_INDEXED() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() +#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() +#define GRPC_STATS_INC_HPACK_SEND_BINARY() +#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() +#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() +#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() +#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() +#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() +#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() +#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() +#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() +#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() +#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() +#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) +#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) +#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) +#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) +#define GRPC_STATS_INC_TCP_READ_SIZE(value) +#define GRPC_STATS_INC_TCP_READ_OFFER(value) +#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) +#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) +#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) +#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) +#endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ extern const int grpc_stats_histo_buckets[13]; extern const int grpc_stats_histo_start[13]; -extern const int* const grpc_stats_histo_bucket_boundaries[13]; +extern const int *const grpc_stats_histo_bucket_boundaries[13]; extern void (*const grpc_stats_inc_histogram[13])(int x); #endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */ diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index eedc66f24e7..a8c709daa35 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -79,7 +79,7 @@ namespace grpc_core { * - Exactly one instance of ExecCtx must be created per thread. Instances must * always be called exec_ctx. * - Do not pass exec_ctx as a parameter to a function. Always access it using - * grpc_core::ExecCtx::Get() + * grpc_core::ExecCtx::Get(). */ class ExecCtx { public: @@ -101,8 +101,12 @@ class ExecCtx { ExecCtx(const ExecCtx&) = delete; ExecCtx& operator=(const ExecCtx&) = delete; - /** Return starting_cpu */ - // unsigned starting_cpu() const { return starting_cpu_; } + /** Return starting_cpu. This is only required for stats collection and is + * hence only defined if GRPC_COLLECT_STATS is enabled. + */ +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) + unsigned starting_cpu() const { return starting_cpu_; } +#endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ struct CombinerData { /* currently active combiner: updated only via combiner.c */ @@ -128,12 +132,14 @@ class ExecCtx { /** Flush any work that has been enqueued onto this grpc_exec_ctx. * Caller must guarantee that no interfering locks are held. - * Returns true if work was performed, false otherwise. */ + * Returns true if work was performed, false otherwise. + */ bool Flush(); /** Returns true if we'd like to leave this execution context as soon as -possible: useful for deciding whether to do something more or not depending -on outside context */ + * possible: useful for deciding whether to do something more or not + * depending on outside context. + */ bool IsReadyToFinish() { if ((flags_ & GRPC_EXEC_CTX_FLAG_IS_FINISHED) == 0) { if (CheckReadyToFinish()) { @@ -147,12 +153,14 @@ on outside context */ } /** Returns the stored current time relative to start if valid, - * otherwise refreshes the stored time, sets it valid and returns the new - * value */ + * otherwise refreshes the stored time, sets it valid and returns the new + * value. + */ grpc_millis Now(); /** Invalidates the stored time value. A new time value will be set on calling - * Now() */ + * Now(). + */ void InvalidateNow() { now_is_valid_ = false; } /** To be used only by shutdown code in iomgr */ @@ -162,20 +170,20 @@ on outside context */ } /** To be used only for testing. - * Sets the now value + * Sets the now value. */ void TestOnlySetNow(grpc_millis new_val) { now_ = new_val; now_is_valid_ = true; } - /** Global initialization for ExecCtx. Called by iomgr */ + /** Global initialization for ExecCtx. Called by iomgr. */ static void GlobalInit(void); - /** Global shutdown for ExecCtx. Called by iomgr */ + /** Global shutdown for ExecCtx. Called by iomgr. */ static void GlobalShutdown(void) { gpr_tls_destroy(&exec_ctx_); } - /** Gets pointer to current exec_ctx */ + /** Gets pointer to current exec_ctx. */ static ExecCtx* Get() { return reinterpret_cast(gpr_tls_get(&exec_ctx_)); } @@ -185,19 +193,23 @@ on outside context */ } protected: - /** Check if ready to finish */ + /** Check if ready to finish. */ virtual bool CheckReadyToFinish() { return false; } - /** Disallow delete on ExecCtx */ + /** Disallow delete on ExecCtx. */ static void operator delete(void* p) { abort(); } private: - /** Set exec_ctx_ to exec_ctx */ + /** Set exec_ctx_ to exec_ctx. */ grpc_closure_list closure_list_ = GRPC_CLOSURE_LIST_INIT; CombinerData combiner_data_ = {nullptr, nullptr}; uintptr_t flags_; +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) + unsigned starting_cpu_ = gpr_cpu_current_cpu(); +#endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ + bool now_is_valid_ = false; grpc_millis now_ = 0; diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc index 949a88f8f07..aeb13655bfd 100644 --- a/test/core/debug/stats_test.cc +++ b/test/core/debug/stats_test.cc @@ -142,9 +142,14 @@ INSTANTIATE_TEST_CASE_P(HistogramTestCases, HistogramTest, } // namespace grpc int main(int argc, char** argv) { +/* Only run this test if GRPC_COLLECT_STATS is defined or if it is a debug + * build. + */ +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) ::testing::InitGoogleTest(&argc, argv); grpc_init(); int ret = RUN_ALL_TESTS(); grpc_shutdown(); return ret; +#endif } diff --git a/test/core/end2end/tests/simple_request.cc b/test/core/end2end/tests/simple_request.cc index 2d6ccad0ec4..941d9ae3198 100644 --- a/test/core/end2end/tests/simple_request.cc +++ b/test/core/end2end/tests/simple_request.cc @@ -235,12 +235,14 @@ static void simple_request_body(grpc_end2end_test_config config, if (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) { expected_calls *= 2; } +#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) GPR_ASSERT(after->counters[GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED] - before->counters[GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED] == expected_calls); GPR_ASSERT(after->counters[GRPC_STATS_COUNTER_SERVER_CALLS_CREATED] - before->counters[GRPC_STATS_COUNTER_SERVER_CALLS_CREATED] == expected_calls); +#endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ gpr_free(before); gpr_free(after); } diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py index 1f443ac1d00..9b10c67afa7 100755 --- a/tools/codegen/core/gen_stats_data.py +++ b/tools/codegen/core/gen_stats_data.py @@ -265,13 +265,24 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: print >> H, " GRPC_STATS_HISTOGRAM_BUCKETS = %d" % first_slot print >> H, "} grpc_stats_histogram_constants;" + print >> H, "#if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG)" + for ctr in inst_map['Counter']: + print >> H, ("#define GRPC_STATS_INC_%s() " + + "GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_%s)") % ( + ctr.name.upper(), ctr.name.upper()) + for histogram in inst_map['Histogram']: + print >> H, "#define GRPC_STATS_INC_%s(value) grpc_stats_inc_%s( (int)(value))" % ( + histogram.name.upper(), histogram.name.lower()) + print >> H, "void grpc_stats_inc_%s(int x);" % histogram.name.lower() + + print >> H, "#else" for ctr in inst_map['Counter']: print >> H, ("#define GRPC_STATS_INC_%s() ") % ( ctr.name.upper()) for histogram in inst_map['Histogram']: print >> H, "#define GRPC_STATS_INC_%s(value)" % ( histogram.name.upper()) - print >> H, "void grpc_stats_inc_%s(int x);" % histogram.name.lower() + print >> H, "#endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */" for i, tbl in enumerate(static_tables): print >> H, "extern const %s grpc_stats_table_%d[%d];" % (tbl[0], i, From 31f4eee720fc52e02baaaece7e691c8851866acf Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 14 May 2018 15:45:17 -0700 Subject: [PATCH 3/4] Clang format and yapf --- tools/codegen/core/gen_stats_data.py | 3 +- .../clang_format_all_the_things.sh | 2 +- .../performance/massage_qps_stats.py | 629 +++++++++++++----- 3 files changed, 453 insertions(+), 181 deletions(-) diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py index 9b10c67afa7..33faeafc16c 100755 --- a/tools/codegen/core/gen_stats_data.py +++ b/tools/codegen/core/gen_stats_data.py @@ -277,8 +277,7 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: print >> H, "#else" for ctr in inst_map['Counter']: - print >> H, ("#define GRPC_STATS_INC_%s() ") % ( - ctr.name.upper()) + print >> H, ("#define GRPC_STATS_INC_%s() ") % (ctr.name.upper()) for histogram in inst_map['Histogram']: print >> H, "#define GRPC_STATS_INC_%s(value)" % ( histogram.name.upper()) diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 3b901ae4bff..1c6dcfbf11f 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -29,7 +29,7 @@ for dir in $DIRS do for glob in $GLOB do - files="$files `find ${CLANG_FORMAT_ROOT}/$dir -name $glob -and -not -name '*.generated.*' -and -not -name '*.pb.h' -and -not -name '*.pb.c' -and -not -name '*.pb.cc' -and -not -name '*.pbobjc.h' -and -not -name '*.pbobjc.m' -and -not -name '*.pbrpc.h' -and -not -name '*.pbrpc.m' -and -not -name end2end_tests.cc -and -not -name end2end_nosec_tests.cc -and -not -name public_headers_must_be_c89.c`" + files="$files `find ${CLANG_FORMAT_ROOT}/$dir -name $glob -and -not -name '*.generated.*' -and -not -name '*.pb.h' -and -not -name '*.pb.c' -and -not -name '*.pb.cc' -and -not -name '*.pbobjc.h' -and -not -name '*.pbobjc.m' -and -not -name '*.pbrpc.h' -and -not -name '*.pbrpc.m' -and -not -name end2end_tests.cc -and -not -name end2end_nosec_tests.cc -and -not -name public_headers_must_be_c89.c -and -not -name stats_data.h -and -not -name stats_data.cc`" done done diff --git a/tools/run_tests/performance/massage_qps_stats.py b/tools/run_tests/performance/massage_qps_stats.py index 48c57581a52..790202c43ee 100644 --- a/tools/run_tests/performance/massage_qps_stats.py +++ b/tools/run_tests/performance/massage_qps_stats.py @@ -15,182 +15,455 @@ # Autogenerated by tools/codegen/core/gen_stats_data.py import massage_qps_stats_helpers + + def massage_qps_stats(scenario_result): - for stats in scenario_result["serverStats"] + scenario_result["clientStats"]: - if "coreStats" not in stats: return - core_stats = stats["coreStats"] - del stats["coreStats"] - stats["core_client_calls_created"] = massage_qps_stats_helpers.counter(core_stats, "client_calls_created") - stats["core_server_calls_created"] = massage_qps_stats_helpers.counter(core_stats, "server_calls_created") - stats["core_cqs_created"] = massage_qps_stats_helpers.counter(core_stats, "cqs_created") - stats["core_client_channels_created"] = massage_qps_stats_helpers.counter(core_stats, "client_channels_created") - stats["core_client_subchannels_created"] = massage_qps_stats_helpers.counter(core_stats, "client_subchannels_created") - stats["core_server_channels_created"] = massage_qps_stats_helpers.counter(core_stats, "server_channels_created") - stats["core_syscall_poll"] = massage_qps_stats_helpers.counter(core_stats, "syscall_poll") - stats["core_syscall_wait"] = massage_qps_stats_helpers.counter(core_stats, "syscall_wait") - stats["core_pollset_kick"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick") - stats["core_pollset_kicked_without_poller"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kicked_without_poller") - stats["core_pollset_kicked_again"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kicked_again") - stats["core_pollset_kick_wakeup_fd"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick_wakeup_fd") - stats["core_pollset_kick_wakeup_cv"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick_wakeup_cv") - stats["core_pollset_kick_own_thread"] = massage_qps_stats_helpers.counter(core_stats, "pollset_kick_own_thread") - stats["core_histogram_slow_lookups"] = massage_qps_stats_helpers.counter(core_stats, "histogram_slow_lookups") - stats["core_syscall_write"] = massage_qps_stats_helpers.counter(core_stats, "syscall_write") - stats["core_syscall_read"] = massage_qps_stats_helpers.counter(core_stats, "syscall_read") - stats["core_tcp_backup_pollers_created"] = massage_qps_stats_helpers.counter(core_stats, "tcp_backup_pollers_created") - stats["core_tcp_backup_poller_polls"] = massage_qps_stats_helpers.counter(core_stats, "tcp_backup_poller_polls") - stats["core_http2_op_batches"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_batches") - stats["core_http2_op_cancel"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_cancel") - stats["core_http2_op_send_initial_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_send_initial_metadata") - stats["core_http2_op_send_message"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_send_message") - stats["core_http2_op_send_trailing_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_send_trailing_metadata") - stats["core_http2_op_recv_initial_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_recv_initial_metadata") - stats["core_http2_op_recv_message"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_recv_message") - stats["core_http2_op_recv_trailing_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_op_recv_trailing_metadata") - stats["core_http2_settings_writes"] = massage_qps_stats_helpers.counter(core_stats, "http2_settings_writes") - stats["core_http2_pings_sent"] = massage_qps_stats_helpers.counter(core_stats, "http2_pings_sent") - stats["core_http2_writes_begun"] = massage_qps_stats_helpers.counter(core_stats, "http2_writes_begun") - stats["core_http2_writes_offloaded"] = massage_qps_stats_helpers.counter(core_stats, "http2_writes_offloaded") - stats["core_http2_writes_continued"] = massage_qps_stats_helpers.counter(core_stats, "http2_writes_continued") - stats["core_http2_partial_writes"] = massage_qps_stats_helpers.counter(core_stats, "http2_partial_writes") - stats["core_http2_initiate_write_due_to_initial_write"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_initial_write") - stats["core_http2_initiate_write_due_to_start_new_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_start_new_stream") - stats["core_http2_initiate_write_due_to_send_message"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_message") - stats["core_http2_initiate_write_due_to_send_initial_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_initial_metadata") - stats["core_http2_initiate_write_due_to_send_trailing_metadata"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_trailing_metadata") - stats["core_http2_initiate_write_due_to_retry_send_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_retry_send_ping") - stats["core_http2_initiate_write_due_to_continue_pings"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_continue_pings") - stats["core_http2_initiate_write_due_to_goaway_sent"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_goaway_sent") - stats["core_http2_initiate_write_due_to_rst_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_rst_stream") - stats["core_http2_initiate_write_due_to_close_from_api"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_close_from_api") - stats["core_http2_initiate_write_due_to_stream_flow_control"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_stream_flow_control") - stats["core_http2_initiate_write_due_to_transport_flow_control"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_transport_flow_control") - stats["core_http2_initiate_write_due_to_send_settings"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_send_settings") - stats["core_http2_initiate_write_due_to_bdp_estimator_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_bdp_estimator_ping") - stats["core_http2_initiate_write_due_to_flow_control_unstalled_by_setting"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_flow_control_unstalled_by_setting") - stats["core_http2_initiate_write_due_to_flow_control_unstalled_by_update"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_flow_control_unstalled_by_update") - stats["core_http2_initiate_write_due_to_application_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_application_ping") - stats["core_http2_initiate_write_due_to_keepalive_ping"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_keepalive_ping") - stats["core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_transport_flow_control_unstalled") - stats["core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_ping_response") - stats["core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter(core_stats, "http2_initiate_write_due_to_force_rst_stream") - stats["core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter(core_stats, "http2_spurious_writes_begun") - stats["core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_indexed") - stats["core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_incidx") - stats["core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_incidx_v") - stats["core_hpack_recv_lithdr_notidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_notidx") - stats["core_hpack_recv_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_notidx_v") - stats["core_hpack_recv_lithdr_nvridx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_nvridx") - stats["core_hpack_recv_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_lithdr_nvridx_v") - stats["core_hpack_recv_uncompressed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_uncompressed") - stats["core_hpack_recv_huffman"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_huffman") - stats["core_hpack_recv_binary"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_binary") - stats["core_hpack_recv_binary_base64"] = massage_qps_stats_helpers.counter(core_stats, "hpack_recv_binary_base64") - stats["core_hpack_send_indexed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_indexed") - stats["core_hpack_send_lithdr_incidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_incidx") - stats["core_hpack_send_lithdr_incidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_incidx_v") - stats["core_hpack_send_lithdr_notidx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_notidx") - stats["core_hpack_send_lithdr_notidx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_notidx_v") - stats["core_hpack_send_lithdr_nvridx"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_nvridx") - stats["core_hpack_send_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_lithdr_nvridx_v") - stats["core_hpack_send_uncompressed"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_uncompressed") - stats["core_hpack_send_huffman"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_huffman") - stats["core_hpack_send_binary"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_binary") - stats["core_hpack_send_binary_base64"] = massage_qps_stats_helpers.counter(core_stats, "hpack_send_binary_base64") - stats["core_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_initiated") - stats["core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_items") - stats["core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_final_items") - stats["core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_offloaded") - stats["core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_locks_initiated") - stats["core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_locks_scheduled_items") - stats["core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_set_notify_on_cancel") - stats["core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter(core_stats, "call_combiner_cancelled") - stats["core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_short_items") - stats["core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_long_items") - stats["core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter(core_stats, "executor_scheduled_to_self") - stats["core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter(core_stats, "executor_wakeup_initiated") - stats["core_executor_queue_drained"] = massage_qps_stats_helpers.counter(core_stats, "executor_queue_drained") - stats["core_executor_push_retries"] = massage_qps_stats_helpers.counter(core_stats, "executor_push_retries") - stats["core_server_requested_calls"] = massage_qps_stats_helpers.counter(core_stats, "server_requested_calls") - stats["core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter(core_stats, "server_slowpath_requests_queued") - stats["core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_trylock_failures") - stats["core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_trylock_successes") - stats["core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter(core_stats, "cq_ev_queue_transient_pop_failures") - h = massage_qps_stats_helpers.histogram(core_stats, "call_initial_size") - stats["core_call_initial_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_call_initial_size_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_call_initial_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_call_initial_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_call_initial_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "poll_events_returned") - stats["core_poll_events_returned"] = ",".join("%f" % x for x in h.buckets) - stats["core_poll_events_returned_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_poll_events_returned_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_poll_events_returned_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_poll_events_returned_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_write_size") - stats["core_tcp_write_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_write_size_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_tcp_write_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_tcp_write_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_tcp_write_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_write_iov_size") - stats["core_tcp_write_iov_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_write_iov_size_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_tcp_write_iov_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_tcp_write_iov_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_tcp_write_iov_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_size") - stats["core_tcp_read_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_read_size_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_tcp_read_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_tcp_read_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_tcp_read_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_offer") - stats["core_tcp_read_offer"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_read_offer_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_tcp_read_offer_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_tcp_read_offer_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_tcp_read_offer_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_offer_iov_size") - stats["core_tcp_read_offer_iov_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_tcp_read_offer_iov_size_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_tcp_read_offer_iov_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_tcp_read_offer_iov_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_tcp_read_offer_iov_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_message_size") - stats["core_http2_send_message_size"] = ",".join("%f" % x for x in h.buckets) - stats["core_http2_send_message_size_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_http2_send_message_size_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_http2_send_message_size_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_http2_send_message_size_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_initial_metadata_per_write") - stats["core_http2_send_initial_metadata_per_write"] = ",".join("%f" % x for x in h.buckets) - stats["core_http2_send_initial_metadata_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_http2_send_initial_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_http2_send_initial_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_http2_send_initial_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_message_per_write") - stats["core_http2_send_message_per_write"] = ",".join("%f" % x for x in h.buckets) - stats["core_http2_send_message_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_http2_send_message_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_http2_send_message_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_http2_send_message_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_trailing_metadata_per_write") - stats["core_http2_send_trailing_metadata_per_write"] = ",".join("%f" % x for x in h.buckets) - stats["core_http2_send_trailing_metadata_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_http2_send_trailing_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_http2_send_trailing_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_http2_send_trailing_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "http2_send_flowctl_per_write") - stats["core_http2_send_flowctl_per_write"] = ",".join("%f" % x for x in h.buckets) - stats["core_http2_send_flowctl_per_write_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) - h = massage_qps_stats_helpers.histogram(core_stats, "server_cqs_checked") - stats["core_server_cqs_checked"] = ",".join("%f" % x for x in h.buckets) - stats["core_server_cqs_checked_bkts"] = ",".join("%f" % x for x in h.boundaries) - stats["core_server_cqs_checked_50p"] = massage_qps_stats_helpers.percentile(h.buckets, 50, h.boundaries) - stats["core_server_cqs_checked_95p"] = massage_qps_stats_helpers.percentile(h.buckets, 95, h.boundaries) - stats["core_server_cqs_checked_99p"] = massage_qps_stats_helpers.percentile(h.buckets, 99, h.boundaries) + for stats in scenario_result["serverStats"] + scenario_result["clientStats"]: + if "coreStats" not in stats: return + core_stats = stats["coreStats"] + del stats["coreStats"] + stats["core_client_calls_created"] = massage_qps_stats_helpers.counter( + core_stats, "client_calls_created") + stats["core_server_calls_created"] = massage_qps_stats_helpers.counter( + core_stats, "server_calls_created") + stats["core_cqs_created"] = massage_qps_stats_helpers.counter( + core_stats, "cqs_created") + stats[ + "core_client_channels_created"] = massage_qps_stats_helpers.counter( + core_stats, "client_channels_created") + stats[ + "core_client_subchannels_created"] = massage_qps_stats_helpers.counter( + core_stats, "client_subchannels_created") + stats[ + "core_server_channels_created"] = massage_qps_stats_helpers.counter( + core_stats, "server_channels_created") + stats["core_syscall_poll"] = massage_qps_stats_helpers.counter( + core_stats, "syscall_poll") + stats["core_syscall_wait"] = massage_qps_stats_helpers.counter( + core_stats, "syscall_wait") + stats["core_pollset_kick"] = massage_qps_stats_helpers.counter( + core_stats, "pollset_kick") + stats[ + "core_pollset_kicked_without_poller"] = massage_qps_stats_helpers.counter( + core_stats, "pollset_kicked_without_poller") + stats["core_pollset_kicked_again"] = massage_qps_stats_helpers.counter( + core_stats, "pollset_kicked_again") + stats[ + "core_pollset_kick_wakeup_fd"] = massage_qps_stats_helpers.counter( + core_stats, "pollset_kick_wakeup_fd") + stats[ + "core_pollset_kick_wakeup_cv"] = massage_qps_stats_helpers.counter( + core_stats, "pollset_kick_wakeup_cv") + stats[ + "core_pollset_kick_own_thread"] = massage_qps_stats_helpers.counter( + core_stats, "pollset_kick_own_thread") + stats[ + "core_histogram_slow_lookups"] = massage_qps_stats_helpers.counter( + core_stats, "histogram_slow_lookups") + stats["core_syscall_write"] = massage_qps_stats_helpers.counter( + core_stats, "syscall_write") + stats["core_syscall_read"] = massage_qps_stats_helpers.counter( + core_stats, "syscall_read") + stats[ + "core_tcp_backup_pollers_created"] = massage_qps_stats_helpers.counter( + core_stats, "tcp_backup_pollers_created") + stats[ + "core_tcp_backup_poller_polls"] = massage_qps_stats_helpers.counter( + core_stats, "tcp_backup_poller_polls") + stats["core_http2_op_batches"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_batches") + stats["core_http2_op_cancel"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_cancel") + stats[ + "core_http2_op_send_initial_metadata"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_send_initial_metadata") + stats["core_http2_op_send_message"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_send_message") + stats[ + "core_http2_op_send_trailing_metadata"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_send_trailing_metadata") + stats[ + "core_http2_op_recv_initial_metadata"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_recv_initial_metadata") + stats["core_http2_op_recv_message"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_recv_message") + stats[ + "core_http2_op_recv_trailing_metadata"] = massage_qps_stats_helpers.counter( + core_stats, "http2_op_recv_trailing_metadata") + stats["core_http2_settings_writes"] = massage_qps_stats_helpers.counter( + core_stats, "http2_settings_writes") + stats["core_http2_pings_sent"] = massage_qps_stats_helpers.counter( + core_stats, "http2_pings_sent") + stats["core_http2_writes_begun"] = massage_qps_stats_helpers.counter( + core_stats, "http2_writes_begun") + stats[ + "core_http2_writes_offloaded"] = massage_qps_stats_helpers.counter( + core_stats, "http2_writes_offloaded") + stats[ + "core_http2_writes_continued"] = massage_qps_stats_helpers.counter( + core_stats, "http2_writes_continued") + stats["core_http2_partial_writes"] = massage_qps_stats_helpers.counter( + core_stats, "http2_partial_writes") + stats[ + "core_http2_initiate_write_due_to_initial_write"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_initial_write") + stats[ + "core_http2_initiate_write_due_to_start_new_stream"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_start_new_stream") + stats[ + "core_http2_initiate_write_due_to_send_message"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_send_message") + stats[ + "core_http2_initiate_write_due_to_send_initial_metadata"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_send_initial_metadata") + stats[ + "core_http2_initiate_write_due_to_send_trailing_metadata"] = massage_qps_stats_helpers.counter( + core_stats, + "http2_initiate_write_due_to_send_trailing_metadata") + stats[ + "core_http2_initiate_write_due_to_retry_send_ping"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_retry_send_ping") + stats[ + "core_http2_initiate_write_due_to_continue_pings"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_continue_pings") + stats[ + "core_http2_initiate_write_due_to_goaway_sent"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_goaway_sent") + stats[ + "core_http2_initiate_write_due_to_rst_stream"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_rst_stream") + stats[ + "core_http2_initiate_write_due_to_close_from_api"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_close_from_api") + stats[ + "core_http2_initiate_write_due_to_stream_flow_control"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_stream_flow_control") + stats[ + "core_http2_initiate_write_due_to_transport_flow_control"] = massage_qps_stats_helpers.counter( + core_stats, + "http2_initiate_write_due_to_transport_flow_control") + stats[ + "core_http2_initiate_write_due_to_send_settings"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_send_settings") + stats[ + "core_http2_initiate_write_due_to_bdp_estimator_ping"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_bdp_estimator_ping") + stats[ + "core_http2_initiate_write_due_to_flow_control_unstalled_by_setting"] = massage_qps_stats_helpers.counter( + core_stats, + "http2_initiate_write_due_to_flow_control_unstalled_by_setting") + stats[ + "core_http2_initiate_write_due_to_flow_control_unstalled_by_update"] = massage_qps_stats_helpers.counter( + core_stats, + "http2_initiate_write_due_to_flow_control_unstalled_by_update") + stats[ + "core_http2_initiate_write_due_to_application_ping"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_application_ping") + stats[ + "core_http2_initiate_write_due_to_keepalive_ping"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_keepalive_ping") + stats[ + "core_http2_initiate_write_due_to_transport_flow_control_unstalled"] = massage_qps_stats_helpers.counter( + core_stats, + "http2_initiate_write_due_to_transport_flow_control_unstalled") + stats[ + "core_http2_initiate_write_due_to_ping_response"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_ping_response") + stats[ + "core_http2_initiate_write_due_to_force_rst_stream"] = massage_qps_stats_helpers.counter( + core_stats, "http2_initiate_write_due_to_force_rst_stream") + stats[ + "core_http2_spurious_writes_begun"] = massage_qps_stats_helpers.counter( + core_stats, "http2_spurious_writes_begun") + stats["core_hpack_recv_indexed"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_indexed") + stats[ + "core_hpack_recv_lithdr_incidx"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_lithdr_incidx") + stats[ + "core_hpack_recv_lithdr_incidx_v"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_lithdr_incidx_v") + stats[ + "core_hpack_recv_lithdr_notidx"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_lithdr_notidx") + stats[ + "core_hpack_recv_lithdr_notidx_v"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_lithdr_notidx_v") + stats[ + "core_hpack_recv_lithdr_nvridx"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_lithdr_nvridx") + stats[ + "core_hpack_recv_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_lithdr_nvridx_v") + stats[ + "core_hpack_recv_uncompressed"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_uncompressed") + stats["core_hpack_recv_huffman"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_huffman") + stats["core_hpack_recv_binary"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_binary") + stats[ + "core_hpack_recv_binary_base64"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_recv_binary_base64") + stats["core_hpack_send_indexed"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_indexed") + stats[ + "core_hpack_send_lithdr_incidx"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_lithdr_incidx") + stats[ + "core_hpack_send_lithdr_incidx_v"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_lithdr_incidx_v") + stats[ + "core_hpack_send_lithdr_notidx"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_lithdr_notidx") + stats[ + "core_hpack_send_lithdr_notidx_v"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_lithdr_notidx_v") + stats[ + "core_hpack_send_lithdr_nvridx"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_lithdr_nvridx") + stats[ + "core_hpack_send_lithdr_nvridx_v"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_lithdr_nvridx_v") + stats[ + "core_hpack_send_uncompressed"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_uncompressed") + stats["core_hpack_send_huffman"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_huffman") + stats["core_hpack_send_binary"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_binary") + stats[ + "core_hpack_send_binary_base64"] = massage_qps_stats_helpers.counter( + core_stats, "hpack_send_binary_base64") + stats[ + "core_combiner_locks_initiated"] = massage_qps_stats_helpers.counter( + core_stats, "combiner_locks_initiated") + stats[ + "core_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter( + core_stats, "combiner_locks_scheduled_items") + stats[ + "core_combiner_locks_scheduled_final_items"] = massage_qps_stats_helpers.counter( + core_stats, "combiner_locks_scheduled_final_items") + stats[ + "core_combiner_locks_offloaded"] = massage_qps_stats_helpers.counter( + core_stats, "combiner_locks_offloaded") + stats[ + "core_call_combiner_locks_initiated"] = massage_qps_stats_helpers.counter( + core_stats, "call_combiner_locks_initiated") + stats[ + "core_call_combiner_locks_scheduled_items"] = massage_qps_stats_helpers.counter( + core_stats, "call_combiner_locks_scheduled_items") + stats[ + "core_call_combiner_set_notify_on_cancel"] = massage_qps_stats_helpers.counter( + core_stats, "call_combiner_set_notify_on_cancel") + stats[ + "core_call_combiner_cancelled"] = massage_qps_stats_helpers.counter( + core_stats, "call_combiner_cancelled") + stats[ + "core_executor_scheduled_short_items"] = massage_qps_stats_helpers.counter( + core_stats, "executor_scheduled_short_items") + stats[ + "core_executor_scheduled_long_items"] = massage_qps_stats_helpers.counter( + core_stats, "executor_scheduled_long_items") + stats[ + "core_executor_scheduled_to_self"] = massage_qps_stats_helpers.counter( + core_stats, "executor_scheduled_to_self") + stats[ + "core_executor_wakeup_initiated"] = massage_qps_stats_helpers.counter( + core_stats, "executor_wakeup_initiated") + stats[ + "core_executor_queue_drained"] = massage_qps_stats_helpers.counter( + core_stats, "executor_queue_drained") + stats["core_executor_push_retries"] = massage_qps_stats_helpers.counter( + core_stats, "executor_push_retries") + stats[ + "core_server_requested_calls"] = massage_qps_stats_helpers.counter( + core_stats, "server_requested_calls") + stats[ + "core_server_slowpath_requests_queued"] = massage_qps_stats_helpers.counter( + core_stats, "server_slowpath_requests_queued") + stats[ + "core_cq_ev_queue_trylock_failures"] = massage_qps_stats_helpers.counter( + core_stats, "cq_ev_queue_trylock_failures") + stats[ + "core_cq_ev_queue_trylock_successes"] = massage_qps_stats_helpers.counter( + core_stats, "cq_ev_queue_trylock_successes") + stats[ + "core_cq_ev_queue_transient_pop_failures"] = massage_qps_stats_helpers.counter( + core_stats, "cq_ev_queue_transient_pop_failures") + h = massage_qps_stats_helpers.histogram(core_stats, "call_initial_size") + stats["core_call_initial_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_call_initial_size_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_call_initial_size_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_call_initial_size_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_call_initial_size_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "poll_events_returned") + stats["core_poll_events_returned"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_poll_events_returned_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_poll_events_returned_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_poll_events_returned_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_poll_events_returned_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_write_size") + stats["core_tcp_write_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_write_size_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats["core_tcp_write_size_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats["core_tcp_write_size_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats["core_tcp_write_size_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "tcp_write_iov_size") + stats["core_tcp_write_iov_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_write_iov_size_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_tcp_write_iov_size_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_tcp_write_iov_size_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_tcp_write_iov_size_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_size") + stats["core_tcp_read_size"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_read_size_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats["core_tcp_read_size_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats["core_tcp_read_size_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats["core_tcp_read_size_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, "tcp_read_offer") + stats["core_tcp_read_offer"] = ",".join("%f" % x for x in h.buckets) + stats["core_tcp_read_offer_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats["core_tcp_read_offer_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats["core_tcp_read_offer_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats["core_tcp_read_offer_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "tcp_read_offer_iov_size") + stats["core_tcp_read_offer_iov_size"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_tcp_read_offer_iov_size_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_tcp_read_offer_iov_size_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_tcp_read_offer_iov_size_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_tcp_read_offer_iov_size_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "http2_send_message_size") + stats["core_http2_send_message_size"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_http2_send_message_size_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_http2_send_message_size_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_http2_send_message_size_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_http2_send_message_size_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram( + core_stats, "http2_send_initial_metadata_per_write") + stats["core_http2_send_initial_metadata_per_write"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_http2_send_initial_metadata_per_write_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_http2_send_initial_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_http2_send_initial_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_http2_send_initial_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "http2_send_message_per_write") + stats["core_http2_send_message_per_write"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_http2_send_message_per_write_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_http2_send_message_per_write_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_http2_send_message_per_write_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_http2_send_message_per_write_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram( + core_stats, "http2_send_trailing_metadata_per_write") + stats["core_http2_send_trailing_metadata_per_write"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_http2_send_trailing_metadata_per_write_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_http2_send_trailing_metadata_per_write_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_http2_send_trailing_metadata_per_write_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_http2_send_trailing_metadata_per_write_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "http2_send_flowctl_per_write") + stats["core_http2_send_flowctl_per_write"] = ",".join( + "%f" % x for x in h.buckets) + stats["core_http2_send_flowctl_per_write_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_http2_send_flowctl_per_write_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_http2_send_flowctl_per_write_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_http2_send_flowctl_per_write_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) + h = massage_qps_stats_helpers.histogram(core_stats, + "server_cqs_checked") + stats["core_server_cqs_checked"] = ",".join("%f" % x for x in h.buckets) + stats["core_server_cqs_checked_bkts"] = ",".join( + "%f" % x for x in h.boundaries) + stats[ + "core_server_cqs_checked_50p"] = massage_qps_stats_helpers.percentile( + h.buckets, 50, h.boundaries) + stats[ + "core_server_cqs_checked_95p"] = massage_qps_stats_helpers.percentile( + h.buckets, 95, h.boundaries) + stats[ + "core_server_cqs_checked_99p"] = massage_qps_stats_helpers.percentile( + h.buckets, 99, h.boundaries) From e9207ab2748c2c42e2e1b355dc13f6bd02e40c3f Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 14 May 2018 16:25:15 -0700 Subject: [PATCH 4/4] Undo clang_format script change --- src/core/lib/debug/stats_data.cc | 1062 ++++++++++------- src/core/lib/debug/stats_data.h | 557 +++++---- .../clang_format_all_the_things.sh | 2 +- 3 files changed, 986 insertions(+), 635 deletions(-) diff --git a/src/core/lib/debug/stats_data.cc b/src/core/lib/debug/stats_data.cc index b4b179f1570..309ece94bb8 100644 --- a/src/core/lib/debug/stats_data.cc +++ b/src/core/lib/debug/stats_data.cc @@ -1,12 +1,12 @@ /* * Copyright 2017 gRPC authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,438 +25,658 @@ #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/exec_ctx.h" -const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = { - "client_calls_created", - "server_calls_created", - "cqs_created", - "client_channels_created", - "client_subchannels_created", - "server_channels_created", - "syscall_poll", - "syscall_wait", - "pollset_kick", - "pollset_kicked_without_poller", - "pollset_kicked_again", - "pollset_kick_wakeup_fd", - "pollset_kick_wakeup_cv", - "pollset_kick_own_thread", - "histogram_slow_lookups", - "syscall_write", - "syscall_read", - "tcp_backup_pollers_created", - "tcp_backup_poller_polls", - "http2_op_batches", - "http2_op_cancel", - "http2_op_send_initial_metadata", - "http2_op_send_message", - "http2_op_send_trailing_metadata", - "http2_op_recv_initial_metadata", - "http2_op_recv_message", - "http2_op_recv_trailing_metadata", - "http2_settings_writes", - "http2_pings_sent", - "http2_writes_begun", - "http2_writes_offloaded", - "http2_writes_continued", - "http2_partial_writes", - "http2_initiate_write_due_to_initial_write", - "http2_initiate_write_due_to_start_new_stream", - "http2_initiate_write_due_to_send_message", - "http2_initiate_write_due_to_send_initial_metadata", - "http2_initiate_write_due_to_send_trailing_metadata", - "http2_initiate_write_due_to_retry_send_ping", - "http2_initiate_write_due_to_continue_pings", - "http2_initiate_write_due_to_goaway_sent", - "http2_initiate_write_due_to_rst_stream", - "http2_initiate_write_due_to_close_from_api", - "http2_initiate_write_due_to_stream_flow_control", - "http2_initiate_write_due_to_transport_flow_control", - "http2_initiate_write_due_to_send_settings", - "http2_initiate_write_due_to_bdp_estimator_ping", - "http2_initiate_write_due_to_flow_control_unstalled_by_setting", - "http2_initiate_write_due_to_flow_control_unstalled_by_update", - "http2_initiate_write_due_to_application_ping", - "http2_initiate_write_due_to_keepalive_ping", - "http2_initiate_write_due_to_transport_flow_control_unstalled", - "http2_initiate_write_due_to_ping_response", - "http2_initiate_write_due_to_force_rst_stream", - "http2_spurious_writes_begun", - "hpack_recv_indexed", - "hpack_recv_lithdr_incidx", - "hpack_recv_lithdr_incidx_v", - "hpack_recv_lithdr_notidx", - "hpack_recv_lithdr_notidx_v", - "hpack_recv_lithdr_nvridx", - "hpack_recv_lithdr_nvridx_v", - "hpack_recv_uncompressed", - "hpack_recv_huffman", - "hpack_recv_binary", - "hpack_recv_binary_base64", - "hpack_send_indexed", - "hpack_send_lithdr_incidx", - "hpack_send_lithdr_incidx_v", - "hpack_send_lithdr_notidx", - "hpack_send_lithdr_notidx_v", - "hpack_send_lithdr_nvridx", - "hpack_send_lithdr_nvridx_v", - "hpack_send_uncompressed", - "hpack_send_huffman", - "hpack_send_binary", - "hpack_send_binary_base64", - "combiner_locks_initiated", - "combiner_locks_scheduled_items", - "combiner_locks_scheduled_final_items", - "combiner_locks_offloaded", - "call_combiner_locks_initiated", - "call_combiner_locks_scheduled_items", - "call_combiner_set_notify_on_cancel", - "call_combiner_cancelled", - "executor_scheduled_short_items", - "executor_scheduled_long_items", - "executor_scheduled_to_self", - "executor_wakeup_initiated", - "executor_queue_drained", - "executor_push_retries", - "server_requested_calls", - "server_slowpath_requests_queued", - "cq_ev_queue_trylock_failures", - "cq_ev_queue_trylock_successes", - "cq_ev_queue_transient_pop_failures", +const char* grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = { + "client_calls_created", + "server_calls_created", + "cqs_created", + "client_channels_created", + "client_subchannels_created", + "server_channels_created", + "syscall_poll", + "syscall_wait", + "pollset_kick", + "pollset_kicked_without_poller", + "pollset_kicked_again", + "pollset_kick_wakeup_fd", + "pollset_kick_wakeup_cv", + "pollset_kick_own_thread", + "histogram_slow_lookups", + "syscall_write", + "syscall_read", + "tcp_backup_pollers_created", + "tcp_backup_poller_polls", + "http2_op_batches", + "http2_op_cancel", + "http2_op_send_initial_metadata", + "http2_op_send_message", + "http2_op_send_trailing_metadata", + "http2_op_recv_initial_metadata", + "http2_op_recv_message", + "http2_op_recv_trailing_metadata", + "http2_settings_writes", + "http2_pings_sent", + "http2_writes_begun", + "http2_writes_offloaded", + "http2_writes_continued", + "http2_partial_writes", + "http2_initiate_write_due_to_initial_write", + "http2_initiate_write_due_to_start_new_stream", + "http2_initiate_write_due_to_send_message", + "http2_initiate_write_due_to_send_initial_metadata", + "http2_initiate_write_due_to_send_trailing_metadata", + "http2_initiate_write_due_to_retry_send_ping", + "http2_initiate_write_due_to_continue_pings", + "http2_initiate_write_due_to_goaway_sent", + "http2_initiate_write_due_to_rst_stream", + "http2_initiate_write_due_to_close_from_api", + "http2_initiate_write_due_to_stream_flow_control", + "http2_initiate_write_due_to_transport_flow_control", + "http2_initiate_write_due_to_send_settings", + "http2_initiate_write_due_to_bdp_estimator_ping", + "http2_initiate_write_due_to_flow_control_unstalled_by_setting", + "http2_initiate_write_due_to_flow_control_unstalled_by_update", + "http2_initiate_write_due_to_application_ping", + "http2_initiate_write_due_to_keepalive_ping", + "http2_initiate_write_due_to_transport_flow_control_unstalled", + "http2_initiate_write_due_to_ping_response", + "http2_initiate_write_due_to_force_rst_stream", + "http2_spurious_writes_begun", + "hpack_recv_indexed", + "hpack_recv_lithdr_incidx", + "hpack_recv_lithdr_incidx_v", + "hpack_recv_lithdr_notidx", + "hpack_recv_lithdr_notidx_v", + "hpack_recv_lithdr_nvridx", + "hpack_recv_lithdr_nvridx_v", + "hpack_recv_uncompressed", + "hpack_recv_huffman", + "hpack_recv_binary", + "hpack_recv_binary_base64", + "hpack_send_indexed", + "hpack_send_lithdr_incidx", + "hpack_send_lithdr_incidx_v", + "hpack_send_lithdr_notidx", + "hpack_send_lithdr_notidx_v", + "hpack_send_lithdr_nvridx", + "hpack_send_lithdr_nvridx_v", + "hpack_send_uncompressed", + "hpack_send_huffman", + "hpack_send_binary", + "hpack_send_binary_base64", + "combiner_locks_initiated", + "combiner_locks_scheduled_items", + "combiner_locks_scheduled_final_items", + "combiner_locks_offloaded", + "call_combiner_locks_initiated", + "call_combiner_locks_scheduled_items", + "call_combiner_set_notify_on_cancel", + "call_combiner_cancelled", + "executor_scheduled_short_items", + "executor_scheduled_long_items", + "executor_scheduled_to_self", + "executor_wakeup_initiated", + "executor_queue_drained", + "executor_push_retries", + "server_requested_calls", + "server_slowpath_requests_queued", + "cq_ev_queue_trylock_failures", + "cq_ev_queue_trylock_successes", + "cq_ev_queue_transient_pop_failures", }; -const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = { - "Number of client side calls created by this process", - "Number of server side calls created by this process", - "Number of completion queues created", - "Number of client channels created", - "Number of client subchannels created", - "Number of server channels created", - "Number of polling syscalls (epoll_wait, poll, etc) made by this process", - "Number of sleeping syscalls made by this process", - "How many polling wakeups were performed by the process (only valid for epoll1 right now)", - "How many times was a polling wakeup requested without an active poller (only valid for epoll1 right now)", - "How many times was the same polling worker awoken repeatedly before waking up (only valid for epoll1 right now)", - "How many times was an eventfd used as the wakeup vector for a polling wakeup (only valid for epoll1 right now)", - "How many times was a condition variable used as the wakeup vector for a polling wakeup (only valid for epoll1 right now)", - "How many times could a polling wakeup be satisfied by keeping the waking thread awake? (only valid for epoll1 right now)", - "Number of times histogram increments went through the slow (binary search) path", - "Number of write syscalls (or equivalent - eg sendmsg) made by this process", - "Number of read syscalls (or equivalent - eg recvmsg) made by this process", - "Number of times a backup poller has been created (this can be expensive)", - "Number of polls performed on the backup poller", - "Number of batches received by HTTP2 transport", - "Number of cancelations received by HTTP2 transport", - "Number of batches containing send initial metadata", - "Number of batches containing send message", - "Number of batches containing send trailing metadata", - "Number of batches containing receive initial metadata", - "Number of batches containing receive message", - "Number of batches containing receive trailing metadata", - "Number of settings frames sent", - "Number of HTTP2 pings sent by process", - "Number of HTTP2 writes initiated", - "Number of HTTP2 writes offloaded to the executor from application threads", - "Number of HTTP2 writes that finished seeing more data needed to be written", - "Number of HTTP2 writes that were made knowing there was still more data to be written (we cap maximum write size to syscall_write)", - "Number of HTTP2 writes initiated due to 'initial_write'", - "Number of HTTP2 writes initiated due to 'start_new_stream'", - "Number of HTTP2 writes initiated due to 'send_message'", - "Number of HTTP2 writes initiated due to 'send_initial_metadata'", - "Number of HTTP2 writes initiated due to 'send_trailing_metadata'", - "Number of HTTP2 writes initiated due to 'retry_send_ping'", - "Number of HTTP2 writes initiated due to 'continue_pings'", - "Number of HTTP2 writes initiated due to 'goaway_sent'", - "Number of HTTP2 writes initiated due to 'rst_stream'", - "Number of HTTP2 writes initiated due to 'close_from_api'", - "Number of HTTP2 writes initiated due to 'stream_flow_control'", - "Number of HTTP2 writes initiated due to 'transport_flow_control'", - "Number of HTTP2 writes initiated due to 'send_settings'", - "Number of HTTP2 writes initiated due to 'bdp_estimator_ping'", - "Number of HTTP2 writes initiated due to 'flow_control_unstalled_by_setting'", - "Number of HTTP2 writes initiated due to 'flow_control_unstalled_by_update'", - "Number of HTTP2 writes initiated due to 'application_ping'", - "Number of HTTP2 writes initiated due to 'keepalive_ping'", - "Number of HTTP2 writes initiated due to 'transport_flow_control_unstalled'", - "Number of HTTP2 writes initiated due to 'ping_response'", - "Number of HTTP2 writes initiated due to 'force_rst_stream'", - "Number of HTTP2 writes initiated with nothing to write", - "Number of HPACK indexed fields received", - "Number of HPACK literal headers received with incremental indexing", - "Number of HPACK literal headers received with incremental indexing and literal keys", - "Number of HPACK literal headers received with no indexing", - "Number of HPACK literal headers received with no indexing and literal keys", - "Number of HPACK literal headers received with never-indexing", - "Number of HPACK literal headers received with never-indexing and literal keys", - "Number of uncompressed strings received in metadata", - "Number of huffman encoded strings received in metadata", - "Number of binary strings received in metadata", - "Number of binary strings received encoded in base64 in metadata", - "Number of HPACK indexed fields sent", - "Number of HPACK literal headers sent with incremental indexing", - "Number of HPACK literal headers sent with incremental indexing and literal keys", - "Number of HPACK literal headers sent with no indexing", - "Number of HPACK literal headers sent with no indexing and literal keys", - "Number of HPACK literal headers sent with never-indexing", - "Number of HPACK literal headers sent with never-indexing and literal keys", - "Number of uncompressed strings sent in metadata", - "Number of huffman encoded strings sent in metadata", - "Number of binary strings received in metadata", - "Number of binary strings received encoded in base64 in metadata", - "Number of combiner lock entries by process (first items queued to a combiner)", - "Number of items scheduled against combiner locks", - "Number of final items scheduled against combiner locks", - "Number of combiner locks offloaded to different threads", - "Number of call combiner lock entries by process (first items queued to a call combiner)", - "Number of items scheduled against call combiner locks", - "Number of times a cancellation callback was set on a call combiner", - "Number of times a call combiner was cancelled", - "Number of finite runtime closures scheduled against the executor (gRPC thread pool)", - "Number of potentially infinite runtime closures scheduled against the executor (gRPC thread pool)", - "Number of closures scheduled by the executor to the executor", - "Number of thread wakeups initiated within the executor", - "Number of times an executor queue was drained", - "Number of times we raced and were forced to retry pushing a closure to the executor", - "How many calls were requested (not necessarily received) by the server", - "How many times was the server slow path taken (indicates too few outstanding requests)", - "Number of lock (trylock) acquisition failures on completion queue event queue. High value here indicates high contention on completion queues", - "Number of lock (trylock) acquisition successes on completion queue event queue.", - "Number of times NULL was popped out of completion queue's event queue even though the event queue was not empty", +const char* grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = { + "Number of client side calls created by this process", + "Number of server side calls created by this process", + "Number of completion queues created", + "Number of client channels created", + "Number of client subchannels created", + "Number of server channels created", + "Number of polling syscalls (epoll_wait, poll, etc) made by this process", + "Number of sleeping syscalls made by this process", + "How many polling wakeups were performed by the process (only valid for " + "epoll1 right now)", + "How many times was a polling wakeup requested without an active poller " + "(only valid for epoll1 right now)", + "How many times was the same polling worker awoken repeatedly before " + "waking up (only valid for epoll1 right now)", + "How many times was an eventfd used as the wakeup vector for a polling " + "wakeup (only valid for epoll1 right now)", + "How many times was a condition variable used as the wakeup vector for a " + "polling wakeup (only valid for epoll1 right now)", + "How many times could a polling wakeup be satisfied by keeping the waking " + "thread awake? (only valid for epoll1 right now)", + "Number of times histogram increments went through the slow (binary " + "search) path", + "Number of write syscalls (or equivalent - eg sendmsg) made by this " + "process", + "Number of read syscalls (or equivalent - eg recvmsg) made by this process", + "Number of times a backup poller has been created (this can be expensive)", + "Number of polls performed on the backup poller", + "Number of batches received by HTTP2 transport", + "Number of cancelations received by HTTP2 transport", + "Number of batches containing send initial metadata", + "Number of batches containing send message", + "Number of batches containing send trailing metadata", + "Number of batches containing receive initial metadata", + "Number of batches containing receive message", + "Number of batches containing receive trailing metadata", + "Number of settings frames sent", + "Number of HTTP2 pings sent by process", + "Number of HTTP2 writes initiated", + "Number of HTTP2 writes offloaded to the executor from application threads", + "Number of HTTP2 writes that finished seeing more data needed to be " + "written", + "Number of HTTP2 writes that were made knowing there was still more data " + "to be written (we cap maximum write size to syscall_write)", + "Number of HTTP2 writes initiated due to 'initial_write'", + "Number of HTTP2 writes initiated due to 'start_new_stream'", + "Number of HTTP2 writes initiated due to 'send_message'", + "Number of HTTP2 writes initiated due to 'send_initial_metadata'", + "Number of HTTP2 writes initiated due to 'send_trailing_metadata'", + "Number of HTTP2 writes initiated due to 'retry_send_ping'", + "Number of HTTP2 writes initiated due to 'continue_pings'", + "Number of HTTP2 writes initiated due to 'goaway_sent'", + "Number of HTTP2 writes initiated due to 'rst_stream'", + "Number of HTTP2 writes initiated due to 'close_from_api'", + "Number of HTTP2 writes initiated due to 'stream_flow_control'", + "Number of HTTP2 writes initiated due to 'transport_flow_control'", + "Number of HTTP2 writes initiated due to 'send_settings'", + "Number of HTTP2 writes initiated due to 'bdp_estimator_ping'", + "Number of HTTP2 writes initiated due to " + "'flow_control_unstalled_by_setting'", + "Number of HTTP2 writes initiated due to " + "'flow_control_unstalled_by_update'", + "Number of HTTP2 writes initiated due to 'application_ping'", + "Number of HTTP2 writes initiated due to 'keepalive_ping'", + "Number of HTTP2 writes initiated due to " + "'transport_flow_control_unstalled'", + "Number of HTTP2 writes initiated due to 'ping_response'", + "Number of HTTP2 writes initiated due to 'force_rst_stream'", + "Number of HTTP2 writes initiated with nothing to write", + "Number of HPACK indexed fields received", + "Number of HPACK literal headers received with incremental indexing", + "Number of HPACK literal headers received with incremental indexing and " + "literal keys", + "Number of HPACK literal headers received with no indexing", + "Number of HPACK literal headers received with no indexing and literal " + "keys", + "Number of HPACK literal headers received with never-indexing", + "Number of HPACK literal headers received with never-indexing and literal " + "keys", + "Number of uncompressed strings received in metadata", + "Number of huffman encoded strings received in metadata", + "Number of binary strings received in metadata", + "Number of binary strings received encoded in base64 in metadata", + "Number of HPACK indexed fields sent", + "Number of HPACK literal headers sent with incremental indexing", + "Number of HPACK literal headers sent with incremental indexing and " + "literal keys", + "Number of HPACK literal headers sent with no indexing", + "Number of HPACK literal headers sent with no indexing and literal keys", + "Number of HPACK literal headers sent with never-indexing", + "Number of HPACK literal headers sent with never-indexing and literal keys", + "Number of uncompressed strings sent in metadata", + "Number of huffman encoded strings sent in metadata", + "Number of binary strings received in metadata", + "Number of binary strings received encoded in base64 in metadata", + "Number of combiner lock entries by process (first items queued to a " + "combiner)", + "Number of items scheduled against combiner locks", + "Number of final items scheduled against combiner locks", + "Number of combiner locks offloaded to different threads", + "Number of call combiner lock entries by process (first items queued to a " + "call combiner)", + "Number of items scheduled against call combiner locks", + "Number of times a cancellation callback was set on a call combiner", + "Number of times a call combiner was cancelled", + "Number of finite runtime closures scheduled against the executor (gRPC " + "thread pool)", + "Number of potentially infinite runtime closures scheduled against the " + "executor (gRPC thread pool)", + "Number of closures scheduled by the executor to the executor", + "Number of thread wakeups initiated within the executor", + "Number of times an executor queue was drained", + "Number of times we raced and were forced to retry pushing a closure to " + "the executor", + "How many calls were requested (not necessarily received) by the server", + "How many times was the server slow path taken (indicates too few " + "outstanding requests)", + "Number of lock (trylock) acquisition failures on completion queue event " + "queue. High value here indicates high contention on completion queues", + "Number of lock (trylock) acquisition successes on completion queue event " + "queue.", + "Number of times NULL was popped out of completion queue's event queue " + "even though the event queue was not empty", }; -const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = { - "call_initial_size", - "poll_events_returned", - "tcp_write_size", - "tcp_write_iov_size", - "tcp_read_size", - "tcp_read_offer", - "tcp_read_offer_iov_size", - "http2_send_message_size", - "http2_send_initial_metadata_per_write", - "http2_send_message_per_write", - "http2_send_trailing_metadata_per_write", - "http2_send_flowctl_per_write", - "server_cqs_checked", +const char* grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = { + "call_initial_size", + "poll_events_returned", + "tcp_write_size", + "tcp_write_iov_size", + "tcp_read_size", + "tcp_read_offer", + "tcp_read_offer_iov_size", + "http2_send_message_size", + "http2_send_initial_metadata_per_write", + "http2_send_message_per_write", + "http2_send_trailing_metadata_per_write", + "http2_send_flowctl_per_write", + "server_cqs_checked", }; -const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = { - "Initial size of the grpc_call arena created at call start", - "How many events are called for each syscall_poll", - "Number of bytes offered to each syscall_write", - "Number of byte segments offered to each syscall_write", - "Number of bytes received by each syscall_read", - "Number of bytes offered to each syscall_read", - "Number of byte segments offered to each syscall_read", - "Size of messages received by HTTP2 transport", - "Number of streams initiated written per TCP write", - "Number of streams whose payload was written per TCP write", - "Number of streams terminated per TCP write", - "Number of flow control updates written per TCP write", - "How many completion queues were checked looking for a CQ that had requested the incoming call", +const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = { + "Initial size of the grpc_call arena created at call start", + "How many events are called for each syscall_poll", + "Number of bytes offered to each syscall_write", + "Number of byte segments offered to each syscall_write", + "Number of bytes received by each syscall_read", + "Number of bytes offered to each syscall_read", + "Number of byte segments offered to each syscall_read", + "Size of messages received by HTTP2 transport", + "Number of streams initiated written per TCP write", + "Number of streams whose payload was written per TCP write", + "Number of streams terminated per TCP write", + "Number of flow control updates written per TCP write", + "How many completion queues were checked looking for a CQ that had " + "requested the incoming call", }; -const int grpc_stats_table_0[65] = {0,1,2,3,4,5,7,9,11,14,17,21,26,32,39,47,57,68,82,98,117,140,167,199,238,284,339,404,482,575,685,816,972,1158,1380,1644,1959,2334,2780,3312,3945,4699,5597,6667,7941,9459,11267,13420,15984,19038,22676,27009,32169,38315,45635,54353,64737,77104,91834,109378,130273,155159,184799,220100,262144}; -const uint8_t grpc_stats_table_1[124] = {0,0,0,1,1,1,2,2,3,3,3,4,4,5,5,6,6,6,7,7,7,8,9,9,10,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,22,23,24,24,25,25,26,26,26,27,27,28,29,29,30,30,30,31,31,32,33,33,34,34,34,35,35,36,37,37,37,38,38,39,39,40,40,41,41,42,42,43,43,44,44,45,45,46,46,47,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,55,56,56,57,57,58,58}; -const int grpc_stats_table_2[129] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,63,66,69,72,75,78,81,84,87,90,94,98,102,106,110,114,118,122,126,131,136,141,146,151,156,162,168,174,180,186,192,199,206,213,220,228,236,244,252,260,269,278,287,297,307,317,327,338,349,360,372,384,396,409,422,436,450,464,479,494,510,526,543,560,578,596,615,634,654,674,695,717,739,762,785,809,834,859,885,912,939,967,996,1024}; -const uint8_t grpc_stats_table_3[166] = {0,0,0,1,1,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,16,17,17,18,19,19,20,21,21,22,23,23,24,25,25,26,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,36,36,37,38,39,40,40,41,42,42,43,44,44,45,46,46,47,48,48,49,49,50,50,51,51,52,52,53,53,54,54,55,56,57,58,59,59,60,61,62,63,63,64,65,65,66,67,67,68,69,69,70,71,71,72,72,73,73,74,75,75,76,76,77,78,79,79,80,81,82,83,84,85,85,86,87,88,88,89,90,90,91,92,92,93,94,94,95,95,96,97,97,98,98,99}; -const int grpc_stats_table_4[65] = {0,1,2,3,4,6,8,11,15,20,26,34,44,57,73,94,121,155,199,255,327,419,537,688,881,1128,1444,1848,2365,3026,3872,4954,6338,8108,10373,13270,16976,21717,27782,35541,45467,58165,74409,95189,121772,155778,199281,254933,326126,417200,533707,682750,873414,1117323,1429345,1828502,2339127,2992348,3827987,4896985,6264509,8013925,10251880,13114801,16777216}; -const uint8_t grpc_stats_table_5[87] = {0,0,1,1,2,3,3,4,4,5,6,6,7,8,8,9,10,11,11,12,13,13,14,15,15,16,17,17,18,19,20,20,21,22,22,23,24,25,25,26,27,27,28,29,29,30,31,31,32,33,34,34,35,36,36,37,38,39,39,40,41,41,42,43,44,44,45,45,46,47,48,48,49,50,51,51,52,53,53,54,55,56,56,57,58,58,59}; -const int grpc_stats_table_6[65] = {0,1,2,3,4,5,6,7,8,9,10,11,12,14,16,18,20,22,24,27,30,33,36,39,43,47,51,56,61,66,72,78,85,92,100,109,118,128,139,151,164,178,193,209,226,244,264,285,308,333,359,387,418,451,486,524,565,609,656,707,762,821,884,952,1024}; -const uint8_t grpc_stats_table_7[102] = {0,0,0,1,1,1,1,2,2,3,3,4,4,5,5,6,6,6,7,7,7,8,8,9,9,10,11,11,12,12,13,13,14,14,14,15,15,16,16,17,17,18,19,19,20,20,21,21,22,22,23,23,24,24,24,25,26,27,27,28,28,29,29,30,30,31,31,32,32,33,33,34,35,35,36,37,37,38,38,39,39,40,40,41,41,42,42,43,44,44,45,46,46,47,48,48,49,49,50,50,51,51}; -const int grpc_stats_table_8[9] = {0,1,2,4,7,13,23,39,64}; -const uint8_t grpc_stats_table_9[9] = {0,0,1,2,2,3,4,4,5}; -void grpc_stats_inc_call_initial_size(int value) {value = GPR_CLAMP(value, 0, 262144); -if (value < 6) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4651092515166879744ull) { -int bucket = grpc_stats_table_1[((_val.uint - 4618441417868443648ull) >> 49)] + 6; -_bkt.dbl = grpc_stats_table_0[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, bucket); -return; +const int grpc_stats_table_0[65] = { + 0, 1, 2, 3, 4, 5, 7, 9, 11, 14, + 17, 21, 26, 32, 39, 47, 57, 68, 82, 98, + 117, 140, 167, 199, 238, 284, 339, 404, 482, 575, + 685, 816, 972, 1158, 1380, 1644, 1959, 2334, 2780, 3312, + 3945, 4699, 5597, 6667, 7941, 9459, 11267, 13420, 15984, 19038, + 22676, 27009, 32169, 38315, 45635, 54353, 64737, 77104, 91834, 109378, + 130273, 155159, 184799, 220100, 262144}; +const uint8_t grpc_stats_table_1[124] = { + 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, + 7, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, + 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 22, 23, 24, + 24, 25, 25, 26, 26, 26, 27, 27, 28, 29, 29, 30, 30, 30, 31, 31, 32, 33, + 33, 34, 34, 34, 35, 35, 36, 37, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41, + 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, 50, + 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 56, 56, 57, 57, 58, 58}; +const int grpc_stats_table_2[129] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, + 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, + 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 94, 98, 102, 106, 110, + 114, 118, 122, 126, 131, 136, 141, 146, 151, 156, 162, 168, 174, 180, 186, + 192, 199, 206, 213, 220, 228, 236, 244, 252, 260, 269, 278, 287, 297, 307, + 317, 327, 338, 349, 360, 372, 384, 396, 409, 422, 436, 450, 464, 479, 494, + 510, 526, 543, 560, 578, 596, 615, 634, 654, 674, 695, 717, 739, 762, 785, + 809, 834, 859, 885, 912, 939, 967, 996, 1024}; +const uint8_t grpc_stats_table_3[166] = { + 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, + 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 26, 27, 27, 28, + 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38, 39, + 40, 40, 41, 42, 42, 43, 44, 44, 45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, + 51, 52, 52, 53, 53, 54, 54, 55, 56, 57, 58, 59, 59, 60, 61, 62, 63, 63, 64, + 65, 65, 66, 67, 67, 68, 69, 69, 70, 71, 71, 72, 72, 73, 73, 74, 75, 75, 76, + 76, 77, 78, 79, 79, 80, 81, 82, 83, 84, 85, 85, 86, 87, 88, 88, 89, 90, 90, + 91, 92, 92, 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, 99}; +const int grpc_stats_table_4[65] = { + 0, 1, 2, 3, 4, 6, 8, 11, + 15, 20, 26, 34, 44, 57, 73, 94, + 121, 155, 199, 255, 327, 419, 537, 688, + 881, 1128, 1444, 1848, 2365, 3026, 3872, 4954, + 6338, 8108, 10373, 13270, 16976, 21717, 27782, 35541, + 45467, 58165, 74409, 95189, 121772, 155778, 199281, 254933, + 326126, 417200, 533707, 682750, 873414, 1117323, 1429345, 1828502, + 2339127, 2992348, 3827987, 4896985, 6264509, 8013925, 10251880, 13114801, + 16777216}; +const uint8_t grpc_stats_table_5[87] = { + 0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 11, + 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 20, 20, 21, 22, 22, 23, + 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 31, 32, 33, 34, 34, 35, 36, + 36, 37, 38, 39, 39, 40, 41, 41, 42, 43, 44, 44, 45, 45, 46, 47, 48, 48, + 49, 50, 51, 51, 52, 53, 53, 54, 55, 56, 56, 57, 58, 58, 59}; +const int grpc_stats_table_6[65] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 14, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, + 51, 56, 61, 66, 72, 78, 85, 92, 100, 109, 118, 128, 139, + 151, 164, 178, 193, 209, 226, 244, 264, 285, 308, 333, 359, 387, + 418, 451, 486, 524, 565, 609, 656, 707, 762, 821, 884, 952, 1024}; +const uint8_t grpc_stats_table_7[102] = { + 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 6, 7, 7, 7, 8, 8, 9, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, + 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, + 23, 24, 24, 24, 25, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, + 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41, + 42, 42, 43, 44, 44, 45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, 51}; +const int grpc_stats_table_8[9] = {0, 1, 2, 4, 7, 13, 23, 39, 64}; +const uint8_t grpc_stats_table_9[9] = {0, 0, 1, 2, 2, 3, 4, 4, 5}; +void grpc_stats_inc_call_initial_size(int value) { + value = GPR_CLAMP(value, 0, 262144); + if (value < 6) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4651092515166879744ull) { + int bucket = + grpc_stats_table_1[((_val.uint - 4618441417868443648ull) >> 49)] + 6; + _bkt.dbl = grpc_stats_table_0[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_0, 64)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_0, 64)); +void grpc_stats_inc_poll_events_returned(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 29) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4642789003353915392ull) { + int bucket = + grpc_stats_table_3[((_val.uint - 4628855992006737920ull) >> 47)] + 29; + _bkt.dbl = grpc_stats_table_2[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_2, 128)); } -void grpc_stats_inc_poll_events_returned(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 29) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4642789003353915392ull) { -int bucket = grpc_stats_table_3[((_val.uint - 4628855992006737920ull) >> 47)] + 29; -_bkt.dbl = grpc_stats_table_2[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, bucket); -return; +void grpc_stats_inc_tcp_write_size(int value) { + value = GPR_CLAMP(value, 0, 16777216); + if (value < 5) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4683743612465315840ull) { + int bucket = + grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; + _bkt.dbl = grpc_stats_table_4[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_2, 128)); +void grpc_stats_inc_tcp_write_iov_size(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 13) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4637863191261478912ull) { + int bucket = + grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; + _bkt.dbl = grpc_stats_table_6[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -void grpc_stats_inc_tcp_write_size(int value) {value = GPR_CLAMP(value, 0, 16777216); -if (value < 5) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4683743612465315840ull) { -int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; -_bkt.dbl = grpc_stats_table_4[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, bucket); -return; +void grpc_stats_inc_tcp_read_size(int value) { + value = GPR_CLAMP(value, 0, 16777216); + if (value < 5) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4683743612465315840ull) { + int bucket = + grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; + _bkt.dbl = grpc_stats_table_4[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +void grpc_stats_inc_tcp_read_offer(int value) { + value = GPR_CLAMP(value, 0, 16777216); + if (value < 5) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4683743612465315840ull) { + int bucket = + grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; + _bkt.dbl = grpc_stats_table_4[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -void grpc_stats_inc_tcp_write_iov_size(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 13) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4637863191261478912ull) { -int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; -_bkt.dbl = grpc_stats_table_6[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, bucket); -return; +void grpc_stats_inc_tcp_read_offer_iov_size(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 13) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, + value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4637863191261478912ull) { + int bucket = + grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; + _bkt.dbl = grpc_stats_table_6[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, + bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); +void grpc_stats_inc_http2_send_message_size(int value) { + value = GPR_CLAMP(value, 0, 16777216); + if (value < 5) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, + value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4683743612465315840ull) { + int bucket = + grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; + _bkt.dbl = grpc_stats_table_4[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, + bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); } -void grpc_stats_inc_tcp_read_size(int value) {value = GPR_CLAMP(value, 0, 16777216); -if (value < 5) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4683743612465315840ull) { -int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; -_bkt.dbl = grpc_stats_table_4[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, bucket); -return; +void grpc_stats_inc_http2_send_initial_metadata_per_write(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 13) { + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4637863191261478912ull) { + int bucket = + grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; + _bkt.dbl = grpc_stats_table_6[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +void grpc_stats_inc_http2_send_message_per_write(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 13) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, + value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4637863191261478912ull) { + int bucket = + grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; + _bkt.dbl = grpc_stats_table_6[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, + bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -void grpc_stats_inc_tcp_read_offer(int value) {value = GPR_CLAMP(value, 0, 16777216); -if (value < 5) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4683743612465315840ull) { -int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; -_bkt.dbl = grpc_stats_table_4[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, bucket); -return; +void grpc_stats_inc_http2_send_trailing_metadata_per_write(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 13) { + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4637863191261478912ull) { + int bucket = + grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; + _bkt.dbl = grpc_stats_table_6[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); +void grpc_stats_inc_http2_send_flowctl_per_write(int value) { + value = GPR_CLAMP(value, 0, 1024); + if (value < 13) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, + value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4637863191261478912ull) { + int bucket = + grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; + _bkt.dbl = grpc_stats_table_6[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, + bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); } -void grpc_stats_inc_tcp_read_offer_iov_size(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 13) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4637863191261478912ull) { -int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; -_bkt.dbl = grpc_stats_table_6[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, bucket); -return; +void grpc_stats_inc_server_cqs_checked(int value) { + value = GPR_CLAMP(value, 0, 64); + if (value < 3) { + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, value); + return; + } + union { + double dbl; + uint64_t uint; + } _val, _bkt; + _val.dbl = value; + if (_val.uint < 4625196817309499392ull) { + int bucket = + grpc_stats_table_9[((_val.uint - 4613937818241073152ull) >> 51)] + 3; + _bkt.dbl = grpc_stats_table_8[bucket]; + bucket -= (_val.uint < _bkt.uint); + GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, bucket); + return; + } + GRPC_STATS_INC_HISTOGRAM( + GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, + grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_8, 8)); } -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_IOV_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); -} -void grpc_stats_inc_http2_send_message_size(int value) {value = GPR_CLAMP(value, 0, 16777216); -if (value < 5) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4683743612465315840ull) { -int bucket = grpc_stats_table_5[((_val.uint - 4617315517961601024ull) >> 50)] + 5; -_bkt.dbl = grpc_stats_table_4[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, bucket); -return; -} -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_4, 64)); -} -void grpc_stats_inc_http2_send_initial_metadata_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 13) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4637863191261478912ull) { -int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; -_bkt.dbl = grpc_stats_table_6[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, bucket); -return; -} -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_INITIAL_METADATA_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); -} -void grpc_stats_inc_http2_send_message_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 13) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4637863191261478912ull) { -int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; -_bkt.dbl = grpc_stats_table_6[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, bucket); -return; -} -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); -} -void grpc_stats_inc_http2_send_trailing_metadata_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 13) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4637863191261478912ull) { -int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; -_bkt.dbl = grpc_stats_table_6[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, bucket); -return; -} -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_TRAILING_METADATA_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); -} -void grpc_stats_inc_http2_send_flowctl_per_write(int value) {value = GPR_CLAMP(value, 0, 1024); -if (value < 13) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4637863191261478912ull) { -int bucket = grpc_stats_table_7[((_val.uint - 4623507967449235456ull) >> 48)] + 13; -_bkt.dbl = grpc_stats_table_6[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, bucket); -return; -} -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_HTTP2_SEND_FLOWCTL_PER_WRITE, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_6, 64)); -} -void grpc_stats_inc_server_cqs_checked(int value) {value = GPR_CLAMP(value, 0, 64); -if (value < 3) { -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, value); -return; -}union { double dbl; uint64_t uint; } _val, _bkt; -_val.dbl = value; -if (_val.uint < 4625196817309499392ull) { -int bucket = grpc_stats_table_9[((_val.uint - 4613937818241073152ull) >> 51)] + 3; -_bkt.dbl = grpc_stats_table_8[bucket]; -bucket -= (_val.uint < _bkt.uint); -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, bucket); -return; -} -GRPC_STATS_INC_HISTOGRAM(GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, grpc_stats_histo_find_bucket_slow(value, grpc_stats_table_8, 8)); -} -const int grpc_stats_histo_buckets[13] = {64,128,64,64,64,64,64,64,64,64,64,64,8}; -const int grpc_stats_histo_start[13] = {0,64,192,256,320,384,448,512,576,640,704,768,832}; -const int *const grpc_stats_histo_bucket_boundaries[13] = {grpc_stats_table_0,grpc_stats_table_2,grpc_stats_table_4,grpc_stats_table_6,grpc_stats_table_4,grpc_stats_table_4,grpc_stats_table_6,grpc_stats_table_4,grpc_stats_table_6,grpc_stats_table_6,grpc_stats_table_6,grpc_stats_table_6,grpc_stats_table_8}; -void (*const grpc_stats_inc_histogram[13])(int x) = {grpc_stats_inc_call_initial_size,grpc_stats_inc_poll_events_returned,grpc_stats_inc_tcp_write_size,grpc_stats_inc_tcp_write_iov_size,grpc_stats_inc_tcp_read_size,grpc_stats_inc_tcp_read_offer,grpc_stats_inc_tcp_read_offer_iov_size,grpc_stats_inc_http2_send_message_size,grpc_stats_inc_http2_send_initial_metadata_per_write,grpc_stats_inc_http2_send_message_per_write,grpc_stats_inc_http2_send_trailing_metadata_per_write,grpc_stats_inc_http2_send_flowctl_per_write,grpc_stats_inc_server_cqs_checked}; +const int grpc_stats_histo_buckets[13] = {64, 128, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 8}; +const int grpc_stats_histo_start[13] = {0, 64, 192, 256, 320, 384, 448, + 512, 576, 640, 704, 768, 832}; +const int* const grpc_stats_histo_bucket_boundaries[13] = { + grpc_stats_table_0, grpc_stats_table_2, grpc_stats_table_4, + grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_4, + grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_6, + grpc_stats_table_6, grpc_stats_table_6, grpc_stats_table_6, + grpc_stats_table_8}; +void (*const grpc_stats_inc_histogram[13])(int x) = { + grpc_stats_inc_call_initial_size, + grpc_stats_inc_poll_events_returned, + grpc_stats_inc_tcp_write_size, + grpc_stats_inc_tcp_write_iov_size, + grpc_stats_inc_tcp_read_size, + grpc_stats_inc_tcp_read_offer, + grpc_stats_inc_tcp_read_offer_iov_size, + grpc_stats_inc_http2_send_message_size, + grpc_stats_inc_http2_send_initial_metadata_per_write, + grpc_stats_inc_http2_send_message_per_write, + grpc_stats_inc_http2_send_trailing_metadata_per_write, + grpc_stats_inc_http2_send_flowctl_per_write, + grpc_stats_inc_server_cqs_checked}; diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h index 16862218aaa..37c548095f5 100644 --- a/src/core/lib/debug/stats_data.h +++ b/src/core/lib/debug/stats_data.h @@ -1,12 +1,12 @@ /* * Copyright 2017 gRPC authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -125,8 +125,8 @@ typedef enum { GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES, GRPC_STATS_COUNTER_COUNT } grpc_stats_counters; -extern const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT]; -extern const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT]; +extern const char* grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT]; +extern const char* grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT]; typedef enum { GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE, GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED, @@ -143,8 +143,8 @@ typedef enum { GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED, GRPC_STATS_HISTOGRAM_COUNT } grpc_stats_histograms; -extern const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT]; -extern const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT]; +extern const char* grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT]; +extern const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT]; typedef enum { GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE_FIRST_SLOT = 0, GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE_BUCKETS = 64, @@ -175,225 +175,356 @@ typedef enum { GRPC_STATS_HISTOGRAM_BUCKETS = 840 } grpc_stats_histogram_constants; #if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) -#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED) -#define GRPC_STATS_INC_SERVER_CALLS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CALLS_CREATED) -#define GRPC_STATS_INC_CQS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQS_CREATED) -#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CHANNELS_CREATED) -#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_SUBCHANNELS_CREATED) -#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CHANNELS_CREATED) -#define GRPC_STATS_INC_SYSCALL_POLL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_POLL) -#define GRPC_STATS_INC_SYSCALL_WAIT() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WAIT) -#define GRPC_STATS_INC_POLLSET_KICK() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK) -#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_WITHOUT_POLLER) -#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_AGAIN) -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_FD) -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_CV) -#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_OWN_THREAD) -#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS) -#define GRPC_STATS_INC_SYSCALL_WRITE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WRITE) -#define GRPC_STATS_INC_SYSCALL_READ() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_READ) -#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLERS_CREATED) -#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLER_POLLS) -#define GRPC_STATS_INC_HTTP2_OP_BATCHES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_BATCHES) -#define GRPC_STATS_INC_HTTP2_OP_CANCEL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_CANCEL) -#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_INITIAL_METADATA) -#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_MESSAGE) -#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_TRAILING_METADATA) -#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_INITIAL_METADATA) -#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_MESSAGE) -#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA) -#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SETTINGS_WRITES) -#define GRPC_STATS_INC_HTTP2_PINGS_SENT() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PINGS_SENT) -#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN) -#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_OFFLOADED) -#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_CONTINUED) -#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PARTIAL_WRITES) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE) -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM) -#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN) -#define GRPC_STATS_INC_HPACK_RECV_INDEXED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_INDEXED) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX_V) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX_V) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX) -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX_V) -#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_UNCOMPRESSED) -#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_HUFFMAN) -#define GRPC_STATS_INC_HPACK_RECV_BINARY() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY) -#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY_BASE64) -#define GRPC_STATS_INC_HPACK_SEND_INDEXED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_INDEXED) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX_V) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX_V) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX) -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX_V) -#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_UNCOMPRESSED) -#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_HUFFMAN) -#define GRPC_STATS_INC_HPACK_SEND_BINARY() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY) -#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY_BASE64) -#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED) -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS) -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS) -#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_OFFLOADED) -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_INITIATED) -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS) -#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_SET_NOTIFY_ON_CANCEL) -#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_CANCELLED) -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_SHORT_ITEMS) -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_LONG_ITEMS) -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_TO_SELF) -#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED) -#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED) -#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES) -#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_REQUESTED_CALLS) -#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_SLOWPATH_REQUESTS_QUEUED) -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_FAILURES) -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_SUCCESSES) -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES) -#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) grpc_stats_inc_call_initial_size( (int)(value)) +#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED) +#define GRPC_STATS_INC_SERVER_CALLS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CALLS_CREATED) +#define GRPC_STATS_INC_CQS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQS_CREATED) +#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_CHANNELS_CREATED) +#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CLIENT_SUBCHANNELS_CREATED) +#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_CHANNELS_CREATED) +#define GRPC_STATS_INC_SYSCALL_POLL() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_POLL) +#define GRPC_STATS_INC_SYSCALL_WAIT() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WAIT) +#define GRPC_STATS_INC_POLLSET_KICK() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK) +#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_WITHOUT_POLLER) +#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICKED_AGAIN) +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_FD) +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_WAKEUP_CV) +#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_POLLSET_KICK_OWN_THREAD) +#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS) +#define GRPC_STATS_INC_SYSCALL_WRITE() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_WRITE) +#define GRPC_STATS_INC_SYSCALL_READ() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SYSCALL_READ) +#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLERS_CREATED) +#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_TCP_BACKUP_POLLER_POLLS) +#define GRPC_STATS_INC_HTTP2_OP_BATCHES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_BATCHES) +#define GRPC_STATS_INC_HTTP2_OP_CANCEL() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_CANCEL) +#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_INITIAL_METADATA) +#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_MESSAGE) +#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_SEND_TRAILING_METADATA) +#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_INITIAL_METADATA) +#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_MESSAGE) +#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA) +#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SETTINGS_WRITES) +#define GRPC_STATS_INC_HTTP2_PINGS_SENT() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PINGS_SENT) +#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN) +#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_OFFLOADED) +#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_WRITES_CONTINUED) +#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_PARTIAL_WRITES) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE) +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM) +#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN) +#define GRPC_STATS_INC_HPACK_RECV_INDEXED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_INDEXED) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_INCIDX_V) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NOTIDX_V) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX) +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_LITHDR_NVRIDX_V) +#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_UNCOMPRESSED) +#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_HUFFMAN) +#define GRPC_STATS_INC_HPACK_RECV_BINARY() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY) +#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_RECV_BINARY_BASE64) +#define GRPC_STATS_INC_HPACK_SEND_INDEXED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_INDEXED) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_INCIDX_V) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NOTIDX_V) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX) +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_LITHDR_NVRIDX_V) +#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_UNCOMPRESSED) +#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_HUFFMAN) +#define GRPC_STATS_INC_HPACK_SEND_BINARY() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY) +#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_HPACK_SEND_BINARY_BASE64) +#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED) +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS) +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() \ + GRPC_STATS_INC_COUNTER( \ + GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS) +#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_COMBINER_LOCKS_OFFLOADED) +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_INITIATED) +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS) +#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_SET_NOTIFY_ON_CANCEL) +#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CALL_COMBINER_CANCELLED) +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_SHORT_ITEMS) +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_LONG_ITEMS) +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_TO_SELF) +#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED) +#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED) +#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES) +#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_REQUESTED_CALLS) +#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_SERVER_SLOWPATH_REQUESTS_QUEUED) +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_FAILURES) +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRYLOCK_SUCCESSES) +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() \ + GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES) +#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) \ + grpc_stats_inc_call_initial_size((int)(value)) void grpc_stats_inc_call_initial_size(int x); -#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) grpc_stats_inc_poll_events_returned( (int)(value)) +#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) \ + grpc_stats_inc_poll_events_returned((int)(value)) void grpc_stats_inc_poll_events_returned(int x); -#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) grpc_stats_inc_tcp_write_size( (int)(value)) +#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) \ + grpc_stats_inc_tcp_write_size((int)(value)) void grpc_stats_inc_tcp_write_size(int x); -#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) grpc_stats_inc_tcp_write_iov_size( (int)(value)) +#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) \ + grpc_stats_inc_tcp_write_iov_size((int)(value)) void grpc_stats_inc_tcp_write_iov_size(int x); -#define GRPC_STATS_INC_TCP_READ_SIZE(value) grpc_stats_inc_tcp_read_size( (int)(value)) +#define GRPC_STATS_INC_TCP_READ_SIZE(value) \ + grpc_stats_inc_tcp_read_size((int)(value)) void grpc_stats_inc_tcp_read_size(int x); -#define GRPC_STATS_INC_TCP_READ_OFFER(value) grpc_stats_inc_tcp_read_offer( (int)(value)) +#define GRPC_STATS_INC_TCP_READ_OFFER(value) \ + grpc_stats_inc_tcp_read_offer((int)(value)) void grpc_stats_inc_tcp_read_offer(int x); -#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) grpc_stats_inc_tcp_read_offer_iov_size( (int)(value)) +#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) \ + grpc_stats_inc_tcp_read_offer_iov_size((int)(value)) void grpc_stats_inc_tcp_read_offer_iov_size(int x); -#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) grpc_stats_inc_http2_send_message_size( (int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) \ + grpc_stats_inc_http2_send_message_size((int)(value)) void grpc_stats_inc_http2_send_message_size(int x); -#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) grpc_stats_inc_http2_send_initial_metadata_per_write( (int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) \ + grpc_stats_inc_http2_send_initial_metadata_per_write((int)(value)) void grpc_stats_inc_http2_send_initial_metadata_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) grpc_stats_inc_http2_send_message_per_write( (int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) \ + grpc_stats_inc_http2_send_message_per_write((int)(value)) void grpc_stats_inc_http2_send_message_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) grpc_stats_inc_http2_send_trailing_metadata_per_write( (int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) \ + grpc_stats_inc_http2_send_trailing_metadata_per_write((int)(value)) void grpc_stats_inc_http2_send_trailing_metadata_per_write(int x); -#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) grpc_stats_inc_http2_send_flowctl_per_write( (int)(value)) +#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) \ + grpc_stats_inc_http2_send_flowctl_per_write((int)(value)) void grpc_stats_inc_http2_send_flowctl_per_write(int x); -#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) grpc_stats_inc_server_cqs_checked( (int)(value)) +#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) \ + grpc_stats_inc_server_cqs_checked((int)(value)) void grpc_stats_inc_server_cqs_checked(int x); #else -#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() -#define GRPC_STATS_INC_SERVER_CALLS_CREATED() -#define GRPC_STATS_INC_CQS_CREATED() -#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() -#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() -#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() -#define GRPC_STATS_INC_SYSCALL_POLL() -#define GRPC_STATS_INC_SYSCALL_WAIT() -#define GRPC_STATS_INC_POLLSET_KICK() -#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() -#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() -#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() -#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() -#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() -#define GRPC_STATS_INC_SYSCALL_WRITE() -#define GRPC_STATS_INC_SYSCALL_READ() -#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() -#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() -#define GRPC_STATS_INC_HTTP2_OP_BATCHES() -#define GRPC_STATS_INC_HTTP2_OP_CANCEL() -#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() -#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() -#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() -#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() -#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() -#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() -#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() -#define GRPC_STATS_INC_HTTP2_PINGS_SENT() -#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() -#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() -#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() -#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() -#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() -#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() -#define GRPC_STATS_INC_HPACK_RECV_INDEXED() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() -#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() -#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() -#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() -#define GRPC_STATS_INC_HPACK_RECV_BINARY() -#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() -#define GRPC_STATS_INC_HPACK_SEND_INDEXED() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() -#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() -#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() -#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() -#define GRPC_STATS_INC_HPACK_SEND_BINARY() -#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() -#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() -#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() -#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() -#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() -#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() -#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() -#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() -#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() -#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() -#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() -#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() -#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() -#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() +#define GRPC_STATS_INC_CLIENT_CALLS_CREATED() +#define GRPC_STATS_INC_SERVER_CALLS_CREATED() +#define GRPC_STATS_INC_CQS_CREATED() +#define GRPC_STATS_INC_CLIENT_CHANNELS_CREATED() +#define GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED() +#define GRPC_STATS_INC_SERVER_CHANNELS_CREATED() +#define GRPC_STATS_INC_SYSCALL_POLL() +#define GRPC_STATS_INC_SYSCALL_WAIT() +#define GRPC_STATS_INC_POLLSET_KICK() +#define GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER() +#define GRPC_STATS_INC_POLLSET_KICKED_AGAIN() +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD() +#define GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV() +#define GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD() +#define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS() +#define GRPC_STATS_INC_SYSCALL_WRITE() +#define GRPC_STATS_INC_SYSCALL_READ() +#define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED() +#define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS() +#define GRPC_STATS_INC_HTTP2_OP_BATCHES() +#define GRPC_STATS_INC_HTTP2_OP_CANCEL() +#define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE() +#define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE() +#define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_SETTINGS_WRITES() +#define GRPC_STATS_INC_HTTP2_PINGS_SENT() +#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN() +#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED() +#define GRPC_STATS_INC_HTTP2_WRITES_CONTINUED() +#define GRPC_STATS_INC_HTTP2_PARTIAL_WRITES() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_INITIAL_WRITE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_START_NEW_STREAM() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_MESSAGE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_INITIAL_METADATA() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_TRAILING_METADATA() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RETRY_SEND_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CONTINUE_PINGS() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_GOAWAY_SENT() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_RST_STREAM() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_CLOSE_FROM_API() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_STREAM_FLOW_CONTROL() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_SEND_SETTINGS() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_BDP_ESTIMATOR_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_SETTING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FLOW_CONTROL_UNSTALLED_BY_UPDATE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_APPLICATION_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_KEEPALIVE_PING() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE() +#define GRPC_STATS_INC_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM() +#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN() +#define GRPC_STATS_INC_HPACK_RECV_INDEXED() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_INCIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NOTIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX() +#define GRPC_STATS_INC_HPACK_RECV_LITHDR_NVRIDX_V() +#define GRPC_STATS_INC_HPACK_RECV_UNCOMPRESSED() +#define GRPC_STATS_INC_HPACK_RECV_HUFFMAN() +#define GRPC_STATS_INC_HPACK_RECV_BINARY() +#define GRPC_STATS_INC_HPACK_RECV_BINARY_BASE64() +#define GRPC_STATS_INC_HPACK_SEND_INDEXED() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX() +#define GRPC_STATS_INC_HPACK_SEND_LITHDR_NVRIDX_V() +#define GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED() +#define GRPC_STATS_INC_HPACK_SEND_HUFFMAN() +#define GRPC_STATS_INC_HPACK_SEND_BINARY() +#define GRPC_STATS_INC_HPACK_SEND_BINARY_BASE64() +#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED() +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS() +#define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS() +#define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED() +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED() +#define GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS() +#define GRPC_STATS_INC_CALL_COMBINER_SET_NOTIFY_ON_CANCEL() +#define GRPC_STATS_INC_CALL_COMBINER_CANCELLED() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS() +#define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF() +#define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED() +#define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED() +#define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES() +#define GRPC_STATS_INC_SERVER_REQUESTED_CALLS() +#define GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_FAILURES() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRYLOCK_SUCCESSES() +#define GRPC_STATS_INC_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES() #define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) #define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) #define GRPC_STATS_INC_TCP_WRITE_SIZE(value) @@ -410,7 +541,7 @@ void grpc_stats_inc_server_cqs_checked(int x); #endif /* defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) */ extern const int grpc_stats_histo_buckets[13]; extern const int grpc_stats_histo_start[13]; -extern const int *const grpc_stats_histo_bucket_boundaries[13]; +extern const int* const grpc_stats_histo_bucket_boundaries[13]; extern void (*const grpc_stats_inc_histogram[13])(int x); #endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */ diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 1c6dcfbf11f..3b901ae4bff 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -29,7 +29,7 @@ for dir in $DIRS do for glob in $GLOB do - files="$files `find ${CLANG_FORMAT_ROOT}/$dir -name $glob -and -not -name '*.generated.*' -and -not -name '*.pb.h' -and -not -name '*.pb.c' -and -not -name '*.pb.cc' -and -not -name '*.pbobjc.h' -and -not -name '*.pbobjc.m' -and -not -name '*.pbrpc.h' -and -not -name '*.pbrpc.m' -and -not -name end2end_tests.cc -and -not -name end2end_nosec_tests.cc -and -not -name public_headers_must_be_c89.c -and -not -name stats_data.h -and -not -name stats_data.cc`" + files="$files `find ${CLANG_FORMAT_ROOT}/$dir -name $glob -and -not -name '*.generated.*' -and -not -name '*.pb.h' -and -not -name '*.pb.c' -and -not -name '*.pb.cc' -and -not -name '*.pbobjc.h' -and -not -name '*.pbobjc.m' -and -not -name '*.pbrpc.h' -and -not -name '*.pbrpc.m' -and -not -name end2end_tests.cc -and -not -name end2end_nosec_tests.cc -and -not -name public_headers_must_be_c89.c`" done done