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

metrics: use a single slice pool for all metrics tracer #2054

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

marten-seemann
Copy link
Contributor

This PR:

  1. Adds a global string slice pool, to be used by all of our metrics collectors. Using a single pool reduces code duplication and makes the sync.Pool more efficient.
  2. Makes use of this pool for the event bus metrics, bringing down the number of allocs for events from 1 to 0.

cc @sukunrt You can use this for the AutoNAT metrics.

@marten-seemann marten-seemann merged commit 31966fb into master Feb 6, 2023
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