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

Performance: Regex in OpenMetricExporter #452

Open
maxboehm opened this issue Sep 21, 2021 · 1 comment
Open

Performance: Regex in OpenMetricExporter #452

maxboehm opened this issue Sep 21, 2021 · 1 comment

Comments

@maxboehm
Copy link

During a load test our prometheus got high response time to collect the metrics.

Investigating into the java stack of our app, I've found that the method OpenMetricsExporter.quoteValue:565 does make use of the method "replaceAll" without a precompiled pattern.

Wouldn't it make sense to precompile the pattern, hold it in a static variable and use the matcher? Not sure, if this is still relevant for the ongoing developments...

grafik

@jmartisk
Copy link
Member

Hi,
while we don't have plans for continued development in SR Metrics 3.x, I don't see why not fix it. We do have a few commits since the last release (3.0.3) anyway, so we could get this in and release a 3.0.4.
If you're up for it, I'd welcome a PR to the 3.0.x branch :)

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

No branches or pull requests

2 participants