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

Method getDbFileSizeBytes

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

498 /** Size of the main DB file in bytes (0 for in-memory/unknown) — the WAL
499 * valve scales its fold caps with it (resolveWalValveMb). */
500 getDbFileSizeBytes(): number {
501 if (!this.dbPath || this.dbPath === ':memory:') return 0;
502 try {
503 return fs.statSync(this.dbPath).size;
504 } catch {
505 return 0;
506 }
507 }
508
509 /** Current `wal_autocheckpoint` interval in pages (0 = disabled). */
510 getWalAutocheckpoint(): number {

Callers 2

indexAllMethod · 0.80
syncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected