Skip to content

NHCB scrape: refactor state handling and speed up scrape test#15193

Merged
bwplotka merged 3 commits intomainfrom
nhcb-scrape-ct
Oct 22, 2024
Merged

NHCB scrape: refactor state handling and speed up scrape test#15193
bwplotka merged 3 commits intomainfrom
nhcb-scrape-ct

Conversation

@krajorama
Copy link
Member

@krajorama krajorama commented Oct 22, 2024

Follows #14978
Related to #13529
Related to #14008
Spun out of comment #14978 (comment)

Clean up the state handling in the NHCB parser. Use a state field instead of booleans. Make compareLabels read-only and update compared label set where we process the classic histogram really.

Also speed up scrape test based on #14447 .

From comment #14978 (comment)

Also make compareLabels read only and move storeLabels to the first
processed classic histogram series.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Reduce the startup time and timeouts

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks! 💪🏽

@bwplotka bwplotka merged commit aa81210 into main Oct 22, 2024
@bwplotka bwplotka deleted the nhcb-scrape-ct branch October 22, 2024 16:49
KeyOfSpectator added a commit to AliyunContainerService/prometheus that referenced this pull request Oct 23, 2024
* master: (667 commits)
  NHCB scrape: refactor state handling and speed up scrape test (prometheus#15193)
  feat(tools): add debug printouts to rules unit testing (prometheus#15196)
  docs: add keep_firing_for in alerting rules
  api: Add rule group pagination to list rules api (prometheus#14017)
  Update scrape/scrape.go
  benchmark, rename parser omtext_with_nhcb
  goimports run
  Better docstring on test
  Remove omcounterdata.txt as redundant
  Fix failing benchmarks
  Add unit test to show that current wrapper is sub-optimal
  Rename convert_classic_histograms to convert_classic_histograms_to_nhcb
  More followup to prometheus#15164
  Follow up prometheus#15178
  Followup to prometheus#15164
  test(cmd/prometheus): speed up test execution by t.Parallel() when possible
  feat: normalize "le" and "quantile" labels values upon ingestion
  scrape: provide a fallback format (prometheus#15136)
  Disallowing configure AM with the v1 api (prometheus#13883)
  feat: ProtobufParse.formatOpenMetricsFloat: improve float formatting by using strconv.AppendFloat instead of fmt.Sprint
  ...

# Conflicts:
#	go.mod
#	go.sum
julienduchesne pushed a commit to julienduchesne/prometheus that referenced this pull request Dec 13, 2024
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.

2 participants