-
Notifications
You must be signed in to change notification settings - Fork 185
feat(metrics): return metrics instance from metrics functions #4930
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
feat(metrics): return metrics instance from metrics functions #4930
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
I don't think we need to change all the tests to use this new interface, I would prefer if we kept a mixture to show that both usages are still acceptable. Also, I think we should update one of the e2e tests to use the fluent interface too. |
|
Hi @dothomson, just checking in to see if you need any help with the PR? |
…uid metrics function in the e2e test
|
@svozza - Apologies I got drawn back into the day job. I've reverted some of the tests to provided a mixture of the fluid and verbose versions in the tests and updated some of the e2e tests also. I didn't apply any rubric to which tests use which version - let me know if you'd like to apply one or if this random approach was suitable. I was meaning to ask are you happy with the metric functions selected to return the Generally speaking I wanted to make it easy to define and add and publish metrics, but avoid including "destructive" actions (i.e. |
|
Absolutely no need to apologise! These changes look good. I'm running the end-to-end tests now and the metrics test suites have already passed so we're looking good there. Regarding the selection of methods, I think your reasoning is sound: t would be quite starange to do something like |
|
|
Thank you @dothomson! Merging now. |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



Summary
Changes
This is a Quality of Life improvement when using a metrics instance. By returning the class instance from some of the functions of the Metrics class then commands can be grouped together and improve readability of the code.
#4929
Issue number: closes #4929
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.