Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 gRPC authors. |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 3 | * |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 7 | * |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 9 | * |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | * Automatically generated by tools/codegen/core/gen_stats_data.py |
| 19 | */ |
| 20 | |
| 21 | #ifndef GRPC_CORE_LIB_DEBUG_STATS_DATA_H |
| 22 | #define GRPC_CORE_LIB_DEBUG_STATS_DATA_H |
| 23 | |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 24 | #include <inttypes.h> |
Craig Tiller | 97ec5eb | 2017-09-01 12:57:36 -0700 | [diff] [blame] | 25 | #include "src/core/lib/iomgr/exec_ctx.h" |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 26 | |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 27 | typedef enum { |
| 28 | GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED, |
| 29 | GRPC_STATS_COUNTER_SERVER_CALLS_CREATED, |
Craig Tiller | b4bb1cd | 2017-07-20 14:18:17 -0700 | [diff] [blame] | 30 | GRPC_STATS_COUNTER_SYSCALL_POLL, |
| 31 | GRPC_STATS_COUNTER_SYSCALL_WAIT, |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 32 | GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS, |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 33 | GRPC_STATS_COUNTER_SYSCALL_WRITE, |
| 34 | GRPC_STATS_COUNTER_SYSCALL_READ, |
Craig Tiller | 6155df6 | 2017-09-07 13:26:32 -0700 | [diff] [blame^] | 35 | GRPC_STATS_COUNTER_TCP_BACKUP_POLLERS_CREATED, |
| 36 | GRPC_STATS_COUNTER_TCP_BACKUP_POLLER_POLLS, |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 37 | GRPC_STATS_COUNTER_HTTP2_OP_BATCHES, |
| 38 | GRPC_STATS_COUNTER_HTTP2_OP_CANCEL, |
| 39 | GRPC_STATS_COUNTER_HTTP2_OP_SEND_INITIAL_METADATA, |
| 40 | GRPC_STATS_COUNTER_HTTP2_OP_SEND_MESSAGE, |
| 41 | GRPC_STATS_COUNTER_HTTP2_OP_SEND_TRAILING_METADATA, |
| 42 | GRPC_STATS_COUNTER_HTTP2_OP_RECV_INITIAL_METADATA, |
| 43 | GRPC_STATS_COUNTER_HTTP2_OP_RECV_MESSAGE, |
| 44 | GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA, |
| 45 | GRPC_STATS_COUNTER_HTTP2_PINGS_SENT, |
| 46 | GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN, |
| 47 | GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED, |
| 48 | GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS, |
| 49 | GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS, |
| 50 | GRPC_STATS_COUNTER_COMBINER_LOCKS_OFFLOADED, |
Craig Tiller | 07d2fa7 | 2017-09-07 13:13:36 -0700 | [diff] [blame] | 51 | GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_SHORT_ITEMS, |
| 52 | GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_LONG_ITEMS, |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 53 | GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_TO_SELF, |
| 54 | GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED, |
| 55 | GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED, |
Craig Tiller | 07d2fa7 | 2017-09-07 13:13:36 -0700 | [diff] [blame] | 56 | GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES, |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 57 | GRPC_STATS_COUNTER_COUNT |
| 58 | } grpc_stats_counters; |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 59 | extern const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT]; |
Craig Tiller | 33aeaba | 2017-07-20 16:02:24 -0700 | [diff] [blame] | 60 | typedef enum { |
| 61 | GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 62 | GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, |
Craig Tiller | 33aeaba | 2017-07-20 16:02:24 -0700 | [diff] [blame] | 63 | GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, |
Craig Tiller | c92f18c | 2017-08-31 16:46:32 -0700 | [diff] [blame] | 64 | GRPC_STATS_HISTOGRAM_TCP_READ_OFFER, |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 65 | GRPC_STATS_HISTOGRAM_TCP_READ_IOV_SIZE, |
| 66 | GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE, |
Craig Tiller | 33aeaba | 2017-07-20 16:02:24 -0700 | [diff] [blame] | 67 | GRPC_STATS_HISTOGRAM_COUNT |
| 68 | } grpc_stats_histograms; |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 69 | extern const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT]; |
| 70 | typedef enum { |
| 71 | GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE_FIRST_SLOT = 0, |
| 72 | GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE_BUCKETS = 64, |
| 73 | GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE_FIRST_SLOT = 64, |
| 74 | GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE_BUCKETS = 64, |
| 75 | GRPC_STATS_HISTOGRAM_TCP_READ_SIZE_FIRST_SLOT = 128, |
| 76 | GRPC_STATS_HISTOGRAM_TCP_READ_SIZE_BUCKETS = 64, |
Craig Tiller | c92f18c | 2017-08-31 16:46:32 -0700 | [diff] [blame] | 77 | GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_FIRST_SLOT = 192, |
| 78 | GRPC_STATS_HISTOGRAM_TCP_READ_OFFER_BUCKETS = 64, |
| 79 | GRPC_STATS_HISTOGRAM_TCP_READ_IOV_SIZE_FIRST_SLOT = 256, |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 80 | GRPC_STATS_HISTOGRAM_TCP_READ_IOV_SIZE_BUCKETS = 64, |
Craig Tiller | c92f18c | 2017-08-31 16:46:32 -0700 | [diff] [blame] | 81 | GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE_FIRST_SLOT = 320, |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 82 | GRPC_STATS_HISTOGRAM_HTTP2_SEND_MESSAGE_SIZE_BUCKETS = 64, |
Craig Tiller | c92f18c | 2017-08-31 16:46:32 -0700 | [diff] [blame] | 83 | GRPC_STATS_HISTOGRAM_BUCKETS = 384 |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 84 | } grpc_stats_histogram_constants; |
| 85 | #define GRPC_STATS_INC_CLIENT_CALLS_CREATED(exec_ctx) \ |
| 86 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED) |
| 87 | #define GRPC_STATS_INC_SERVER_CALLS_CREATED(exec_ctx) \ |
| 88 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SERVER_CALLS_CREATED) |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 89 | #define GRPC_STATS_INC_SYSCALL_POLL(exec_ctx) \ |
| 90 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_POLL) |
| 91 | #define GRPC_STATS_INC_SYSCALL_WAIT(exec_ctx) \ |
| 92 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_WAIT) |
| 93 | #define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS(exec_ctx) \ |
| 94 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS) |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 95 | #define GRPC_STATS_INC_SYSCALL_WRITE(exec_ctx) \ |
| 96 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_WRITE) |
| 97 | #define GRPC_STATS_INC_SYSCALL_READ(exec_ctx) \ |
| 98 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_READ) |
Craig Tiller | 6155df6 | 2017-09-07 13:26:32 -0700 | [diff] [blame^] | 99 | #define GRPC_STATS_INC_TCP_BACKUP_POLLERS_CREATED(exec_ctx) \ |
| 100 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 101 | GRPC_STATS_COUNTER_TCP_BACKUP_POLLERS_CREATED) |
| 102 | #define GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS(exec_ctx) \ |
| 103 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_TCP_BACKUP_POLLER_POLLS) |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 104 | #define GRPC_STATS_INC_HTTP2_OP_BATCHES(exec_ctx) \ |
| 105 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_OP_BATCHES) |
| 106 | #define GRPC_STATS_INC_HTTP2_OP_CANCEL(exec_ctx) \ |
| 107 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_OP_CANCEL) |
| 108 | #define GRPC_STATS_INC_HTTP2_OP_SEND_INITIAL_METADATA(exec_ctx) \ |
| 109 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 110 | GRPC_STATS_COUNTER_HTTP2_OP_SEND_INITIAL_METADATA) |
| 111 | #define GRPC_STATS_INC_HTTP2_OP_SEND_MESSAGE(exec_ctx) \ |
| 112 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_OP_SEND_MESSAGE) |
| 113 | #define GRPC_STATS_INC_HTTP2_OP_SEND_TRAILING_METADATA(exec_ctx) \ |
| 114 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 115 | GRPC_STATS_COUNTER_HTTP2_OP_SEND_TRAILING_METADATA) |
| 116 | #define GRPC_STATS_INC_HTTP2_OP_RECV_INITIAL_METADATA(exec_ctx) \ |
| 117 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 118 | GRPC_STATS_COUNTER_HTTP2_OP_RECV_INITIAL_METADATA) |
| 119 | #define GRPC_STATS_INC_HTTP2_OP_RECV_MESSAGE(exec_ctx) \ |
| 120 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_OP_RECV_MESSAGE) |
| 121 | #define GRPC_STATS_INC_HTTP2_OP_RECV_TRAILING_METADATA(exec_ctx) \ |
| 122 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 123 | GRPC_STATS_COUNTER_HTTP2_OP_RECV_TRAILING_METADATA) |
| 124 | #define GRPC_STATS_INC_HTTP2_PINGS_SENT(exec_ctx) \ |
| 125 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_PINGS_SENT) |
| 126 | #define GRPC_STATS_INC_HTTP2_WRITES_BEGUN(exec_ctx) \ |
| 127 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HTTP2_WRITES_BEGUN) |
| 128 | #define GRPC_STATS_INC_COMBINER_LOCKS_INITIATED(exec_ctx) \ |
| 129 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 130 | GRPC_STATS_COUNTER_COMBINER_LOCKS_INITIATED) |
| 131 | #define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS(exec_ctx) \ |
| 132 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 133 | GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_ITEMS) |
| 134 | #define GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS(exec_ctx) \ |
| 135 | GRPC_STATS_INC_COUNTER( \ |
| 136 | (exec_ctx), GRPC_STATS_COUNTER_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS) |
| 137 | #define GRPC_STATS_INC_COMBINER_LOCKS_OFFLOADED(exec_ctx) \ |
| 138 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 139 | GRPC_STATS_COUNTER_COMBINER_LOCKS_OFFLOADED) |
Craig Tiller | 07d2fa7 | 2017-09-07 13:13:36 -0700 | [diff] [blame] | 140 | #define GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS(exec_ctx) \ |
| 141 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 142 | GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_SHORT_ITEMS) |
| 143 | #define GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS(exec_ctx) \ |
| 144 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 145 | GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_LONG_ITEMS) |
Craig Tiller | 57bb9a9 | 2017-08-31 16:44:15 -0700 | [diff] [blame] | 146 | #define GRPC_STATS_INC_EXECUTOR_SCHEDULED_TO_SELF(exec_ctx) \ |
| 147 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 148 | GRPC_STATS_COUNTER_EXECUTOR_SCHEDULED_TO_SELF) |
| 149 | #define GRPC_STATS_INC_EXECUTOR_WAKEUP_INITIATED(exec_ctx) \ |
| 150 | GRPC_STATS_INC_COUNTER((exec_ctx), \ |
| 151 | GRPC_STATS_COUNTER_EXECUTOR_WAKEUP_INITIATED) |
| 152 | #define GRPC_STATS_INC_EXECUTOR_QUEUE_DRAINED(exec_ctx) \ |
| 153 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_EXECUTOR_QUEUE_DRAINED) |
Craig Tiller | 07d2fa7 | 2017-09-07 13:13:36 -0700 | [diff] [blame] | 154 | #define GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES(exec_ctx) \ |
| 155 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_EXECUTOR_PUSH_RETRIES) |
Craig Tiller | 97ec5eb | 2017-09-01 12:57:36 -0700 | [diff] [blame] | 156 | #define GRPC_STATS_INC_TCP_WRITE_SIZE(exec_ctx, value) \ |
Craig Tiller | 56a8484 | 2017-09-01 16:36:52 -0700 | [diff] [blame] | 157 | grpc_stats_inc_tcp_write_size((exec_ctx), (int)(value)) |
| 158 | void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, int x); |
Craig Tiller | 97ec5eb | 2017-09-01 12:57:36 -0700 | [diff] [blame] | 159 | #define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(exec_ctx, value) \ |
Craig Tiller | 56a8484 | 2017-09-01 16:36:52 -0700 | [diff] [blame] | 160 | grpc_stats_inc_tcp_write_iov_size((exec_ctx), (int)(value)) |
| 161 | void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, int x); |
Craig Tiller | 97ec5eb | 2017-09-01 12:57:36 -0700 | [diff] [blame] | 162 | #define GRPC_STATS_INC_TCP_READ_SIZE(exec_ctx, value) \ |
Craig Tiller | 56a8484 | 2017-09-01 16:36:52 -0700 | [diff] [blame] | 163 | grpc_stats_inc_tcp_read_size((exec_ctx), (int)(value)) |
| 164 | void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, int x); |
| 165 | #define GRPC_STATS_INC_TCP_READ_OFFER(exec_ctx, value) \ |
| 166 | grpc_stats_inc_tcp_read_offer((exec_ctx), (int)(value)) |
| 167 | void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx *exec_ctx, int x); |
| 168 | #define GRPC_STATS_INC_TCP_READ_IOV_SIZE(exec_ctx, value) \ |
| 169 | grpc_stats_inc_tcp_read_iov_size((exec_ctx), (int)(value)) |
| 170 | void grpc_stats_inc_tcp_read_iov_size(grpc_exec_ctx *exec_ctx, int x); |
| 171 | #define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(exec_ctx, value) \ |
| 172 | grpc_stats_inc_http2_send_message_size((exec_ctx), (int)(value)) |
| 173 | void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx *exec_ctx, int x); |
Craig Tiller | c92f18c | 2017-08-31 16:46:32 -0700 | [diff] [blame] | 174 | extern const int grpc_stats_histo_buckets[6]; |
| 175 | extern const int grpc_stats_histo_start[6]; |
Craig Tiller | da5cd59 | 2017-09-01 10:03:40 -0700 | [diff] [blame] | 176 | extern const int *const grpc_stats_histo_bucket_boundaries[6]; |
Craig Tiller | 56a8484 | 2017-09-01 16:36:52 -0700 | [diff] [blame] | 177 | extern void (*const grpc_stats_inc_histogram[6])(grpc_exec_ctx *exec_ctx, |
| 178 | int x); |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 179 | |
| 180 | #endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */ |