aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-09-07 13:13:36 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-09-07 13:13:36 -0700
commit07d2fa77680aa9060c6655c1978aca8528ca01bd (patch)
treed31c4fb13cc81d26e870c6bcd774cb16c281ea9e /src/core/lib/iomgr
parent022ad3ae8906c7ee2440f1c3894ccc73ca14529a (diff)
Better executor stats
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r--src/core/lib/iomgr/executor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.c
index 141025b64d..a41c43edfd 100644
--- a/src/core/lib/iomgr/executor.c
+++ b/src/core/lib/iomgr/executor.c
@@ -185,7 +185,11 @@ static void executor_thread(void *arg) {
static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_error *error, bool is_short) {
bool retry_push;
- GRPC_STATS_INC_EXECUTOR_SCHEDULED_ITEMS(exec_ctx);
+ if (is_short) {
+ GRPC_STATS_INC_EXECUTOR_SCHEDULED_SHORT_ITEMS(exec_ctx);
+ } else {
+ GRPC_STATS_INC_EXECUTOR_SCHEDULED_LONG_ITEMS(exec_ctx);
+ }
do {
retry_push = false;
size_t cur_thread_count = (size_t)gpr_atm_no_barrier_load(&g_cur_threads);
@@ -260,6 +264,9 @@ static void executor_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
}
gpr_spinlock_unlock(&g_adding_thread_lock);
}
+ if (retry_push) {
+ GRPC_STATS_INC_EXECUTOR_PUSH_RETRIES(exec_ctx);
+ }
} while (retry_push);
}