Merge pull request #12487 from ctiller/stats_schema

Automatically generate BigQuery schema details for all counters
pull/12509/head^2
Craig Tiller 7 years ago committed by GitHub
commit 6d4c993289
  1. 33
      src/core/lib/debug/stats_data_bq_schema.sql
  2. 6
      tools/codegen/core/gen_stats_data.py

@ -0,0 +1,33 @@
client_calls_created_per_iteration:INTEGER,
server_calls_created_per_iteration:INTEGER,
syscall_poll_per_iteration:INTEGER,
syscall_wait_per_iteration:INTEGER,
histogram_slow_lookups_per_iteration:INTEGER,
syscall_write_per_iteration:INTEGER,
syscall_read_per_iteration:INTEGER,
tcp_backup_pollers_created_per_iteration:INTEGER,
tcp_backup_poller_polls_per_iteration:INTEGER,
http2_op_batches_per_iteration:INTEGER,
http2_op_cancel_per_iteration:INTEGER,
http2_op_send_initial_metadata_per_iteration:INTEGER,
http2_op_send_message_per_iteration:INTEGER,
http2_op_send_trailing_metadata_per_iteration:INTEGER,
http2_op_recv_initial_metadata_per_iteration:INTEGER,
http2_op_recv_message_per_iteration:INTEGER,
http2_op_recv_trailing_metadata_per_iteration:INTEGER,
http2_settings_writes_per_iteration:INTEGER,
http2_pings_sent_per_iteration:INTEGER,
http2_writes_begun_per_iteration:INTEGER,
http2_writes_offloaded_per_iteration:INTEGER,
http2_writes_continued_per_iteration:INTEGER,
http2_partial_writes_per_iteration:INTEGER,
combiner_locks_initiated_per_iteration:INTEGER,
combiner_locks_scheduled_items_per_iteration:INTEGER,
combiner_locks_scheduled_final_items_per_iteration:INTEGER,
combiner_locks_offloaded_per_iteration:INTEGER,
executor_scheduled_short_items_per_iteration:INTEGER,
executor_scheduled_long_items_per_iteration:INTEGER,
executor_scheduled_to_self_per_iteration:INTEGER,
executor_wakeup_initiated_per_iteration:INTEGER,
executor_queue_drained_per_iteration:INTEGER,
executor_push_retries_per_iteration:INTEGER

@ -313,3 +313,9 @@ with open('src/core/lib/debug/stats_data.c', 'w') as C:
len(inst_map['Histogram']), ','.join('grpc_stats_table_%d' % x for x in histo_bucket_boundaries))
print >>C, "void (*const grpc_stats_inc_histogram[%d])(grpc_exec_ctx *exec_ctx, int x) = {%s};" % (
len(inst_map['Histogram']), ','.join('grpc_stats_inc_%s' % histogram.name.lower() for histogram in inst_map['Histogram']))
with open('src/core/lib/debug/stats_data_bq_schema.sql', 'w') as S:
columns = []
for counter in inst_map['Counter']:
columns.append(('%s_per_iteration' % counter.name, 'INTEGER'))
print >>S, ',\n'.join('%s:%s' % x for x in columns)

Loading…
Cancel
Save