MCPcopy Create free account
hub / github.com/cortexproject/cortex / FromLabelAdaptersToMetricWithCopy

Function FromLabelAdaptersToMetricWithCopy

pkg/cortexpb/compat.go:124–126  ·  view source on GitHub ↗

FromLabelAdaptersToMetric converts []LabelAdapter to a model.Metric with copy. Don't do this on any performance sensitive paths.

(ls []LabelAdapter)

Source from the content-addressed store, hash-verified

122// FromLabelAdaptersToMetric converts []LabelAdapter to a model.Metric with copy.
123// Don't do this on any performance sensitive paths.
124func FromLabelAdaptersToMetricWithCopy(ls []LabelAdapter) model.Metric {
125 return util.LabelsToMetric(FromLabelAdaptersToLabelsWithCopy(ls))
126}
127
128// FromMetricsToLabelAdapters converts model.Metric to []LabelAdapter.
129// Don't do this on any performance sensitive paths.

Callers

nothing calls this directly

Calls 2

LabelsToMetricFunction · 0.92

Tested by

no test coverage detected