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

Method stats

packages/utils/src/lib/wal-sharded.ts:416–436  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414 }
415
416 get stats() {
417 // When finalized, count all shard files from filesystem (for multi-process scenarios)
418 // Otherwise, count only files created by this instance
419 const shardFilesList =
420 this.#state === 'finalized' || this.#state === 'cleaned'
421 ? this.shardFiles()
422 : this.getCreatedShardFiles();
423
424 return {
425 lastRecovery: this.#lastRecovery,
426 state: this.#state,
427 groupId: this.groupId,
428 shardCount: shardFilesList.length,
429 isCoordinator: this.isCoordinator(),
430 isFinalized: this.isFinalized(),
431 isCleaned: this.isCleaned(),
432 finalFilePath: this.getFinalFilePath(),
433 shardFileCount: shardFilesList.length,
434 shardFiles: shardFilesList,
435 };
436 }
437
438 finalizeIfCoordinator(opt?: Record<string, unknown>) {
439 if (this.isCoordinator()) {

Callers

nothing calls this directly

Calls 6

shardFilesMethod · 0.95
getCreatedShardFilesMethod · 0.95
isCoordinatorMethod · 0.95
isFinalizedMethod · 0.95
isCleanedMethod · 0.95
getFinalFilePathMethod · 0.95

Tested by

no test coverage detected