marshalHistogramBucket writes something like: [ 3, "-0.25", "0.25", "3"] See marshalHistogram to understand what the numbers mean. Adapted from https://github.com/prometheus/client_golang/blob/4b158abea9470f75b6f07460cdc2189b91914562/api/prometheus/v1/api.go#L294.
(b HistogramBucket, stream *jsoniter.Stream)
| 744 | // See marshalHistogram to understand what the numbers mean. |
| 745 | // Adapted from https://github.com/prometheus/client_golang/blob/4b158abea9470f75b6f07460cdc2189b91914562/api/prometheus/v1/api.go#L294. |
| 746 | func marshalHistogramBucket(b HistogramBucket, stream *jsoniter.Stream) { |
| 747 | stream.WriteArrayStart() |
| 748 | stream.WriteInt32(b.Boundaries) |
| 749 | stream.WriteMore() |
| 750 | jsonutil.MarshalFloat(b.Lower, stream) |
| 751 | stream.WriteMore() |
| 752 | jsonutil.MarshalFloat(b.Upper, stream) |
| 753 | stream.WriteMore() |
| 754 | jsonutil.MarshalFloat(b.Count, stream) |
| 755 | stream.WriteArrayEnd() |
| 756 | } |
| 757 | |
| 758 | func (s *PrometheusResponseStats) MarshalJSON() ([]byte, error) { |
| 759 | stats := struct { |