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

Method getWalSizeBytes

src/db/index.ts:559–566  ·  view source on GitHub ↗

* Size of the `-wal` sidecar file in bytes. 0 when it doesn't exist (non-WAL * journal mode, in-memory DB, or no write since the last checkpoint+reset).

()

Source from the content-addressed store, hash-verified

557 * journal mode, in-memory DB, or no write since the last checkpoint+reset).
558 */
559 getWalSizeBytes(): number {
560 if (!this.dbPath || this.dbPath === ':memory:') return 0;
561 try {
562 return fs.statSync(`${this.dbPath}-wal`).size;
563 } catch {
564 return 0;
565 }
566 }
567
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). */

Callers 10

healOversizedWalMethod · 0.95
runWalHealMethod · 0.95
getStatsMethod · 0.80
growthBytesMethod · 0.80
startMethod · 0.80
backpressureMethod · 0.80
foldNowMethod · 0.80
backfillFullyMethod · 0.80
fireMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected