-
Notifications
You must be signed in to change notification settings - Fork 126
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 stats for find and render requests #482
Conversation
…eshUsage execution find_hit metrics is sent and flushed
…and write it to Trie index node. We flush metrics periodicly in refreshUsage function
carbonserver/render.go
Outdated
@@ -5,6 +5,9 @@ import ( | |||
"context" | |||
"encoding/json" | |||
"fmt" | |||
|
|||
"github.com/go-graphite/go-whisper" |
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.
nit-picking: probably better move it down bellow the std libraries.
carbonserver/trie.go
Outdated
atomic.AddInt64(&meta.readHits, 1) | ||
} | ||
} | ||
func (tn *trieNode) incrementFindBytesMetric(bytesNumber int64) { |
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.
nit-picking: incrementRenderBytesMetric
might be better as only /render/
api call return metric data.
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.
left 2 more nit-pickings, not a blocker. approved! 👍
Now each /find produces read_hits metrics and each /render request produce read_hits, read_bytes. During refreshUsage execution these metrics are sent and flushed.