(t *testing.T)
| 403 | } |
| 404 | |
| 405 | func TestSampleHistogramJSON(t *testing.T) { |
| 406 | input := []struct { |
| 407 | plain string |
| 408 | value Sample |
| 409 | }{ |
| 410 | { |
| 411 | plain: `{ |
| 412 | "metric":{ |
| 413 | "__name__":"test_metric" |
| 414 | }, |
| 415 | "histogram":[ |
| 416 | 1234.567, |
| 417 | { |
| 418 | "count":"6", |
| 419 | "sum":"3897", |
| 420 | "buckets":[ |
| 421 | [ |
| 422 | 1, |
| 423 | "-4870.992343051145", |
| 424 | "-4466.7196729968955", |
| 425 | "1" |
| 426 | ], |
| 427 | [ |
| 428 | 1, |
| 429 | "-861.0779292198035", |
| 430 | "-789.6119426088657", |
| 431 | "1" |
| 432 | ], |
| 433 | [ |
| 434 | 1, |
| 435 | "-558.3399591246119", |
| 436 | "-512", |
| 437 | "1" |
| 438 | ], |
| 439 | [ |
| 440 | 0, |
| 441 | "2048", |
| 442 | "2233.3598364984477", |
| 443 | "1" |
| 444 | ], |
| 445 | [ |
| 446 | 0, |
| 447 | "2896.3093757400984", |
| 448 | "3158.4477704354626", |
| 449 | "1" |
| 450 | ], |
| 451 | [ |
| 452 | 0, |
| 453 | "4466.7196729968955", |
| 454 | "4870.992343051145", |
| 455 | "1" |
| 456 | ] |
| 457 | ] |
| 458 | } |
| 459 | ] |
| 460 | }`, |
| 461 | value: Sample{ |
| 462 | Metric: Metric{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…