commit
b2924667e3
|
@ -187,7 +187,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
|
||||||
desc: desc,
|
desc: desc,
|
||||||
upperBounds: opts.Buckets,
|
upperBounds: opts.Buckets,
|
||||||
labelPairs: makeLabelPairs(desc, labelValues),
|
labelPairs: makeLabelPairs(desc, labelValues),
|
||||||
counts: [2]*histogramCounts{&histogramCounts{}, &histogramCounts{}},
|
counts: [2]*histogramCounts{{}, {}},
|
||||||
}
|
}
|
||||||
for i, upperBound := range h.upperBounds {
|
for i, upperBound := range h.upperBounds {
|
||||||
if i < len(h.upperBounds)-1 {
|
if i < len(h.upperBounds)-1 {
|
||||||
|
|
|
@ -208,7 +208,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary {
|
||||||
s := &noObjectivesSummary{
|
s := &noObjectivesSummary{
|
||||||
desc: desc,
|
desc: desc,
|
||||||
labelPairs: makeLabelPairs(desc, labelValues),
|
labelPairs: makeLabelPairs(desc, labelValues),
|
||||||
counts: [2]*summaryCounts{&summaryCounts{}, &summaryCounts{}},
|
counts: [2]*summaryCounts{{}, {}},
|
||||||
}
|
}
|
||||||
s.init(s) // Init self-collection.
|
s.init(s) // Init self-collection.
|
||||||
return s
|
return s
|
||||||
|
|
Loading…
Reference in New Issue