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

Enable the multiline flag in line splitter regex by default #96

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

camdencheek
Copy link
Contributor

Description of Changes

Enabling this flag lets us use the line start and end anchors in our multiline regexes by prepending the patterns with (?m) by default. This limitation has made it so we can't parse logs correctly in the past (situations where the line start pattern also appears inside the log). Also includes a little bit of code hygiene

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Add a changelog entry (for non-trivial bug fixes / features)
  • CI passes

@djaglowski
Copy link
Member

Log Files Logs / Second CPU Avg (%) CPU Avg Δ (%) Memory Avg (MB) Memory Avg Δ (MB)
1 1000 3.500133 +0.43112993 31.501347 -2.4058456
1 5000 7.982934 -0.36209488 39.73626 -5.580147
1 10000 13.603685 +0.15510559 54.469963 -0.15193939
1 50000 62.604374 -0.0519104 183.29015 -6.3965454
1 100000 124.04214 +3.7212296 292.41446 -0.7669678
10 100 5.0173883 -0.3448081 30.746632 -1.6877708
10 500 11.1726885 +0.10339737 40.647224 -1.6096458
10 1000 17.741724 +1.6552391 53.94922 -0.11530304
10 5000 69.2255 +1.5334549 179.89804 -0.52882385
10 10000 131.16866 -2.8150024 284.55994 -23.778015

@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #96 into master will decrease coverage by 0.11%.
The diff coverage is 63.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
- Coverage   73.29%   73.18%   -0.11%     
==========================================
  Files          70       70              
  Lines        4245     4243       -2     
==========================================
- Hits         3111     3105       -6     
- Misses        863      868       +5     
+ Partials      271      270       -1     
Impacted Files Coverage Δ
operator/builtin/input/file/file.go 77.99% <63.16%> (-0.76%) ⬇️
operator/builtin/input/file/read_to_end.go 59.70% <0.00%> (-2.99%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a0c521...aeedfde. Read the comment docs.

@camdencheek camdencheek merged commit b6241b8 into master Aug 19, 2020
@camdencheek camdencheek deleted the file-input-multiline-anchors branch August 19, 2020 15:37
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.

3 participants