-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Reduce complexity in processorhelper obsreport (#10693)
This PR removes the `recordData` method, which I believe is an unhelpful abstraction for reporting internal processor metrics. The drawbacks of the function are minor, but briefly: 1. Recording any metric requires passing in zeros for _all other metrics_. This is cumbersome to extend because any new metric requires updating the call to `recordData` for all metrics. It's also fragile because if we have more than a few metrics it is easy to position the intended metric incorrectly. 2. Every metric describes one data type, which is passed into `recordData` but then just used as a switch to get back to code that is specific to that data type. 3. Every call to `recordData` instantiates N variables, where N is the number of metrics for each data type. All of this seems unnecessary as we can just report each metric in one unambiguous line of code.
- Loading branch information
1 parent
9ef6356
commit 49339e8
Showing
1 changed file
with
16 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters