-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add support for calculate new metric translator #644
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
Add support for calculate new metric translator #644
Conversation
Codecov Report
@@ Coverage Diff @@
## master #644 +/- ##
===========================================
+ Coverage 71.09% 86.32% +15.22%
===========================================
Files 14 195 +181
Lines 602 10696 +10094
===========================================
+ Hits 428 9233 +8805
- Misses 150 1131 +981
- Partials 24 332 +308
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Just one suggestion
Since memory.utilization is expected in percents, could you add a |
could you please cover the invalid input to increase the coverage? |
@bogdandrutu @tigrannajaryan can we merge this? |
Certain functions had V2 suffixes where it was necessary to have one. Even without a sufix they have different signature than equally-named old functions and thus the compiler can clearly distinguish between structs which implement the old of V2 interfaces. Removing the suffixes results in cleaner and more readable code. Some type names still have to use V2 suffix for now otherwise the names would conflict with existing old type names. Thanks, Jay for the hint.
Description: Adds a translator so you can divide the value of one int metric with another. It produces a third metric which is a clone of the first metric, but has a float value that is the quotient of the first and second metric. Additionally, this change adds a rule to the default SFx rules that uses the new translator to produce a memory utilization value.
Link to tracking Issue: Not sure if one exists yet in GitHub
Testing: Unit tests were added to test both the divide metric functionality and the SFx rule that uses that functionality.
Documentation: Added inline.