Skip to content

@statesync/persistence


@statesync/persistence / PersistenceStats

Interface: PersistenceStats ​

Defined in: persistence/src/types.ts:489

Cumulative statistics about persistence operations.

Retrieved via DisposablePersistenceApplier.getStats. Useful for monitoring, logging, and performance tuning of throttle/debounce settings.

Properties ​

lastSaveAt ​

ts
lastSaveAt: number | null;

Defined in: persistence/src/types.ts:509

Timestamp of the most recent successful save (ms since epoch), or null if no save has completed yet.


lastSaveDurationMs ​

ts
lastSaveDurationMs: number | null;

Defined in: persistence/src/types.ts:515

Duration of the most recent successful save in milliseconds, or null if no save has completed yet.


saveCount ​

ts
saveCount: number;

Defined in: persistence/src/types.ts:493

Total number of successful save operations since the applier was created.


saveErrorCount ​

ts
saveErrorCount: number;

Defined in: persistence/src/types.ts:498

Total number of save operations that failed (threw an error).


throttledCount ​

ts
throttledCount: number;

Defined in: persistence/src/types.ts:521

Number of save invocations that were skipped because the throttle/debounce handler determined a save was already scheduled or too recent.


totalBytesSaved ​

ts
totalBytesSaved: number;

Defined in: persistence/src/types.ts:503

Cumulative size in bytes of all data saved (measured before compression).

Released under the MIT License.