Skip to content
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

Merged
merged 6 commits into from
Jul 28, 2022
Merged

Conversation

auguzun
Copy link
Contributor

@auguzun auguzun commented Jul 20, 2022

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.

…eshUsage execution find_hit metrics is sent and flushed
carbonserver/trie.go Outdated Show resolved Hide resolved
carbonserver/trie.go Outdated Show resolved Hide resolved
@auguzun auguzun changed the title Add stats for find and render requests (WIP) Add stats for find and render requests Jul 25, 2022
@@ -5,6 +5,9 @@ import (
"context"
"encoding/json"
"fmt"

"github.com/go-graphite/go-whisper"
Copy link
Member

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.

atomic.AddInt64(&meta.readHits, 1)
}
}
func (tn *trieNode) incrementFindBytesMetric(bytesNumber int64) {
Copy link
Member

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.

Copy link
Member

@bom-d-van bom-d-van left a 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! 👍

@auguzun auguzun merged commit ba4f088 into master Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants