Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bug in printing eviction success rate
Summary: This change fixes below bug printing wrong eviction success rate. Evict Attempts: 439,372 Success: -4198434145486952.50% RAM Evictions : 618,369 This happens because of the overflow in below code https://fburl.com/code/ln24ozv0 ``` out << folly::sformat( "Evict Attempts: {:,} Success: {:.2f}%", evictAttempts, invertPctFn(evictAttempts - numEvictions, evictAttempts) ``` Again, this could happen because evictAttempts and numEvictions are not taken atomically https://fburl.com/code/i587dhfh Reviewed By: therealgymmy Differential Revision: D46043428 fbshipit-source-id: 022a07e09c1093ca705e9e57596fa912497ba32d
- Loading branch information