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

Method getDbFileSizeBytes

src/db/index.ts:477–484  ·  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

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). */
477 getDbFileSizeBytes(): number {
478 if (!this.dbPath || this.dbPath === ':memory:') return 0;
479 try {
480 return fs.statSync(this.dbPath).size;
481 } catch {
482 return 0;
483 }
484 }
485
486 /** Current `wal_autocheckpoint` interval in pages (0 = disabled). */
487 getWalAutocheckpoint(): number {

Callers 2

indexAllMethod · 0.80
syncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected