Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL * valve scales its fold caps with it (resolveWalValveMb).
()
| 702 | /** Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL |
| 703 | * valve scales its fold caps with it (resolveWalValveMb). */ |
| 704 | getDbFileSizeBytes(): number { |
| 705 | if (!this.dbPath || this.dbPath === ':memory:') return 0; |
| 706 | try { |
| 707 | return fs.statSync(this.dbPath).size; |
| 708 | } catch { |
| 709 | return 0; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | /** Current `wal_autocheckpoint` interval in pages (0 = disabled). */ |
| 714 | getWalAutocheckpoint(): number { |
no outgoing calls
no test coverage detected