Fix pre-allocation
This commit is contained in:
parent
f3c667c5fe
commit
0abe5348a3
|
|
@ -187,8 +187,8 @@ var errUnknownMetricName = errors.New("unknown metric name")
|
||||||
|
|
||||||
func installMetrics(config v1alpha1.MetricsConfig, reg *prometheus.Registry, logger logr.Logger) *metrics {
|
func installMetrics(config v1alpha1.MetricsConfig, reg *prometheus.Registry, logger logr.Logger) *metrics {
|
||||||
metrics := &metrics{
|
metrics := &metrics{
|
||||||
counters: make(map[string]*counterMetric, len(config.Gauges)),
|
counters: make(map[string]*counterMetric, len(config.Counters)),
|
||||||
gauges: make(map[string]*gaugeMetric, len(config.Counters)),
|
gauges: make(map[string]*gaugeMetric, len(config.Gauges)),
|
||||||
histograms: make(map[string]*histogramMetric, len(config.Histograms)),
|
histograms: make(map[string]*histogramMetric, len(config.Histograms)),
|
||||||
}
|
}
|
||||||
for name, cfg := range config.Gauges {
|
for name, cfg := range config.Gauges {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue