* 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)
()
| 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. |