MCPcopy Index your code
hub / github.com/cortexproject/cortex / AddHistogramTimeSeries

Method AddHistogramTimeSeries

pkg/cortexpb/compat.go:47–54  ·  view source on GitHub ↗
(lbls []labels.Labels, histograms []WrappedHistogram)

Source from the content-addressed store, hash-verified

45}
46
47func (w *WriteRequest) AddHistogramTimeSeries(lbls []labels.Labels, histograms []WrappedHistogram) {
48 for i := range lbls {
49 ts := TimeseriesFromPool()
50 ts.Labels = append(ts.Labels, FromLabelsToLabelAdapters(lbls[i])...)
51 ts.Histograms = append(ts.Histograms, histograms[i])
52 w.Timeseries = append(w.Timeseries, PreallocTimeseries{TimeSeries: ts})
53 }
54}
55
56// FromLabelAdaptersToLabels casts []LabelAdapter to labels.Labels.
57// It uses unsafe, but as LabelAdapter == labels.Label this should be safe.

Callers 1

CommitMethod · 0.80

Calls 2

TimeseriesFromPoolFunction · 0.85

Tested by

no test coverage detected