MCPcopy
hub / github.com/redis/node-redis / loadFailureRate

Method loadFailureRate

packages/client/lib/client/cache.ts:144–147  ·  view source on GitHub ↗

* Returns the ratio of cache loading attempts that failed. * This is defined as loadFailureCount / loadCount, or 0.0 when loadCount is 0. * * @returns Ratio of load operations that failed (between 0.0 and 1.0)

()

Source from the content-addressed store, hash-verified

142 * @returns Ratio of load operations that failed (between 0.0 and 1.0)
143 */
144 loadFailureRate(): number {
145 const loadCount = this.loadCount();
146 return loadCount === 0 ? 0.0 : this.loadFailureCount / loadCount;
147 }
148
149 /**
150 * Returns the average time spent loading new values, in milliseconds.

Callers 1

cache.spec.tsFile · 0.80

Calls 1

loadCountMethod · 0.95

Tested by

no test coverage detected