Remove dummy

pull/12357/head
Craig Tiller 8 years ago
parent 640dfe499e
commit d110783447
  1. 158
      src/core/lib/debug/stats_data.c
  2. 36
      src/core/lib/debug/stats_data.h
  3. 3
      src/core/lib/debug/stats_data.yaml

@ -25,7 +25,7 @@ const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"histogram_slow_lookups",
};
const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = {
"tcp_write_size", "tcp_write_iov_size", "tcp_read_size", "client_latency",
"tcp_write_size", "tcp_write_iov_size", "tcp_read_size",
};
const double grpc_stats_table_0[64] = {0,
1,
@ -165,155 +165,7 @@ const uint8_t grpc_stats_table_3[52] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52};
const double grpc_stats_table_4[128] = {0,
1,
2,
3,
4,
5,
6.04764436132,
7.3148004642,
8.8474623563,
10.7012611662,
12.9434843502,
15.6555180292,
18.9358010666,
22.9033981095,
27.7023212864,
33.5067574247,
40.5273905211,
49.0190489527,
59.2899549993,
71.7129124069,
86.7388380702,
104.913128993,
126.895458596,
153.483720931,
185.642991889,
224.540558623,
271.588288649,
328.493876489,
397.322827976,
480.573432046,
581.267441303,
703.059752763,
850.371069894,
1028.54836117,
1244.05893936,
1504.72520595,
1820.00858143,
2201.352927,
2662.59992325,
3220.49148246,
3895.27743092,
4711.45051817,
5698.63543198,
6892.66408748,
8336.87622063,
10083.6924933,
12196.5172097,
14752.0397062,
17843.0179495,
21581.6453782,
26103.6231959,
31573.0859261,
38188.5590141,
46190.1647178,
55868.3378408,
67574.3676638,
81733.1487144,
98858.6031911,
119572.334831,
144626.191302,
174929.554066,
211582.346255,
255914.956657,
309536.528921,
374393.36875,
452839.589087,
547722.557505,
662486.247293,
801296.243578,
969190.941845,
1172264.4269,
1417887.67026,
1714976.07481,
2074313.07772,
2508941.55762,
3034637.25277,
3670481.37407,
4439553.19704,
5369767.77177,
6494889.15731,
7855755.95793,
9501763.64457,
11492657.4655,
13900701.0236,
16813299.2328,
20336170.86,
24597185.8065,
29751006.4094,
35984701.2311,
43524535.0988,
52644181.8539,
63674657.909,
77016337.1725,
93153483.4461,
112671827.78,
136279828.791,
164834387.63,
199371950.98,
241146131.03,
291673207.915,
352787166.24,
426706263.331,
516113545.475,
624254234.618,
755053520.404,
913259033.033,
1104613168.31,
1336061519.75,
1616004983.26,
1954604684.98,
2364150800.34,
2859508651.4,
3458658274.36,
4183347042.13,
5059879030.16,
6120069777.14,
7402401095.72,
8953417849.36,
10829417394.2,
13098493008.1,
15843005476.5,
19162572547.2,
23177684762.8,
28034078912.8,
33908027852.3,
41012738688.9,
49606091574.9,
60000000000.0};
const uint16_t grpc_stats_table_5[265] = {
0, 2, 2, 4, 4, 6, 6, 8, 8, 11, 11, 11, 13, 13, 15,
15, 17, 17, 20, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30,
30, 33, 33, 33, 35, 35, 37, 37, 39, 39, 42, 42, 42, 44, 44,
46, 46, 48, 48, 51, 51, 51, 53, 53, 54, 57, 57, 57, 60, 60,
60, 61, 63, 63, 66, 66, 66, 68, 68, 70, 70, 72, 72, 75, 75,
75, 77, 77, 79, 79, 81, 81, 84, 84, 84, 85, 87, 87, 90, 90,
90, 92, 92, 94, 94, 96, 96, 99, 99, 99, 101, 101, 103, 103, 105,
105, 108, 108, 108, 109, 112, 112, 112, 114, 114, 116, 116, 118, 118, 120,
120, 123, 123, 123, 125, 125, 127, 127, 129, 129, 132, 132, 132, 134, 134,
136, 136, 138, 138, 140, 140, 142, 142, 145, 145, 145, 147, 147, 149, 149,
151, 151, 154, 154, 154, 156, 156, 158, 158, 160, 160, 162, 162, 165, 165,
165, 166, 169, 169, 169, 172, 172, 172, 173, 175, 175, 178, 178, 178, 180,
180, 182, 182, 184, 184, 187, 187, 187, 189, 189, 191, 191, 193, 193, 196,
196, 196, 197, 199, 199, 202, 202, 202, 204, 204, 206, 206, 208, 208, 211,
211, 211, 213, 213, 215, 215, 217, 217, 220, 220, 220, 221, 224, 224, 224,
226, 226, 228, 228, 230, 230, 232, 232, 235, 235, 235, 237, 237, 239, 239,
241, 241, 244, 244, 244, 246, 246, 248, 248, 250, 250, 252, 252, 254, 254,
257, 257, 257, 259, 259, 261, 261, 263, 263, 265};
const int grpc_stats_histo_buckets[4] = {64, 64, 64, 128};
const int grpc_stats_histo_start[4] = {0, 64, 128, 192};
const double *const grpc_stats_histo_bucket_boundaries[4] = {
grpc_stats_table_0, grpc_stats_table_2, grpc_stats_table_0,
grpc_stats_table_4};
const int grpc_stats_histo_buckets[3] = {64, 64, 64};
const int grpc_stats_histo_start[3] = {0, 64, 128};
const double *const grpc_stats_histo_bucket_boundaries[3] = {
grpc_stats_table_0, grpc_stats_table_2, grpc_stats_table_0};

@ -38,7 +38,6 @@ typedef enum {
GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE,
GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE,
GRPC_STATS_HISTOGRAM_TCP_READ_SIZE,
GRPC_STATS_HISTOGRAM_CLIENT_LATENCY,
GRPC_STATS_HISTOGRAM_COUNT
} grpc_stats_histograms;
extern const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT];
@ -49,9 +48,7 @@ typedef enum {
GRPC_STATS_HISTOGRAM_TCP_WRITE_IOV_SIZE_BUCKETS = 64,
GRPC_STATS_HISTOGRAM_TCP_READ_SIZE_FIRST_SLOT = 128,
GRPC_STATS_HISTOGRAM_TCP_READ_SIZE_BUCKETS = 64,
GRPC_STATS_HISTOGRAM_CLIENT_LATENCY_FIRST_SLOT = 192,
GRPC_STATS_HISTOGRAM_CLIENT_LATENCY_BUCKETS = 128,
GRPC_STATS_HISTOGRAM_BUCKETS = 320
GRPC_STATS_HISTOGRAM_BUCKETS = 192
} grpc_stats_histogram_constants;
#define GRPC_STATS_INC_CLIENT_CALLS_CREATED(exec_ctx) \
GRPC_STATS_INC_COUNTER((exec_ctx), GRPC_STATS_COUNTER_CLIENT_CALLS_CREATED)
@ -137,37 +134,12 @@ typedef enum {
} \
} \
} while (false)
#define GRPC_STATS_INC_CLIENT_LATENCY(exec_ctx, value) \
do { \
double _hist_val = (double)(value); \
if (_hist_val < 0) _hist_val = 0; \
uint64_t _hist_idx = *(uint64_t *)&_hist_val; \
gpr_log(GPR_DEBUG, "client_latency %lf %" PRId64 " %" PRId64, _hist_val, \
_hist_idx, 4767623155525091328ull); \
if (_hist_val < 6.000000) { \
GRPC_STATS_INC_HISTOGRAM( \
(exec_ctx), GRPC_STATS_HISTOGRAM_CLIENT_LATENCY, (int)_hist_val); \
} else { \
if (_hist_idx < 4767623155525091328ull) { \
GRPC_STATS_INC_HISTOGRAM( \
(exec_ctx), GRPC_STATS_HISTOGRAM_CLIENT_LATENCY, \
grpc_stats_table_5[((_hist_idx - 4618441417868443648ull) >> 49)]); \
} else { \
GRPC_STATS_INC_HISTOGRAM( \
(exec_ctx), GRPC_STATS_HISTOGRAM_CLIENT_LATENCY, \
grpc_stats_histo_find_bucket_slow((exec_ctx), (value), \
grpc_stats_table_4, 128)); \
} \
} \
} while (false)
extern const double grpc_stats_table_0[64];
extern const uint8_t grpc_stats_table_1[87];
extern const double grpc_stats_table_2[64];
extern const uint8_t grpc_stats_table_3[52];
extern const double grpc_stats_table_4[128];
extern const uint16_t grpc_stats_table_5[265];
extern const int grpc_stats_histo_buckets[4];
extern const int grpc_stats_histo_start[4];
extern const double *const grpc_stats_histo_bucket_boundaries[4];
extern const int grpc_stats_histo_buckets[3];
extern const int grpc_stats_histo_start[3];
extern const double *const grpc_stats_histo_bucket_boundaries[3];
#endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */

@ -17,6 +17,3 @@
- histogram: tcp_read_size
max: 16777216
buckets: 64
- histogram: client_latency
max: 60e9
buckets: 128

Loading…
Cancel
Save