diff options
author | Craig Tiller <ctiller@google.com> | 2017-09-11 19:06:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-11 19:06:09 -0700 |
commit | af57a57a5aae3249e829500068f93fb8d011f37c (patch) | |
tree | 5c9d8f6b33b1e61a4895d389425ae51431918f43 /src/core/lib/surface | |
parent | b40b770c4e702b675c50be35dcfa84d7501717a2 (diff) | |
parent | f73fe507b6014d3a4e66971dde4e5cddca56b9a0 (diff) |
Merge pull request #12398 from ctiller/server_stats
Add stats for server request serving path
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r-- | src/core/lib/surface/server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index f95cc10a6a..13ecc915ec 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -29,6 +29,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/debug/stats.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/slice/slice_internal.h" @@ -540,6 +541,7 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, if (request_id == -1) { continue; } else { + GRPC_STATS_INC_SERVER_CQS_CHECKED(exec_ctx, i); gpr_mu_lock(&calld->mu_state); calld->state = ACTIVATED; gpr_mu_unlock(&calld->mu_state); @@ -550,6 +552,7 @@ static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, } /* no cq to take the request found: queue it on the slow list */ + GRPC_STATS_INC_SERVER_SLOWPATH_REQUESTS_QUEUED(exec_ctx); gpr_mu_lock(&server->mu_call); gpr_mu_lock(&calld->mu_state); calld->state = PENDING; @@ -1432,6 +1435,7 @@ grpc_call_error grpc_server_request_call( grpc_call_error error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = (requested_call *)gpr_malloc(sizeof(*rc)); + GRPC_STATS_INC_SERVER_REQUESTED_CALLS(&exec_ctx); GRPC_API_TRACE( "grpc_server_request_call(" "server=%p, call=%p, details=%p, initial_metadata=%p, " @@ -1478,6 +1482,7 @@ grpc_call_error grpc_server_request_registered_call( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = (requested_call *)gpr_malloc(sizeof(*rc)); registered_method *rm = (registered_method *)rmp; + GRPC_STATS_INC_SERVER_REQUESTED_CALLS(&exec_ctx); GRPC_API_TRACE( "grpc_server_request_registered_call(" "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " |