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

Function TestVectorHistogramJSON

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

Source from the content-addressed store, hash-verified

495}
496
497func TestVectorHistogramJSON(t *testing.T) {
498 input := []struct {
499 plain string
500 value Vector
501 }{
502 {
503 plain: `[
504 {
505 "metric":{
506 "__name__":"test_metric"
507 },
508 "histogram":[
509 1234.567,
510 {
511 "count":"6",
512 "sum":"3897",
513 "buckets":[
514 [
515 1,
516 "-4870.992343051145",
517 "-4466.7196729968955",
518 "1"
519 ],
520 [
521 1,
522 "-861.0779292198035",
523 "-789.6119426088657",
524 "1"
525 ],
526 [
527 1,
528 "-558.3399591246119",
529 "-512",
530 "1"
531 ],
532 [
533 0,
534 "2048",
535 "2233.3598364984477",
536 "1"
537 ],
538 [
539 0,
540 "2896.3093757400984",
541 "3158.4477704354626",
542 "1"
543 ],
544 [
545 0,
546 "4466.7196729968955",
547 "4870.992343051145",
548 "1"
549 ]
550 ]
551 }
552 ]
553 }
554 ]`,

Callers

nothing calls this directly

Calls 2

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…