scrape/scrape_test.go: reduce the time it takes to reload the manager#14447
Merged
beorn7 merged 3 commits intoprometheus:mainfrom Sep 26, 2024
Merged
Conversation
TestNativeHistogramMaxSchemaSet took over 3x5s to complete because there's a minimum reload interval. I've made the testcases run in parallel and reduced the reload interval to 10ms. Now the test runs in around 0.1-0.2 seconds. Ran test 10000 times to check if it's flaky. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
machine424
reviewed
Jul 10, 2024
scrape/manager.go
Outdated
| func (m *Manager) reloader() { | ||
| reloadIntervalDuration := m.opts.DiscoveryReloadInterval | ||
| if reloadIntervalDuration < model.Duration(5*time.Second) { | ||
| if !m.opts.skipDiscoveryReloadIntervalCheck && reloadIntervalDuration < model.Duration(5*time.Second) { |
Member
There was a problem hiding this comment.
instead of a flag, I'm suggesting to remove this hidden min value https://github.com/prometheus/prometheus/pull/13147/files#r1404481390
Member
|
#13147 is merged now. So this could be updated accordingly, and then we can ship it? |
Member
|
@krajorama should be easy to rebase, are you still up to the task? |
…stogramMaxSchemaSet # Conflicts: # scrape/manager.go # scrape/scrape_test.go
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
julienduchesne
pushed a commit
to julienduchesne/prometheus
that referenced
this pull request
Dec 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestNativeHistogramMaxSchemaSet took over 3x5s to complete because there's a minimum reload interval.
I've made the testcases run in parallel and reduced the reload interval to 10ms. Now the test runs in around 0.1-0.2 seconds.
Ran test 10000 times to check if it's flaky.