Skip to content

Commit 70253f4

Browse files
committed
Fix typo in doc comment
Signed-off-by: beorn7 <[email protected]>
1 parent 5b19c55 commit 70253f4

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

prometheus/histogram.go

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,31 @@ var sparseBounds = [][]float64{
4545
// Schema 2:
4646
{0.5, 0.5946035575013605, 0.7071067811865475, 0.8408964152537144},
4747
// Schema 3:
48-
{0.5, 0.5452538663326288, 0.5946035575013605, 0.6484197773255048,
49-
0.7071067811865475, 0.7711054127039704, 0.8408964152537144, 0.9170040432046711},
48+
{
49+
0.5, 0.5452538663326288, 0.5946035575013605, 0.6484197773255048,
50+
0.7071067811865475, 0.7711054127039704, 0.8408964152537144, 0.9170040432046711,
51+
},
5052
// Schema 4:
51-
{0.5, 0.5221368912137069, 0.5452538663326288, 0.5693943173783458,
53+
{
54+
0.5, 0.5221368912137069, 0.5452538663326288, 0.5693943173783458,
5255
0.5946035575013605, 0.620928906036742, 0.6484197773255048, 0.6771277734684463,
5356
0.7071067811865475, 0.7384130729697496, 0.7711054127039704, 0.805245165974627,
54-
0.8408964152537144, 0.8781260801866495, 0.9170040432046711, 0.9576032806985735},
57+
0.8408964152537144, 0.8781260801866495, 0.9170040432046711, 0.9576032806985735,
58+
},
5559
// Schema 5:
56-
{0.5, 0.5109485743270583, 0.5221368912137069, 0.5335702003384117,
60+
{
61+
0.5, 0.5109485743270583, 0.5221368912137069, 0.5335702003384117,
5762
0.5452538663326288, 0.5571933712979462, 0.5693943173783458, 0.5818624293887887,
5863
0.5946035575013605, 0.6076236799902344, 0.620928906036742, 0.6345254785958666,
5964
0.6484197773255048, 0.6626183215798706, 0.6771277734684463, 0.6919549409819159,
6065
0.7071067811865475, 0.7225904034885232, 0.7384130729697496, 0.7545822137967112,
6166
0.7711054127039704, 0.7879904225539431, 0.805245165974627, 0.8228777390769823,
6267
0.8408964152537144, 0.8593096490612387, 0.8781260801866495, 0.8973545375015533,
63-
0.9170040432046711, 0.9370838170551498, 0.9576032806985735, 0.9785720620876999},
68+
0.9170040432046711, 0.9370838170551498, 0.9576032806985735, 0.9785720620876999,
69+
},
6470
// Schema 6:
65-
{0.5, 0.5054446430258502, 0.5109485743270583, 0.5165124395106142,
71+
{
72+
0.5, 0.5054446430258502, 0.5109485743270583, 0.5165124395106142,
6673
0.5221368912137069, 0.5278225891802786, 0.5335702003384117, 0.5393803988785598,
6774
0.5452538663326288, 0.5511912916539204, 0.5571933712979462, 0.5632608093041209,
6875
0.5693943173783458, 0.5755946149764913, 0.5818624293887887, 0.5881984958251406,
@@ -77,9 +84,11 @@ var sparseBounds = [][]float64{
7784
0.8408964152537144, 0.8500531768592616, 0.8593096490612387, 0.8686669176368529,
7885
0.8781260801866495, 0.8876882462632604, 0.8973545375015533, 0.9071260877501991,
7986
0.9170040432046711, 0.9269895625416926, 0.9370838170551498, 0.9472879907934827,
80-
0.9576032806985735, 0.9680308967461471, 0.9785720620876999, 0.9892280131939752},
87+
0.9576032806985735, 0.9680308967461471, 0.9785720620876999, 0.9892280131939752,
88+
},
8189
// Schema 7:
82-
{0.5, 0.5027149505564014, 0.5054446430258502, 0.5081891574554764,
90+
{
91+
0.5, 0.5027149505564014, 0.5054446430258502, 0.5081891574554764,
8392
0.5109485743270583, 0.5137229745593818, 0.5165124395106142, 0.5193170509806894,
8493
0.5221368912137069, 0.5249720429003435, 0.5278225891802786, 0.5306886136446309,
8594
0.5335702003384117, 0.5364674337629877, 0.5393803988785598, 0.5423091811066545,
@@ -110,9 +119,11 @@ var sparseBounds = [][]float64{
110119
0.9170040432046711, 0.9219832844793128, 0.9269895625416926, 0.9320230241988943,
111120
0.9370838170551498, 0.9421720895161669, 0.9472879907934827, 0.9524316709088368,
112121
0.9576032806985735, 0.9628029718180622, 0.9680308967461471, 0.9732872087896164,
113-
0.9785720620876999, 0.9838856116165875, 0.9892280131939752, 0.9945994234836328},
122+
0.9785720620876999, 0.9838856116165875, 0.9892280131939752, 0.9945994234836328,
123+
},
114124
// Schema 8:
115-
{0.5, 0.5013556375251013, 0.5027149505564014, 0.5040779490592088,
125+
{
126+
0.5, 0.5013556375251013, 0.5027149505564014, 0.5040779490592088,
116127
0.5054446430258502, 0.5068150424757447, 0.5081891574554764, 0.509566998038869,
117128
0.5109485743270583, 0.5123338964485679, 0.5137229745593818, 0.5151158188430205,
118129
0.5165124395106142, 0.5179128468009786, 0.5193170509806894, 0.520725062344158,
@@ -175,7 +186,8 @@ var sparseBounds = [][]float64{
175186
0.9576032806985735, 0.9601996065815236, 0.9628029718180622, 0.9654133954938133,
176187
0.9680308967461471, 0.9706554947643201, 0.9732872087896164, 0.9759260581154889,
177188
0.9785720620876999, 0.9812252401044634, 0.9838856116165875, 0.9865531961276168,
178-
0.9892280131939752, 0.9919100824251095, 0.9945994234836328, 0.9972960560854698},
189+
0.9892280131939752, 0.9919100824251095, 0.9945994234836328, 0.9972960560854698,
190+
},
179191
}
180192

181193
// The sparseBounds above can be generated with the code below.
@@ -794,7 +806,7 @@ func (h *histogram) limitSparseBuckets(counts *histogramCounts, value float64, b
794806
h.doubleBucketWidth(hotCounts, coldCounts)
795807
}
796808

797-
// maybyReset resests the whole histogram if at least h.sparseMinResetDuration
809+
// maybeReset resests the whole histogram if at least h.sparseMinResetDuration
798810
// has been passed. It returns true if the histogram has been reset. The caller
799811
// must have locked h.mtx.
800812
func (h *histogram) maybeReset(hot, cold *histogramCounts, coldIdx uint64, value float64, bucket int) bool {

0 commit comments

Comments
 (0)