+194
−0
+276
−0
Loading
4101: 1571422: Implement memory distribution metric r=mdboom a=mdboom This adds a new memory distribution metric, which uses the identical functional bucketing from the timing distribution metric, except the units for conversion are different and it has a different maximum (1TB). In addition to the obvious additions, there is some refactoring going on here: - The distribution data classes from timing dist. and custom dist. were moved to their own package and renamed `FunctionalHistogram` and `PrecomputedHistogram` respectively, so that they could be shared between different metric types. This prompted some moving around of tests. - It was discovered that these classes stored the name and category of the metric, but they really don't need to. All we need is a way to round-trip the bucket positions, values and sum. - `HistogramBase` was renamed to `HistogramMetricBase`, since it's not the base of these new histogram data classes, but of metrics that use a histogram. --- <!- Text above this line will be added to the commit once "bors" merges this PR --> ### Pull Request checklist <!-- Before submitting the PR, please address each item --> - [ ] **Quality**: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended) - [ ] **Tests**: This PR includes thorough tests or an explanation of why it does not - [ ] **Changelog**: This PR includes [a changelog entry](https://github.com/mozilla-mobile/android-components/blob/master/docs/changelog.md) or does not need one - [ ] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features ### After merge - [ ] **Milestone**: Make sure issues closed by this pull request are added to the [milestone](https://github.com/mozilla-mobile/android-components/milestones) of the version currently in development. - [ ] **Breaking Changes**: If this is a breaking change, please push a draft PR on [Reference Browser](https://github.com/mozilla-mobile/reference-browser ) to address the breaking issues. Co-authored-by:Michael Droettboom <mdboom@gmail.com>