Commit 0aa152b
Fix double-sampling in event tracking
Summary:
`CacheAllocator::recordEvent()` and `BlockCache::recordEvent()` both call `eventTracker->sampleKey()` to gate entry, then call `eventTracker->record()` which internally calls `sampleKey()` again.
Fix by switching both call sites from `record()` to `recordWithoutSampling()`, since `sampleKey()` is already called by the caller. This matches the documented pattern in `EventTracker.h`: "If you want one sample call per event then consider using sampleKey + recordWithoutSampling."
Reviewed By: rlyerly
Differential Revision: D100871776
fbshipit-source-id: 3386c0b30de692a7ae3d2cf3bcd36016a26ab47d1 parent 014e95d commit 0aa152b
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1865 | 1865 | | |
1866 | 1866 | | |
1867 | 1867 | | |
1868 | | - | |
| 1868 | + | |
1869 | 1869 | | |
1870 | 1870 | | |
1871 | 1871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
| 1035 | + | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
| |||
0 commit comments