diff options
author | 2016-04-14 12:44:30 -0700 | |
---|---|---|
committer | 2016-04-14 12:44:30 -0700 | |
commit | 9ef0e1cfd4116b901f55410cad1c4425e59eaac1 (patch) | |
tree | 9b13ab3206c2d16888d790d4fcb2496c0980579f /src/core/lib/channel/channel_stack.h | |
parent | f603c3aebd9b3fc489a70ba781e78bd1188ba4bf (diff) |
Added grpc_call_stats to the call stack
Diffstat (limited to 'src/core/lib/channel/channel_stack.h')
-rw-r--r-- | src/core/lib/channel/channel_stack.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 9e3a25a152..3d9e72ef16 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -45,6 +45,8 @@ #include <grpc/grpc.h> #include <grpc/support/log.h> +#include <grpc/support/time.h> + #include "src/core/lib/debug/trace.h" #include "src/core/lib/transport/transport.h" @@ -67,6 +69,13 @@ typedef struct { grpc_call_context_element *context; } grpc_call_element_args; +typedef struct { + uint64_t bytes_in; + uint64_t bytes_out; + gpr_timespec latency; /* TODO(dgq): per op? */ + grpc_status_code final_status; +} grpc_call_stats; + /* Channel filters specify: 1. the amount of memory needed in the channel & call (via the sizeof_XXX members) @@ -105,7 +114,8 @@ typedef struct { grpc_pollset *pollset); /* Destroy per call data. The filter does not need to do any chaining */ - void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); + void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats); /* sizeof(per channel data) */ size_t sizeof_channel_data; @@ -164,6 +174,7 @@ struct grpc_call_stack { about the address of the call stack itself. */ grpc_stream_refcount refcount; size_t count; + grpc_call_stats stats; }; /* Get a channel element given a channel stack and its index */ |