MCPcopy Create free account
hub / github.com/code-pushup/cli / getStats

Method getStats

packages/utils/src/lib/wal.ts:253–262  ·  view source on GitHub ↗

* Get comprehensive statistics about the WAL file state. * Includes file information, open/close status, and last recovery state. * @returns Statistics object with file info and last recovery state

()

Source from the content-addressed store, hash-verified

251 * @returns Statistics object with file info and last recovery state
252 */
253 getStats(): WalStats<T> {
254 const fileExists = fs.existsSync(this.#file);
255 return {
256 filePath: this.#file,
257 isClosed: this.#fd == null,
258 fileExists,
259 fileSize: fileExists ? fs.statSync(this.#file).size : 0,
260 lastRecovery: this.#lastRecoveryState,
261 };
262 }
263}
264
265export type WalRecord = object | string;

Callers 3

statsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected