diff options
author | 2017-07-18 14:22:19 -0700 | |
---|---|---|
committer | 2017-07-18 14:22:19 -0700 | |
commit | 280866817ffdec59d0446df3c99c2544837da3ad (patch) | |
tree | 63fe79f0d1e5827d025217d6d36d94d8113510bf /src/core/lib/surface/call.c | |
parent | 65d447f2c31b08d0503257932768c59b59549ecd (diff) |
Add a simple stats framework to gRPC C core
Diffstat (limited to 'src/core/lib/surface/call.c')
-rw-r--r-- | src/core/lib/surface/call.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2365d27307..2f42726c7f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -32,6 +32,7 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/compression/algorithm_metadata.h" +#include "src/core/lib/debug/stats.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/slice_internal.h" @@ -314,6 +315,11 @@ grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx, /* Always support no compression */ GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); call->is_client = args->server_transport_data == NULL; + if (call->is_client) { + GRPC_STATS_INC_CLIENT_CALLS_CREATED(exec_ctx); + } else { + GRPC_STATS_INC_SERVER_CALLS_CREATED(exec_ctx); + } call->stream_op_payload.context = call->context; grpc_slice path = grpc_empty_slice(); if (call->is_client) { |