Skip to content

feat: use map instead of slice in metrics aggregator #11815

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

Merged
merged 7 commits into from
Jan 29, 2024
Merged

feat: use map instead of slice in metrics aggregator #11815

merged 7 commits into from
Jan 29, 2024

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Jan 25, 2024

Related: #11775

This PR modifies the internals of MetricsAggregator:

  • increase the size of updateCh to 4096.
  • use map instead of slice to keep track of metrics
  • add gauge to expose the size of store as Prometheus metric.

@mtojek mtojek self-assigned this Jan 25, 2024
@mtojek mtojek marked this pull request as ready for review January 25, 2024 11:12
@mtojek mtojek changed the title feat: use map instead slice in metrics aggregator feat: use map instead of slice in metrics aggregator Jan 25, 2024
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Nice refactor! A few suggestions but otherwise LGTM.

Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

LGTM!

@mtojek mtojek requested a review from spikecurtis January 26, 2024 09:44
@mtojek mtojek merged commit aacb4a2 into main Jan 29, 2024
@mtojek mtojek deleted the 11775-cpu branch January 29, 2024 08:12
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants