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

Method getDbFileSizeBytes

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

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 {

Callers 2

indexAllMethod · 0.80
syncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected