You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change all fb303 timeseries to use millisecond duration
Summary:
This diff changes the clock for all fb303 timeseries to be of millisecond granularity. MultiLevelTimeSeries is also used for fb303 historgram, its clock type is left unchanged to keep this diff small.
The fb303 timeseries test is carefully updated to ensure the rate calculation is per-second instead of per-Duration (which is the default) for all fb303 timeseries, and captures other existing nuances from bucketed timeseries that are not obvious before due to its clock granularity.
A few things are temporarily introduced
* `fb303::ExportedStatForHistogram` which is the MultiLevelTimeSeries with second granularity still used for fb303 histogram
* `fb303::MultiLevelTimeSeries` still takes a CT template argument instead of hard-coding to have millisecond clock because it needs to support both timeseries (moving to second granularity clock in this diff) and histogram (staying on second granularity clock temporarily)
The change should be a no-op for services because all clients are still adding value to the timeseries using a clock with second granularity. That being said, the underlying timeseires will have more buckets now especially for the small timeseires (e.g. 1s, 5s). It would have a small memory regression. We will measure the memory regression with zippydb, which has the most number of timeseries per server process.
The default timeseries starts from minute (https://fburl.com/code/ia0wbvhb), so the overall memory regression should not be a major concern. For 1s timeseries the memory regression is only 59 (buckets) * 16 bytes (8 bytes for sum, and 8 bytes for count per bucket).
D82152395 has more info about the impact and why we are making this change.
#buildall
Reviewed By: islamismailov
Differential Revision: D80005386
fbshipit-source-id: 1d378ee32fd5b087e8445c482bedbb8e6ec6b45d
0 commit comments