* 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).
()
| 557 | * journal mode, in-memory DB, or no write since the last checkpoint+reset). |
| 558 | */ |
| 559 | getWalSizeBytes(): number { |
| 560 | if (!this.dbPath || this.dbPath === ':memory:') return 0; |
| 561 | try { |
| 562 | return fs.statSync(`${this.dbPath}-wal`).size; |
| 563 | } catch { |
| 564 | return 0; |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | /** Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL |
| 569 | * valve scales its fold caps with it (resolveWalValveMb). */ |
no outgoing calls
no test coverage detected