Fix MultiLevelTimeseries::getRate()
Summary:I hit a landmine where rate() returned 0 for my tests where fewer than 60 items were added per minute. This was because it was truncating it. And yet, countRate() was working.
It doesn't make sense for a rate (value accumulated per time period) to be integral.
Folly: I changed rate() to return a double by default for folly, as was done by avg() and countRate(). Looked like a typo to me.
Common wrapper: I changed getRate() to allow you to override and make it double, as was done by getAvg(). Defaulting to int (which is usually the value type) is a bad call IMO but it's a riskier change to change it to double, and I want to be consistent with getAvg().
Reviewed By: tracelog
Differential Revision:
D2921061
fb-gh-sync-id:
00875f2ab7963ef3ba2db475aedaf6ebd413b38f
shipit-source-id:
00875f2ab7963ef3ba2db475aedaf6ebd413b38f