Commit cee8982
SqlConnectionPool does not invoke PoolMetrics begin/end methods (#1568)
* Add in_use metrics for sql connection pool
Should fix vert-x3/vertx-micrometer-metrics#278
* Extend queue testing with checks for usage metrics
* Fix MetricsTestBase
Begin/End metrics size depends on the timeout parameter value.
When a timeout is expected, a single begin/end metric should be listed, corresponding to the getConnection/close calls wrapping the tasks.
When a timeout isn't expected, the number of begin/end metric is the number of tasks plus one, corresponding to the getConnection/close calls.
Signed-off-by: Thomas Segismont <[email protected]>
* Minor refactoring
Signed-off-by: Thomas Segismont <[email protected]>
* More robust MetricsTestBase implementation
Since metricsEnd can be invoked asynchronously, relax the test of usage size.
Signed-off-by: Thomas Segismont <[email protected]>
---------
Signed-off-by: Thomas Segismont <[email protected]>
Co-authored-by: Thomas Segismont <[email protected]>1 parent 125df2f commit cee8982
File tree
2 files changed
+54
-8
lines changed- vertx-sql-client/src
- main/java/io/vertx/sqlclient/impl/pool
- test/java/io/vertx/tests/sqlclient/tck
2 files changed
+54
-8
lines changedLines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
184 | 205 | | |
185 | 206 | | |
186 | 207 | | |
| |||
190 | 211 | | |
191 | 212 | | |
192 | 213 | | |
| 214 | + | |
193 | 215 | | |
| 216 | + | |
194 | 217 | | |
195 | 218 | | |
196 | 219 | | |
| |||
202 | 225 | | |
203 | 226 | | |
204 | 227 | | |
| 228 | + | |
205 | 229 | | |
206 | 230 | | |
207 | 231 | | |
| |||
244 | 268 | | |
245 | 269 | | |
246 | 270 | | |
| 271 | + | |
247 | 272 | | |
248 | 273 | | |
249 | 274 | | |
| |||
303 | 328 | | |
304 | 329 | | |
305 | 330 | | |
| 331 | + | |
306 | 332 | | |
307 | 333 | | |
308 | 334 | | |
| |||
443 | 469 | | |
444 | 470 | | |
445 | 471 | | |
| 472 | + | |
446 | 473 | | |
447 | 474 | | |
448 | 475 | | |
| |||
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
147 | 162 | | |
148 | 163 | | |
149 | 164 | | |
| |||
156 | 171 | | |
157 | 172 | | |
158 | 173 | | |
159 | | - | |
| 174 | + | |
160 | 175 | | |
161 | 176 | | |
162 | 177 | | |
163 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
164 | 183 | | |
165 | 184 | | |
166 | 185 | | |
167 | 186 | | |
168 | | - | |
| 187 | + | |
169 | 188 | | |
170 | 189 | | |
171 | 190 | | |
| |||
227 | 246 | | |
228 | 247 | | |
229 | 248 | | |
230 | | - | |
| 249 | + | |
231 | 250 | | |
232 | 251 | | |
233 | 252 | | |
| |||
0 commit comments