Skip to content

Conversation

@ChinYing-Li
Copy link
Contributor

@ChinYing-Li ChinYing-Li commented Dec 1, 2021

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

@ChinYing-Li
Copy link
Contributor Author

Hello,
I just realized that in the glean library (https://github.com/mozilla/glean), there's no unit test for the rate metric. Is this by purpose?

@Dexterp37
Copy link
Contributor

Hello, I just realized that in the glean library (https://github.com/mozilla/glean), there's no unit test for the rate metric. Is this by purpose?

There's a smoke test here and a schema test here. I believe that given the time pressure, no other test was added.

@ChinYing-Li ChinYing-Li marked this pull request as ready for review December 2, 2021 14:17
@auto-assign auto-assign bot requested a review from chutten December 2, 2021 14:17
Remove beforeEach in the test file of rate metric
@ChinYing-Li
Copy link
Contributor Author

The PR is now ready for review; any suggestion is appreciated!

Copy link
Contributor

@chutten chutten left a comment

Choose a reason for hiding this comment

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

This is looking good to me so far. I'll bring in @brizental to make sure I'm not allowing strange patterns in just because I'm unfamiliar with how metric types are implemented in the Glean JS SDK.

@chutten chutten requested a review from brizental December 2, 2021 22:16
Copy link
Contributor

@brizental brizental left a comment

Choose a reason for hiding this comment

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

Hey @ChinYing-Li this is looking really great. I like the way you implemented the metric, very clean.

I left some comments. Implementation looks really good. I would like to have more tests as well.

Once we are done with these changes we will also need to update the docs. Feel free to simply file a follow up for that if you don't want to work on it.

Copy link
Contributor

@brizental brizental left a comment

Choose a reason for hiding this comment

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

Thanks for adding the tests! Not much is missing, left some inline commments and through the tests found a bug in the implementation. Easy to fix though.

Copy link
Contributor

@brizental brizental left a comment

Choose a reason for hiding this comment

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

Some final nits, otherwise, looks god!

Thanks so much for the work here @ChinYing-Li 🎉

@brizental
Copy link
Contributor

Oh, yeah. Also, please add a changelog entry for this.

@brizental brizental merged commit 612c82d into mozilla:main Dec 13, 2021
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.

4 participants