Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1716951 - Implement the Custom Distribution Metric #1516

Merged

Conversation

rosahbruno
Copy link
Contributor

@rosahbruno rosahbruno commented Sep 22, 2022

Implements the Custom Distribution metric.

The documentation for the Glean book is updated in this PR - mozilla/glean#2205

Pull Request checklist

  • Quality: Make sure this PR builds and runs cleanly.
    • Inside the glean/ folder, run:
      • npm run test Runs all tests
      • npm run lint Runs all linters
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry to CHANGELOG.md or an explanation of why it does not need one
  • Documentation: This PR includes documentation changes, an explanation of why it does not need that or a follow-up bug has been filed to do that work

rosahbruno added a commit to rosahbruno/glean.js that referenced this pull request Sep 22, 2022
@rosahbruno rosahbruno changed the title Bug 1716951 - Implement Custom Distribution Metric Bug 1716951 - Implement the Custom Distribution Metric Sep 22, 2022
Changes
- port over custom distribution metric
- port over custom distribution metrics tests
- add construct method to histogram types
For some reason when trying to convert the enum values of "Linear" and
"Exponential" with the first letters capitalized, it was throwing errors.

When the enum values are lowercase, the tests and glean_parser seem
to have an easier time reading those values.
@rosahbruno rosahbruno force-pushed the 1716951-custom-distribution-metric branch from f42b5fb to e12ae3f Compare October 6, 2022 16:34
@rosahbruno rosahbruno marked this pull request as ready for review October 6, 2022 17:05
@auto-assign auto-assign bot requested a review from Dexterp37 October 6, 2022 17:05
By setting the param as HistogramType, we can avoid casting the returned
object from the function as a Histogram. The string we are casting to be
a HistogramType already has validation that ensures it is one of the
values of the enum.
Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only a few nits! Good job.

@rosahbruno
Copy link
Contributor Author

@Dexterp37
All the outstanding references to anything related to memory distributions should be fixed

@rosahbruno rosahbruno requested a review from Dexterp37 October 7, 2022 13:36
Copy link
Contributor

@Dexterp37 Dexterp37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@rosahbruno rosahbruno merged commit 146d990 into mozilla:main Oct 7, 2022
@rosahbruno rosahbruno deleted the 1716951-custom-distribution-metric branch October 7, 2022 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants