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

Method getDbFileSizeBytes

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

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). */
570 getDbFileSizeBytes(): number {
571 if (!this.dbPath || this.dbPath === ':memory:') return 0;
572 try {
573 return fs.statSync(this.dbPath).size;
574 } catch {
575 return 0;
576 }
577 }
578
579 /** Current `wal_autocheckpoint` interval in pages (0 = disabled). */
580 getWalAutocheckpoint(): number {

Callers 2

indexAllMethod · 0.80
syncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected