@@ -45,24 +45,31 @@ var sparseBounds = [][]float64{
45
45
// Schema 2:
46
46
{0.5 , 0.5946035575013605 , 0.7071067811865475 , 0.8408964152537144 },
47
47
// 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
+ },
50
52
// Schema 4:
51
- {0.5 , 0.5221368912137069 , 0.5452538663326288 , 0.5693943173783458 ,
53
+ {
54
+ 0.5 , 0.5221368912137069 , 0.5452538663326288 , 0.5693943173783458 ,
52
55
0.5946035575013605 , 0.620928906036742 , 0.6484197773255048 , 0.6771277734684463 ,
53
56
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
+ },
55
59
// Schema 5:
56
- {0.5 , 0.5109485743270583 , 0.5221368912137069 , 0.5335702003384117 ,
60
+ {
61
+ 0.5 , 0.5109485743270583 , 0.5221368912137069 , 0.5335702003384117 ,
57
62
0.5452538663326288 , 0.5571933712979462 , 0.5693943173783458 , 0.5818624293887887 ,
58
63
0.5946035575013605 , 0.6076236799902344 , 0.620928906036742 , 0.6345254785958666 ,
59
64
0.6484197773255048 , 0.6626183215798706 , 0.6771277734684463 , 0.6919549409819159 ,
60
65
0.7071067811865475 , 0.7225904034885232 , 0.7384130729697496 , 0.7545822137967112 ,
61
66
0.7711054127039704 , 0.7879904225539431 , 0.805245165974627 , 0.8228777390769823 ,
62
67
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
+ },
64
70
// Schema 6:
65
- {0.5 , 0.5054446430258502 , 0.5109485743270583 , 0.5165124395106142 ,
71
+ {
72
+ 0.5 , 0.5054446430258502 , 0.5109485743270583 , 0.5165124395106142 ,
66
73
0.5221368912137069 , 0.5278225891802786 , 0.5335702003384117 , 0.5393803988785598 ,
67
74
0.5452538663326288 , 0.5511912916539204 , 0.5571933712979462 , 0.5632608093041209 ,
68
75
0.5693943173783458 , 0.5755946149764913 , 0.5818624293887887 , 0.5881984958251406 ,
@@ -77,9 +84,11 @@ var sparseBounds = [][]float64{
77
84
0.8408964152537144 , 0.8500531768592616 , 0.8593096490612387 , 0.8686669176368529 ,
78
85
0.8781260801866495 , 0.8876882462632604 , 0.8973545375015533 , 0.9071260877501991 ,
79
86
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
+ },
81
89
// Schema 7:
82
- {0.5 , 0.5027149505564014 , 0.5054446430258502 , 0.5081891574554764 ,
90
+ {
91
+ 0.5 , 0.5027149505564014 , 0.5054446430258502 , 0.5081891574554764 ,
83
92
0.5109485743270583 , 0.5137229745593818 , 0.5165124395106142 , 0.5193170509806894 ,
84
93
0.5221368912137069 , 0.5249720429003435 , 0.5278225891802786 , 0.5306886136446309 ,
85
94
0.5335702003384117 , 0.5364674337629877 , 0.5393803988785598 , 0.5423091811066545 ,
@@ -110,9 +119,11 @@ var sparseBounds = [][]float64{
110
119
0.9170040432046711 , 0.9219832844793128 , 0.9269895625416926 , 0.9320230241988943 ,
111
120
0.9370838170551498 , 0.9421720895161669 , 0.9472879907934827 , 0.9524316709088368 ,
112
121
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
+ },
114
124
// Schema 8:
115
- {0.5 , 0.5013556375251013 , 0.5027149505564014 , 0.5040779490592088 ,
125
+ {
126
+ 0.5 , 0.5013556375251013 , 0.5027149505564014 , 0.5040779490592088 ,
116
127
0.5054446430258502 , 0.5068150424757447 , 0.5081891574554764 , 0.509566998038869 ,
117
128
0.5109485743270583 , 0.5123338964485679 , 0.5137229745593818 , 0.5151158188430205 ,
118
129
0.5165124395106142 , 0.5179128468009786 , 0.5193170509806894 , 0.520725062344158 ,
@@ -175,7 +186,8 @@ var sparseBounds = [][]float64{
175
186
0.9576032806985735 , 0.9601996065815236 , 0.9628029718180622 , 0.9654133954938133 ,
176
187
0.9680308967461471 , 0.9706554947643201 , 0.9732872087896164 , 0.9759260581154889 ,
177
188
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
+ },
179
191
}
180
192
181
193
// The sparseBounds above can be generated with the code below.
@@ -794,7 +806,7 @@ func (h *histogram) limitSparseBuckets(counts *histogramCounts, value float64, b
794
806
h .doubleBucketWidth (hotCounts , coldCounts )
795
807
}
796
808
797
- // maybyReset resests the whole histogram if at least h.sparseMinResetDuration
809
+ // maybeReset resests the whole histogram if at least h.sparseMinResetDuration
798
810
// has been passed. It returns true if the histogram has been reset. The caller
799
811
// must have locked h.mtx.
800
812
func (h * histogram ) maybeReset (hot , cold * histogramCounts , coldIdx uint64 , value float64 , bucket int ) bool {
0 commit comments