Commit 446326c
Use millisecond clock in ServiceData
Summary:
There are multiple read paths and write paths for fb303 stats. This change only affects the clock used in writing to ServiceData (e.g. `ServiceData::addStatValue`).
Publishing stats (write path) from `ThreadCachedServiceData` remains using the clock of second granularity (https://fburl.com/code/rwec2dnp). This means, only writing through the global ServiceData will see benefits of sub-second buckets. This is OK because use cases that need high precision should write through the global ServiceData directly anyway, as the default publish interval for `ThreadCachedServiceData` is 1s.
Reading stats (e.g. via `TimeSeriesExporter::getStatValue`) remains using the clock of second granularity https://fburl.com/code/6boz3i79. All of the precision improvement is coming from the write path, putting values in finer buckets. There is no clear incentive to changing the read clock to millisecond granularity for now.
Reviewed By: ot
Differential Revision: D86692761
fbshipit-source-id: fedf475bfd70eddf2fefd22f4bb3c7a8241aebfa1 parent 84707e1 commit 446326c
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
0 commit comments