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

discovery: add metrics + send updates from one goroutine only #4667

Merged

Conversation

Projects
None yet
3 participants
@simonpasquier
Copy link
Member

simonpasquier commented Sep 27, 2018

The added metrics are:

  • prometheus_sd_discovered_targets
  • prometheus_sd_received_updates_total
  • prometheus_sd_updates_delayed_total
  • prometheus_sd_updates_total

cc @krasi-georgiev

discovery: add metrics + send updates from one goroutine only
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 <spasquie@redhat.com>

@simonpasquier simonpasquier requested review from krasi-georgiev and removed request for krasi-georgiev Sep 27, 2018

@krasi-georgiev
Copy link
Member

krasi-georgiev left a comment

LGTM with just few rename suggestions

thanks for simplifying!

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{}

This comment has been minimized.

Copy link
@krasi-georgiev

krasi-georgiev Sep 27, 2018

Member

how about triggerSend

}
}

func (m *Manager) sendUpdates() {

This comment has been minimized.

Copy link
@krasi-georgiev

krasi-georgiev Sep 27, 2018

Member

how about just sender() ?

Address Krasi comments
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Sep 28, 2018

@simonpasquier

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Sep 28, 2018

/benchmark

@prombot prombot added the benchmark label Sep 28, 2018

@prombot

This comment has been minimized.

Copy link

prombot commented Sep 28, 2018

@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:

/benchmark

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.

@simonpasquier

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Oct 1, 2018

/benchmark cancel

@prombot prombot removed the benchmark label Oct 1, 2018

@simonpasquier

This comment has been minimized.

Copy link
Member Author

simonpasquier commented Oct 1, 2018

The benchmark doesn't show significant differences on resource usage before and after this PR but if master had the prometheus_sd_updates_total metric, we would probably have seen a decrease of the metric's value with the PR.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Oct 1, 2018

even if it doesn't improve performance it is easier to read so I think it still an improvement.

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Oct 4, 2018

LGTM

@simonpasquier simonpasquier merged commit f033f48 into prometheus:master Oct 4, 2018

5 checks passed

cancel-benchmark Job succeeded.
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
start-benchmark Job succeeded.
Details

@simonpasquier simonpasquier deleted the simonpasquier:add-discovery-metrics branch Oct 4, 2018

@krasi-georgiev

This comment has been minimized.

Copy link
Member

krasi-georgiev commented Oct 11, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.