* Size of the `-wal` sidecar file in bytes. 0 when it doesn't exist (non-WAL * journal mode, in-memory DB, or no write since the last checkpoint+reset).
()
| 464 | * journal mode, in-memory DB, or no write since the last checkpoint+reset). |
| 465 | */ |
| 466 | getWalSizeBytes(): number { |
| 467 | if (!this.dbPath || this.dbPath === ':memory:') return 0; |
| 468 | try { |
| 469 | return fs.statSync(`${this.dbPath}-wal`).size; |
| 470 | } catch { |
| 471 | return 0; |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | /** Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL |
| 476 | * valve scales its fold caps with it (resolveWalValveMb). */ |
no outgoing calls
no test coverage detected