-
Notifications
You must be signed in to change notification settings - Fork 9k
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
discovery: add metrics + send updates from one goroutine only #4667
discovery: add metrics + send updates from one goroutine only #4667
Conversation
The added metrics are: * prometheus_sd_discovered_targets * prometheus_sd_received_updates_total * prometheus_sd_updates_delayed_total * prometheus_sd_updates_total Signed-off-by: Simon Pasquier <[email protected]>
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 with just few rename suggestions
thanks for simplifying!
discovery/manager.go
Outdated
syncCh chan map[string][]*targetgroup.Group | ||
|
||
// How long to wait before sending updates to the channel. The variable | ||
// should only be modified in unit tests. | ||
updatert time.Duration | ||
|
||
// The trigger channel signals to the manager that new updates have been received from providers. | ||
trigger chan struct{} |
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.
how about triggerSend
discovery/manager.go
Outdated
} | ||
} | ||
|
||
func (m *Manager) sendUpdates() { |
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.
how about just sender()
?
Signed-off-by: Simon Pasquier <[email protected]>
@krasi-georgiev done! |
/benchmark |
@simonpasquier: Welcome to Prometheus Benchmarking Tool. The two prometheus versions that will be compared are pr-4667 and master The logs can be viewed at the links provided in the GitHub check blocks at the end of this conversation After successfull deployment, the benchmarking metrics can be viewed at :
To stop the benchmark process comment /benchmark cancel . In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/benchmark cancel |
The benchmark doesn't show significant differences on resource usage before and after this PR but if master had the |
even if it doesn't improve performance it is easier to read so I think it still an improvement. |
LGTM |
don't forget to squash on merge as otherwise we end up with non build-able commits. the merge button has a drop-down so you can select it by default. |
The added metrics are:
cc @krasi-georgiev