MCPcopy Index your code
hub / github.com/prometheus/prometheus / FromIntHistogram

Function FromIntHistogram

prompb/codec.go:152–167  ·  view source on GitHub ↗

FromIntHistogram returns remote Histogram from the integer Histogram.

(timestamp int64, h *histogram.Histogram)

Source from the content-addressed store, hash-verified

150
151// FromIntHistogram returns remote Histogram from the integer Histogram.
152func 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.
170func FromFloatHistogram(timestamp int64, fh *histogram.FloatHistogram) Histogram {

Calls 2

spansToSpansProtoFunction · 0.70
Histogram_ResetHintTypeAlias · 0.70

Used in the wild real call sites across dependent graphs

searching dependent graphs…