MCPcopy Create free account
hub / github.com/prometheus/common / TestSampleHistogramPairJSON

Function TestSampleHistogramPairJSON

model/value_histogram_test.go:303–385  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

301}
302
303func TestSampleHistogramPairJSON(t *testing.T) {
304 input := []struct {
305 plain string
306 value SampleHistogramPair
307 }{
308 {
309 plain: `[
310 1234.567,
311 {
312 "count":"6",
313 "sum":"3897",
314 "buckets":[
315 [
316 1,
317 "-4870.992343051145",
318 "-4466.7196729968955",
319 "1"
320 ],
321 [
322 1,
323 "-861.0779292198035",
324 "-789.6119426088657",
325 "1"
326 ],
327 [
328 1,
329 "-558.3399591246119",
330 "-512",
331 "1"
332 ],
333 [
334 0,
335 "2048",
336 "2233.3598364984477",
337 "1"
338 ],
339 [
340 0,
341 "2896.3093757400984",
342 "3158.4477704354626",
343 "1"
344 ],
345 [
346 0,
347 "4466.7196729968955",
348 "4870.992343051145",
349 "1"
350 ]
351 ]
352 }
353 ]`,
354 value: SampleHistogramPair{
355 Histogram: genSampleHistogram(),
356 Timestamp: 1234567,
357 },
358 },
359 }
360

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.95
genSampleHistogramFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…