NewMetricVec returns an initialized metricVec.
(desc *Desc, newMetric func(lvs ...string) Metric)
| 45 | |
| 46 | // NewMetricVec returns an initialized metricVec. |
| 47 | func NewMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *MetricVec { |
| 48 | return &MetricVec{ |
| 49 | metricMap: &metricMap{ |
| 50 | metrics: map[uint64][]metricWithLabelValues{}, |
| 51 | desc: desc, |
| 52 | newMetric: newMetric, |
| 53 | }, |
| 54 | hashAdd: hashAdd, |
| 55 | hashAddByte: hashAddByte, |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | // DeleteLabelValues removes the metric where the variable labels are the same |
| 60 | // as those passed in as labels (same order as the VariableLabels in Desc). It |
no outgoing calls