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

Method getWalSizeBytes

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

464 * journal mode, in-memory DB, or no write since the last checkpoint+reset).
465 */
466 getWalSizeBytes(): number {
467 if (!this.dbPath || this.dbPath === ':memory:') return 0;
468 try {
469 return fs.statSync(`${this.dbPath}-wal`).size;
470 } catch {
471 return 0;
472 }
473 }
474
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). */

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