Better HTTP stats

pull/12431/head
Craig Tiller 7 years ago
parent 6155df6e5c
commit 06a1baed61
  1. 3
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  2. 1
      src/core/lib/debug/stats_data.c
  3. 3
      src/core/lib/debug/stats_data.h
  4. 1
      src/core/lib/debug/stats_data.yaml

@ -940,6 +940,9 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt,
if (r.writing) { if (r.writing) {
grpc_closure_scheduler *scheduler = grpc_closure_scheduler *scheduler =
write_scheduler(t, r.early_results_scheduled, r.partial); write_scheduler(t, r.early_results_scheduled, r.partial);
if (scheduler != grpc_schedule_on_exec_ctx) {
GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED(exec_ctx);
}
set_write_state( set_write_state(
exec_ctx, t, r.partial ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE exec_ctx, t, r.partial ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE
: GRPC_CHTTP2_WRITE_STATE_WRITING, : GRPC_CHTTP2_WRITE_STATE_WRITING,

@ -42,6 +42,7 @@ const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"http2_op_recv_trailing_metadata", "http2_op_recv_trailing_metadata",
"http2_pings_sent", "http2_pings_sent",
"http2_writes_begun", "http2_writes_begun",
"http2_writes_offloaded",
"combiner_locks_initiated", "combiner_locks_initiated",
"combiner_locks_scheduled_items", "combiner_locks_scheduled_items",
"combiner_locks_scheduled_final_items", "combiner_locks_scheduled_final_items",

@ -44,6 +44,7 @@ typedef enum {
GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA, GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA,
GRPC_STATS_COUNTER_HTTP2_PINGS_SENT, GRPC_STATS_COUNTER_HTTP2_PINGS_SENT,
GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN, GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN,
GRPC_STATS_COUNTER_HTTP2_WRITES_OFFLOADED,
GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED, GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED,
GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS, GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS,
GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS, GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS,
@ -125,6 +126,8 @@ typedef enum {
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_PINGS_SENT) GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_PINGS_SENT)
#define GRPC_STATS_INC_HTTP2_WRITES_BEGUN(exec_ctx) \ #define GRPC_STATS_INC_HTTP2_WRITES_BEGUN(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN) GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN)
#define GRPC_STATS_INC_HTTP2_WRITES_OFFLOADED(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_WRITES_OFFLOADED)
#define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED(exec_ctx) \ #define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), \ GRPC_STATS_INC_COUNTER((exec_ctx), \
GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED) GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED)

@ -57,6 +57,7 @@
buckets: 64 buckets: 64
- counter: http2_pings_sent - counter: http2_pings_sent
- counter: http2_writes_begun - counter: http2_writes_begun
- counter: http2_writes_offloaded
# combiner locks # combiner locks
- counter: combiner_locks_initiated - counter: combiner_locks_initiated
- counter: combiner_locks_scheduled_items - counter: combiner_locks_scheduled_items

Loading…
Cancel
Save