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

Method getWalSizeBytes

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

431 * journal mode, in-memory DB, or no write since the last checkpoint+reset).
432 */
433 getWalSizeBytes(): number {
434 if (!this.dbPath || this.dbPath === ':memory:') return 0;
435 try {
436 return fs.statSync(`${this.dbPath}-wal`).size;
437 } catch {
438 return 0;
439 }
440 }
441
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). */

Callers 7

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