Add option to round up CPU quota#79
Conversation
35683e6 to
f5ff8d2
Compare
|
I just noticed there's a similar PR. This one's also related to the comments in #68 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #79 +/- ##
==========================================
+ Coverage 93.19% 93.96% +0.77%
==========================================
Files 9 10 +1
Lines 338 348 +10
==========================================
+ Hits 315 327 +12
+ Misses 19 16 -3
- Partials 4 5 +1 ☔ View full report in Codecov by Sentry. |
16897d2 to
57c88e3
Compare
|
Added a few tests for the new lines in runtime. I don't have linux so I couldn't run them on my local. I'll have to wait for the checks here 👀 |
|
I finally set up a linux machine to run those tests! I also changed the implementation to take a round function in the option instead of setting the operation with a const value. I felt it was simpler to use and maintain. |
r-hang
left a comment
There was a problem hiding this comment.
looks good to me.
Does it make sense to test the round == nil case within internal/runtime since that's newly added?
Signed-off-by: Walther Lee <walthere.lee@gmail.com>
|
@r-hang Sure! Added a test to check that the value is rounded down then the round arg is nil |
Add a
RoundQuotaFuncoption to control how the CPU quota should be rounded. The default is still rounding down (floor).This is related to issue #78