-
Notifications
You must be signed in to change notification settings - Fork 100
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
Create Base Stat Monitor class to help creating custom monitors #325
Conversation
Codecov Report
@@ Coverage Diff @@
## master #325 +/- ##
==========================================
+ Coverage 73.54% 73.92% +0.37%
==========================================
Files 68 68
Lines 2967 2991 +24
Branches 335 451 +116
==========================================
+ Hits 2182 2211 +29
+ Misses 723 718 -5
Partials 62 62
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.
LGTM overall. I have a suggestion on how to make it a little clearer from a user perspective but it is still fine as is!
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.
LGTM :)
Added the missing docs. This PR is now ready for real review and when approved, to be merged :-) |
aa92777
to
dac6ebb
Compare
LGTM |
Solves #321
This PR includes a easier way to create custom monitors based on simple comparisons between a job stat and a threshold. We are talking usually about numerical values, but for EQUAL and NOTEQUAL, this can be strings as well.
A monitor that checks if a stat called
test_stat
is greater than or equal to a value defined in a project setting calledTEST_STAT_THRESHOLD
can be defined as follows:The threshold value can also be defined by a method, so we are able to create more complex rules to define what the threshold should be. Some ideas that can be accomplished using that method:
We still need to add the docs for this new feature and rewrite most of the built-in monitors to use this new structure.