74
74
Label : []* dto.LabelPair {
75
75
{
76
76
Name : proto .String ("testing" ),
77
- Value : proto .String ("int histogram" ),
77
+ Value : proto .String ("int classic histogram" ),
78
+ },
79
+ },
80
+ Histogram : & dto.Histogram {
81
+ SampleCount : proto .Uint64 (20 ),
82
+ SampleSum : proto .Float64 (99.23 ),
83
+ Bucket : []* dto.Bucket {
84
+ {
85
+ UpperBound : proto .Float64 (250000 ),
86
+ CumulativeCount : proto .Uint64 (3 ),
87
+ },
88
+ {
89
+ UpperBound : proto .Float64 (500000 ),
90
+ CumulativeCount : proto .Uint64 (17 ),
91
+ },
92
+ },
93
+ },
94
+ },
95
+ {
96
+ Label : []* dto.LabelPair {
97
+ {
98
+ Name : proto .String ("testing" ),
99
+ Value : proto .String ("float classic histogram" ),
100
+ },
101
+ },
102
+ Histogram : & dto.Histogram {
103
+ SampleCountFloat : proto .Float64 (20 ),
104
+ SampleSum : proto .Float64 (99.23 ),
105
+ Bucket : []* dto.Bucket {
106
+ {
107
+ UpperBound : proto .Float64 (250000 ),
108
+ CumulativeCountFloat : proto .Float64 (3 ),
109
+ },
110
+ {
111
+ UpperBound : proto .Float64 (500000 ),
112
+ CumulativeCountFloat : proto .Float64 (17 ),
113
+ },
114
+ },
115
+ },
116
+ },
117
+ {
118
+ Label : []* dto.LabelPair {
119
+ {
120
+ Name : proto .String ("testing" ),
121
+ Value : proto .String ("int native histogram" ),
78
122
},
79
123
},
80
124
Histogram : & dto.Histogram {
@@ -109,7 +153,7 @@ var (
109
153
Label : []* dto.LabelPair {
110
154
{
111
155
Name : proto .String ("testing" ),
112
- Value : proto .String ("float histogram" ),
156
+ Value : proto .String ("float native histogram" ),
113
157
},
114
158
},
115
159
Histogram : & dto.Histogram {
@@ -261,6 +305,32 @@ func TestMetricsAPI(t *testing.T) {
261
305
"time_stamp": "2020-03-10T00:54:08.025744841+05:30",
262
306
"type": "HISTOGRAM",
263
307
"metrics": [
308
+ {
309
+ "buckets": {
310
+ "250000": "3",
311
+ "500000": "17"
312
+ },
313
+ "count": "20",
314
+ "labels": {
315
+ "instance": "inst'a\"n\\ce1",
316
+ "job": "Björn",
317
+ "testing": "int classic histogram"
318
+ },
319
+ "sum": "99.23"
320
+ },
321
+ {
322
+ "buckets": {
323
+ "250000": "3",
324
+ "500000": "17"
325
+ },
326
+ "count": "20",
327
+ "labels": {
328
+ "instance": "inst'a\"n\\ce1",
329
+ "job": "Björn",
330
+ "testing": "float classic histogram"
331
+ },
332
+ "sum": "99.23"
333
+ },
264
334
{
265
335
"buckets": [
266
336
[
@@ -280,7 +350,7 @@ func TestMetricsAPI(t *testing.T) {
280
350
"labels": {
281
351
"instance": "inst'a\"n\\ce1",
282
352
"job": "Björn",
283
- "testing": "int histogram"
353
+ "testing": "int native histogram"
284
354
},
285
355
"sum": "99.23"
286
356
},
@@ -327,7 +397,7 @@ func TestMetricsAPI(t *testing.T) {
327
397
"labels": {
328
398
"instance": "inst'a\"n\\ce1",
329
399
"job": "Björn",
330
- "testing": "float histogram"
400
+ "testing": "float native histogram"
331
401
},
332
402
"sum": "99.23"
333
403
}
0 commit comments