Commit e85499c
authored
Introduce PromSummary.capacity to improve performance (#57)
* Introduce PromSummary.capacity to improve performance
* Add a test for summary with custom capacity
* Use Deque instead of Array to store summary values
* Revert "Use Deque instead of Array to store summary values"
This reverts commit 1dd8c32.
* Use CircularBuffer instead of Array to store summary values
* Slightly improve wording in comments1 parent daf102f commit e85499c
File tree
4 files changed
+39
-6
lines changed- Sources/Prometheus
- MetricTypes
- Tests/SwiftPrometheusTests
4 files changed
+39
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | | - | |
| 70 | + | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
| |||
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| |||
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
| |||
190 | 202 | | |
191 | 203 | | |
192 | 204 | | |
193 | | - | |
| 205 | + | |
194 | 206 | | |
195 | 207 | | |
196 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
248 | 249 | | |
249 | 250 | | |
250 | 251 | | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
258 | | - | |
259 | | - | |
| 260 | + | |
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
147 | 164 | | |
0 commit comments