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

Method averageLoadPenalty

packages/client/lib/client/cache.ts:155–158  ·  view source on GitHub ↗

* Returns the average time spent loading new values, in milliseconds. * This is defined as totalLoadTime / loadCount, or 0.0 when loadCount is 0. * * @returns Average load time in milliseconds

()

Source from the content-addressed store, hash-verified

153 * @returns Average load time in milliseconds
154 */
155 averageLoadPenalty(): number {
156 const loadCount = this.loadCount();
157 return loadCount === 0 ? 0.0 : this.totalLoadTime / loadCount;
158 }
159
160 /**
161 * Returns a new CacheStats representing the difference between this CacheStats

Callers 1

cache.spec.tsFile · 0.80

Calls 1

loadCountMethod · 0.95

Tested by

no test coverage detected