MustNewConstHistogram is a version of NewConstHistogram that panics where NewConstHistogram would have returned an error.
( desc *Desc, count uint64, sum float64, buckets map[float64]uint64, labelValues ...string, )
| 1384 | // MustNewConstHistogram is a version of NewConstHistogram that panics where |
| 1385 | // NewConstHistogram would have returned an error. |
| 1386 | func MustNewConstHistogram( |
| 1387 | desc *Desc, |
| 1388 | count uint64, |
| 1389 | sum float64, |
| 1390 | buckets map[float64]uint64, |
| 1391 | labelValues ...string, |
| 1392 | ) Metric { |
| 1393 | m, err := NewConstHistogram(desc, count, sum, buckets, labelValues...) |
| 1394 | if err != nil { |
| 1395 | panic(err) |
| 1396 | } |
| 1397 | return m |
| 1398 | } |
| 1399 | |
| 1400 | // NewConstHistogramWithCreatedTimestamp does the same thing as NewConstHistogram but sets the created timestamp. |
| 1401 | func NewConstHistogramWithCreatedTimestamp( |