Add a counter for spurious writes

pull/12636/head
Craig Tiller 8 years ago
parent 149c4696e6
commit e932aca45d
  1. 1
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  2. 2
      src/core/lib/debug/stats_data.c
  3. 4
      src/core/lib/debug/stats_data.h
  4. 2
      src/core/lib/debug/stats_data.yaml
  5. 1
      src/core/lib/debug/stats_data_bq_schema.sql
  6. 1
      tools/run_tests/performance/massage_qps_stats.py
  7. 10
      tools/run_tests/performance/scenario_result_schema.json

@ -1027,6 +1027,7 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt,
write_action, t, scheduler), write_action, t, scheduler),
GRPC_ERROR_NONE); GRPC_ERROR_NONE);
} else { } else {
GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN(exec_ctx);
set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE, set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE,
"begin writing nothing"); "begin writing nothing");
GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing");

@ -71,6 +71,7 @@ const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"http2_initiate_write_due_to_transport_flow_control_unstalled", "http2_initiate_write_due_to_transport_flow_control_unstalled",
"http2_initiate_write_due_to_ping_response", "http2_initiate_write_due_to_ping_response",
"http2_initiate_write_due_to_force_rst_stream", "http2_initiate_write_due_to_force_rst_stream",
"http2_spurious_writes_begun",
"combiner_locks_initiated", "combiner_locks_initiated",
"combiner_locks_scheduled_items", "combiner_locks_scheduled_items",
"combiner_locks_scheduled_final_items", "combiner_locks_scheduled_final_items",
@ -137,6 +138,7 @@ const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"'transport_flow_control_unstalled'", "'transport_flow_control_unstalled'",
"Number of HTTP2 writes initiated due to 'ping_response'", "Number of HTTP2 writes initiated due to 'ping_response'",
"Number of HTTP2 writes initiated due to 'force_rst_stream'", "Number of HTTP2 writes initiated due to 'force_rst_stream'",
"Number of HTTP2 writes initiated with nothing to write",
"Number of combiner lock entries by process (first items queued to a " "Number of combiner lock entries by process (first items queued to a "
"combiner)", "combiner)",
"Number of items scheduled against combiner locks", "Number of items scheduled against combiner locks",

@ -73,6 +73,7 @@ typedef enum {
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED, GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_TRANSPORT_FLOW_CONTROL_UNSTALLED,
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE, GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_PING_RESPONSE,
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM, GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM,
GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN,
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,
@ -279,6 +280,9 @@ typedef enum {
GRPC_STATS_INC_COUNTER( \ GRPC_STATS_INC_COUNTER( \
(exec_ctx), \ (exec_ctx), \
GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM) GRPC_STATS_COUNTER_HTTP2_INITIATE_WRITE_DUE_TO_FORCE_RST_STREAM)
#define GRPC_STATS_INC_HTTP2_SPURIOUS_WRITES_BEGUN(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), \
GRPC_STATS_COUNTER_HTTP2_SPURIOUS_WRITES_BEGUN)
#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)

@ -159,6 +159,8 @@
doc: Number of HTTP2 writes initiated due to 'ping_response' doc: Number of HTTP2 writes initiated due to 'ping_response'
- counter: http2_initiate_write_due_to_force_rst_stream - counter: http2_initiate_write_due_to_force_rst_stream
doc: Number of HTTP2 writes initiated due to 'force_rst_stream' doc: Number of HTTP2 writes initiated due to 'force_rst_stream'
- counter: http2_spurious_writes_begun
doc: Number of HTTP2 writes initiated with nothing to write
# combiner locks # combiner locks
- counter: combiner_locks_initiated - counter: combiner_locks_initiated
doc: Number of combiner lock entries by process doc: Number of combiner lock entries by process

@ -46,6 +46,7 @@ http2_initiate_write_due_to_keepalive_ping_per_iteration:FLOAT,
http2_initiate_write_due_to_transport_flow_control_unstalled_per_iteration:FLOAT, http2_initiate_write_due_to_transport_flow_control_unstalled_per_iteration:FLOAT,
http2_initiate_write_due_to_ping_response_per_iteration:FLOAT, http2_initiate_write_due_to_ping_response_per_iteration:FLOAT,
http2_initiate_write_due_to_force_rst_stream_per_iteration:FLOAT, http2_initiate_write_due_to_force_rst_stream_per_iteration:FLOAT,
http2_spurious_writes_begun_per_iteration:FLOAT,
combiner_locks_initiated_per_iteration:FLOAT, combiner_locks_initiated_per_iteration:FLOAT,
combiner_locks_scheduled_items_per_iteration:FLOAT, combiner_locks_scheduled_items_per_iteration:FLOAT,
combiner_locks_scheduled_final_items_per_iteration:FLOAT, combiner_locks_scheduled_final_items_per_iteration:FLOAT,

@ -68,6 +68,7 @@ def massage_qps_stats(scenario_result):
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_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_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_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_combiner_locks_initiated"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_initiated") 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_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_scheduled_final_items"] = massage_qps_stats_helpers.counter(core_stats, "combiner_locks_scheduled_final_items")

@ -350,6 +350,11 @@
"name": "core_http2_initiate_write_due_to_force_rst_stream", "name": "core_http2_initiate_write_due_to_force_rst_stream",
"type": "INTEGER" "type": "INTEGER"
}, },
{
"mode": "NULLABLE",
"name": "core_http2_spurious_writes_begun",
"type": "INTEGER"
},
{ {
"mode": "NULLABLE", "mode": "NULLABLE",
"name": "core_combiner_locks_initiated", "name": "core_combiner_locks_initiated",
@ -952,6 +957,11 @@
"name": "core_http2_initiate_write_due_to_force_rst_stream", "name": "core_http2_initiate_write_due_to_force_rst_stream",
"type": "INTEGER" "type": "INTEGER"
}, },
{
"mode": "NULLABLE",
"name": "core_http2_spurious_writes_begun",
"type": "INTEGER"
},
{ {
"mode": "NULLABLE", "mode": "NULLABLE",
"name": "core_combiner_locks_initiated", "name": "core_combiner_locks_initiated",

Loading…
Cancel
Save