aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/statistics/census_rpc_stats.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-22 10:42:19 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-22 10:42:19 -0700
commit45724b35e411fef7c5da66a74c78428c11d56843 (patch)
tree9264034aca675c89444e02f72ef58e67d7043604 /src/core/statistics/census_rpc_stats.h
parent298751c1195523ef6228595043b583c3a6270e08 (diff)
indent pass to get logical source lines on one physical line
Diffstat (limited to 'src/core/statistics/census_rpc_stats.h')
-rw-r--r--src/core/statistics/census_rpc_stats.h70
1 files changed, 36 insertions, 34 deletions
diff --git a/src/core/statistics/census_rpc_stats.h b/src/core/statistics/census_rpc_stats.h
index aec31c1971..7119699f6e 100644
--- a/src/core/statistics/census_rpc_stats.h
+++ b/src/core/statistics/census_rpc_stats.h
@@ -38,45 +38,47 @@
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-struct census_rpc_stats {
- gpr_uint64 cnt;
- gpr_uint64 rpc_error_cnt;
- gpr_uint64 app_error_cnt;
- double elapsed_time_ms;
- double api_request_bytes;
- double wire_request_bytes;
- double api_response_bytes;
- double wire_response_bytes;
-};
+ struct census_rpc_stats
+ {
+ gpr_uint64 cnt;
+ gpr_uint64 rpc_error_cnt;
+ gpr_uint64 app_error_cnt;
+ double elapsed_time_ms;
+ double api_request_bytes;
+ double wire_request_bytes;
+ double api_response_bytes;
+ double wire_response_bytes;
+ };
/* Creates an empty rpc stats object on heap. */
-census_rpc_stats* census_rpc_stats_create_empty(void);
-
-typedef struct census_per_method_rpc_stats {
- const char* method;
- census_rpc_stats minute_stats; /* cumulative stats in the past minute */
- census_rpc_stats hour_stats; /* cumulative stats in the past hour */
- census_rpc_stats total_stats; /* cumulative stats from last gc */
-} census_per_method_rpc_stats;
-
-typedef struct census_aggregated_rpc_stats {
- int num_entries;
- census_per_method_rpc_stats* stats;
-} census_aggregated_rpc_stats;
+ census_rpc_stats *census_rpc_stats_create_empty (void);
+
+ typedef struct census_per_method_rpc_stats
+ {
+ const char *method;
+ census_rpc_stats minute_stats; /* cumulative stats in the past minute */
+ census_rpc_stats hour_stats; /* cumulative stats in the past hour */
+ census_rpc_stats total_stats; /* cumulative stats from last gc */
+ } census_per_method_rpc_stats;
+
+ typedef struct census_aggregated_rpc_stats
+ {
+ int num_entries;
+ census_per_method_rpc_stats *stats;
+ } census_aggregated_rpc_stats;
/* Initializes an aggregated rpc stats object to an empty state. */
-void census_aggregated_rpc_stats_set_empty(census_aggregated_rpc_stats* data);
+ void census_aggregated_rpc_stats_set_empty (census_aggregated_rpc_stats * data);
/* Records client side stats of a rpc. */
-void census_record_rpc_client_stats(census_op_id op_id,
- const census_rpc_stats* stats);
+ void census_record_rpc_client_stats (census_op_id op_id, const census_rpc_stats * stats);
/* Records server side stats of a rpc. */
-void census_record_rpc_server_stats(census_op_id op_id,
- const census_rpc_stats* stats);
+ void census_record_rpc_server_stats (census_op_id op_id, const census_rpc_stats * stats);
/* The following two functions are intended for inprocess query of
per-service per-method stats from grpc implementations. */
@@ -84,18 +86,18 @@ void census_record_rpc_server_stats(census_op_id op_id,
/* Populates *data_map with server side aggregated per-service per-method
stats.
DO NOT CALL from outside of grpc code. */
-void census_get_server_stats(census_aggregated_rpc_stats* data_map);
+ void census_get_server_stats (census_aggregated_rpc_stats * data_map);
/* Populates *data_map with client side aggregated per-service per-method
stats.
DO NOT CALL from outside of grpc code. */
-void census_get_client_stats(census_aggregated_rpc_stats* data_map);
+ void census_get_client_stats (census_aggregated_rpc_stats * data_map);
-void census_stats_store_init(void);
-void census_stats_store_shutdown(void);
+ void census_stats_store_init (void);
+ void census_stats_store_shutdown (void);
#ifdef __cplusplus
}
#endif
-#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H */
+#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H */