Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL * valve scales its fold caps with it (resolveWalValveMb).
()
| 442 | /** Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL |
| 443 | * valve scales its fold caps with it (resolveWalValveMb). */ |
| 444 | getDbFileSizeBytes(): number { |
| 445 | if (!this.dbPath || this.dbPath === ':memory:') return 0; |
| 446 | try { |
| 447 | return fs.statSync(this.dbPath).size; |
| 448 | } catch { |
| 449 | return 0; |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | /** Current `wal_autocheckpoint` interval in pages (0 = disabled). */ |
| 454 | getWalAutocheckpoint(): number { |