* Returns a new CacheStats representing the sum of this CacheStats and another. * * @param other - The statistics to add to this instance * @returns The sum of this instance and other
(other: CacheStats)
| 182 | * @returns The sum of this instance and other |
| 183 | */ |
| 184 | plus(other: CacheStats): CacheStats { |
| 185 | return CacheStats.of( |
| 186 | this.hitCount + other.hitCount, |
| 187 | this.missCount + other.missCount, |
| 188 | this.loadSuccessCount + other.loadSuccessCount, |
| 189 | this.loadFailureCount + other.loadFailureCount, |
| 190 | this.totalLoadTime + other.totalLoadTime, |
| 191 | this.evictionCount + other.evictionCount |
| 192 | ); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | /** |