-
Notifications
You must be signed in to change notification settings - Fork 454
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
[query] Add cost enforcer to graphite queries #1449
Conversation
src/query/storage/converter.go
Outdated
|
||
func (e *syncEnforcer) Add(c xcost.Cost) xcost.Report { | ||
e.mu.Lock() | ||
r := e.enforcer.Add(c) |
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.
This shouldn't be necessary, I don't think; the enforcers are designed to be thread safe (through use of atomic variables). If they're not, we should probably fix it at that level instead of adding a wrapper.
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.
Sure, no worries, was probably being a little overcautious here
Codecov Report
@@ Coverage Diff @@
## andrewmains12/cost_accounting #1449 +/- ##
===============================================================
- Coverage 70.9% 70.9% -0.1%
===============================================================
Files 840 840
Lines 71753 71779 +26
===============================================================
+ Hits 50918 50934 +16
- Misses 17506 17521 +15
+ Partials 3329 3324 -5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1449 +/- ##
======================================
Coverage 70.9% 70.9%
======================================
Files 840 840
Lines 71753 71753
======================================
Hits 50917 50917
Misses 17512 17512
Partials 3324 3324
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! Winner of the fastest PR award :)
f4d13bc
to
509bee5
Compare
# Conflicts: # src/query/api/v1/httpd/handler_test.go # src/query/storage/converter.go # src/query/storage/converter_test.go
No description provided.