Commit 6526490
tool/logs: parse blob reference size in compaction log lines
Compaction event log lines now render a level's size as `(table + blob)`
(e.g. `(4.2MB + 1.0MB)`) when the input tables reference blob files. The
log parser previously assumed a single size value inside the parentheses:
- The `compactionPattern` regexp required the closing paren immediately
after the first size, so the `bytes` capture (used for the output size
of an `compacted` line) matched nothing for the new format.
- `sumInputBytes` passed the entire parenthesized contents to
`unHumanize`, which only understands a single size token.
This change teaches the parser about the optional `+ <size>` suffix. The
regexp now accepts one or more `+`-separated sizes within the
parentheses, and a new `unHumanizeSum` helper splits on `+` and sums the
parts. Both the input-byte and output-byte parsing paths use it, so the
reported sizes include the estimated physical size of blob references.
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>1 parent 8b39409 commit 6526490
3 files changed
Lines changed: 58 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 151 | + | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
158 | | - | |
| 156 | + | |
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
| 197 | + | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| |||
1563 | 1563 | | |
1564 | 1564 | | |
1565 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
1566 | 1577 | | |
1567 | 1578 | | |
1568 | 1579 | | |
| |||
1575 | 1586 | | |
1576 | 1587 | | |
1577 | 1588 | | |
1578 | | - | |
| 1589 | + | |
1579 | 1590 | | |
1580 | 1591 | | |
1581 | 1592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
193 | 197 | | |
194 | 198 | | |
195 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
196 | 226 | | |
197 | 227 | | |
198 | 228 | | |
| |||
453 | 483 | | |
454 | 484 | | |
455 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
456 | 496 | | |
457 | 497 | | |
458 | 498 | | |
| |||
0 commit comments