Skip to content

[cleaner] Improve IPV6 MAC address RE #4004

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pafernanr
Copy link
Contributor


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-4004
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Signed-off-by: Pablo Fernández Rodríguez <[email protected]>
@pmoravec
Copy link
Contributor

pmoravec commented May 7, 2025

I guess we need to stick to some more specific patterns (like dont obfuscate link-local MAC addresses), but I see nice performance gains: running "in each line in each regular file of a sosreport, apply re.match()" benchmark on some example bigger sosreport, I see that:

IPV6_REG_8HEX is improved from 0m19.023s runtime to 0m16.499s runtime

IPV6_REG_4HEX is improved from 0m17.840s to 0m16.545s.

IPV4_REG s improved from 0m19.275sto0m16.506s`.

The times include os.walk and file.read() - just those I/O operations alone take 5 seconds. So the improvement is from 14s to 11.5s (IPV6_REG_8HEX), from 12.8s to 11.5s (IPV6_REG_4HEX) and 14.2s to 11.5s (IPV4_REG).

Those figures are worth of an attempt to simplify the REs.

@arif-ali arif-ali added the Status/Needs Review This issue still needs a review from project members label May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status/Needs Review This issue still needs a review from project members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants