FromIntHistogram returns remote Histogram from the integer Histogram.
(timestamp int64, h *histogram.Histogram)
| 150 | |
| 151 | // FromIntHistogram returns remote Histogram from the integer Histogram. |
| 152 | func FromIntHistogram(timestamp int64, h *histogram.Histogram) Histogram { |
| 153 | return Histogram{ |
| 154 | Count: &Histogram_CountInt{CountInt: h.Count}, |
| 155 | Sum: h.Sum, |
| 156 | Schema: h.Schema, |
| 157 | ZeroThreshold: h.ZeroThreshold, |
| 158 | ZeroCount: &Histogram_ZeroCountInt{ZeroCountInt: h.ZeroCount}, |
| 159 | NegativeSpans: spansToSpansProto(h.NegativeSpans), |
| 160 | NegativeDeltas: h.NegativeBuckets, |
| 161 | PositiveSpans: spansToSpansProto(h.PositiveSpans), |
| 162 | PositiveDeltas: h.PositiveBuckets, |
| 163 | ResetHint: Histogram_ResetHint(h.CounterResetHint), |
| 164 | Timestamp: timestamp, |
| 165 | CustomValues: h.CustomValues, // CustomValues are immutable. |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | // FromFloatHistogram returns remote Histogram from the float Histogram. |
| 170 | func FromFloatHistogram(timestamp int64, fh *histogram.FloatHistogram) Histogram { |
searching dependent graphs…