Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stats.rb: make cache for is_failure and is_latency
$ ruby -r profile sbin/compare -a 4633c9e07b3b7d7fc262a5f59ff635c1f702af6f Before: % cumulative self self total time seconds seconds calls ms/call ms/call name 11.50 0.33 0.33 12750 0.03 0.07 Object#is_failure 8.36 0.89 0.24 11375 0.02 0.08 Object#is_latency After: (is_failure and is_latency cache) % cumulative self self total time seconds seconds calls ms/call ms/call name 1.39 1.39 0.03 1945 0.02 0.05 Object#is_failure 1.39 1.33 0.03 2099 0.01 0.03 Object#is_latency Signed-off-by: Wanlong Gao <[email protected]> Signed-off-by: Fengguang Wu <[email protected]>
- Loading branch information