MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getDbFileSizeBytes

Method getDbFileSizeBytes

src/db/index.ts:704–711  ·  view source on GitHub ↗

Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL * valve scales its fold caps with it (resolveWalValveMb).

()

Source from the content-addressed store, hash-verified

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 {

Callers 3

indexAllMethod · 0.80
syncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected