aptly-dev / aptly

aptly - Debian repository management tool
https://www.aptly.info/
MIT License
2.54k stars 369 forks source link

Improve test output regexes for better perf and Go 1.20 support #1220

Closed refi64 closed 9 months ago

refi64 commented 9 months ago

From the first commit:

The current regex runs in exponential time, which massively impacts the
runtime of the test suite, taking several seconds (~4s on my system)
just to perform a single match. By replacing the mix of re.findall + the
initial capture group with re.search + some string slicing, the time
spent matching the regex becomes nearly instant, e.g.:

    $ make system-test TESTS='Config*'

goes from taking ~10s to ~1.5s.

Checklist

codecov[bot] commented 9 months ago

Codecov Report

Merging #1220 (88f1409) into master (18203c6) will increase coverage by 0.01%. Report is 5 commits behind head on master. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1220      +/-   ##
==========================================
+ Coverage   65.95%   65.96%   +0.01%     
==========================================
  Files         143      143              
  Lines       16192    16188       -4     
==========================================
  Hits        10679    10679              
+ Misses       4760     4756       -4     
  Partials      753      753              

see 2 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

reglim commented 9 months ago

LGTM, @randombenj what do you think?

Also, would you mind adding your name to the AUTHOR file?

refi64 commented 9 months ago

@reglim added!