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

btrfs_stats.py: Precompiled regular expressions improve performance #210

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

wangqingfree
Copy link
Contributor

Performance Improvement: The regular expression DEVICE_PATTERN is precompiled and stored as a function-level variable, ensuring it doesn't need to be recompiled for each iteration in the loop

wangqing added 2 commits April 18, 2024 16:47
Signed-off-by: wangqing <wangqing@uniontech.com>
Signed-off-by: wangqing <wangqing@uniontech.com>
btrfs_stats.py Outdated Show resolved Hide resolved
Signed-off-by: wangqing <wangqing@uniontech.com>
@dswarbrick dswarbrick merged commit bfc8aa9 into prometheus-community:master Apr 23, 2024
4 checks passed
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.

None yet

2 participants