Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Performance regression in text-format export on 1.4.0+ #1660

Copy link
Copy link
@jpalharini

Description

@jpalharini
Issue body actions

It seems like the adding of support for UTF-8 characters has considerably increased processing time in the io.prometheus.metrics.expositionformats.PrometheusTextFormatWriter.writeNameAndLabels method due to it now calling io.prometheus.metrics.model.snapshots.PrometheusNaming.isValidLegacyMetricName.

I ran a local test with 1000 metrics exported. Average time per export on version 1.3.10 was 0.9-1.1 ms, while on version 1.4.1 I got an average of 2.7-2.9 ms.

I'm not sure which avenues make sense to avoid this regression and I'm not sure how relevant it is. I just found this while evaluating a move from the old simpleclient to the new client-java and that drew my attention, as the text format export is now slower than in simpleclient.

I have attached the flamegraph I captured on both versions.

flamegraph-v141.html
flamegraph-v1310.html

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.