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_WRITE, |
| 31 | GRPC_STATS_COUNTER_SYSCALL_READ, |
| 32 | GRPC_STATS_COUNTER_SYSCALL_POLL, |
| 33 | GRPC_STATS_COUNTER_SYSCALL_WAIT, |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 34 | GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS, |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 35 | GRPC_STATS_COUNTER_COUNT |
| 36 | } grpc_stats_counters; |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 37 | extern const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT]; |
Craig Tiller | 33aeaba | 2017-07-20 16:02:24 -0700 | [diff] [blame] | 38 | typedef enum { |
| 39 | GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE, |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 40 | GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE, |
Craig Tiller | 33aeaba | 2017-07-20 16:02:24 -0700 | [diff] [blame] | 41 | GRPC_STATS_HISTOGRAM_TCP_READ_SIZE, |
Craig Tiller | 33aeaba | 2017-07-20 16:02:24 -0700 | [diff] [blame] | 42 | GRPC_STATS_HISTOGRAM_COUNT |
| 43 | } grpc_stats_histograms; |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 44 | extern const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT]; |
| 45 | typedef enum { |
| 46 | GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE_FIRST_SLOT = 0, |
| 47 | GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE_BUCKETS = 64, |
| 48 | GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE_FIRST_SLOT = 64, |
| 49 | GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE_BUCKETS = 64, |
| 50 | GRPC_STATS_HISTOGRAM_TCP_READ_SIZE_FIRST_SLOT = 128, |
| 51 | GRPC_STATS_HISTOGRAM_TCP_READ_SIZE_BUCKETS = 64, |
Craig Tiller | d110783 | 2017-08-30 13:37:13 -0700 | [diff] [blame] | 52 | GRPC_STATS_HISTOGRAM_BUCKETS = 192 |
Craig Tiller | 640dfe4 | 2017-08-30 13:34:49 -0700 | [diff] [blame] | 53 | } grpc_stats_histogram_constants; |
| 54 | #define GRPC_STATS_INC_CLIENT_CALLS_CREATED(exec_ctx) \ |
| 55 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED) |
| 56 | #define GRPC_STATS_INC_SERVER_CALLS_CREATED(exec_ctx) \ |
| 57 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SERVER_CALLS_CREATED) |
| 58 | #define GRPC_STATS_INC_SYSCALL_WRITE(exec_ctx) \ |
| 59 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_WRITE) |
| 60 | #define GRPC_STATS_INC_SYSCALL_READ(exec_ctx) \ |
| 61 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_READ) |
| 62 | #define GRPC_STATS_INC_SYSCALL_POLL(exec_ctx) \ |
| 63 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_POLL) |
| 64 | #define GRPC_STATS_INC_SYSCALL_WAIT(exec_ctx) \ |
| 65 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_SYSCALL_WAIT) |
| 66 | #define GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS(exec_ctx) \ |
| 67 | GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_HISTOGRAM_SLOW_LOOKUPS) |
Craig Tiller | 97ec5eb | 2017-09-01 12:57:36 -0700 | [diff] [blame^] | 68 | #define GRPC_STATS_INC_TCP_WRITE_SIZE(exec_ctx, value) \ |
| 69 | grpc_stats_inc_tcp_write_size((exec_ctx), (double)(value)) |
| 70 | void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, double x); |
| 71 | #define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(exec_ctx, value) \ |
| 72 | grpc_stats_inc_tcp_write_iov_size((exec_ctx), (double)(value)) |
| 73 | void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, double x); |
| 74 | #define GRPC_STATS_INC_TCP_READ_SIZE(exec_ctx, value) \ |
| 75 | grpc_stats_inc_tcp_read_size((exec_ctx), (double)(value)) |
| 76 | void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, double x); |
Craig Tiller | d110783 | 2017-08-30 13:37:13 -0700 | [diff] [blame] | 77 | extern const int grpc_stats_histo_buckets[3]; |
| 78 | extern const int grpc_stats_histo_start[3]; |
| 79 | extern const double *const grpc_stats_histo_bucket_boundaries[3]; |
Craig Tiller | 97ec5eb | 2017-09-01 12:57:36 -0700 | [diff] [blame^] | 80 | extern void (*const grpc_stats_inc_histogram[3])(grpc_exec_ctx *exec_ctx, |
| 81 | double x); |
Craig Tiller | 2808668 | 2017-07-18 14:22:19 -0700 | [diff] [blame] | 82 | |
| 83 | #endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */ |