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

move multiline handling from file input to helper package #319

Merged
merged 4 commits into from
Jun 1, 2021

Conversation

jsirianni
Copy link
Member

@jsirianni jsirianni commented May 25, 2021

Description of Changes

Before adding multiline support to TCP / UDP input, we need to pull multiline handling out of file input and into helper. This was already implemented in Open Telemetry: open-telemetry/opentelemetry-log-collection#125

  • The public interface (input params) are the same, and should not break existing configurations
  • This PR also adds test data for file input.
  • Tested multiline behavior and it appears to behave the same as master branch

TCP and UDP multiline support will come after this PR is merged.

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

…ltiline to be used by other operators such as tcp and udp input
@djaglowski
Copy link
Member

Log Files Logs / Second CPU Avg (%) CPU Avg Δ (%) Memory Avg (MB) Memory Avg Δ (MB)
1 1000 1.3965582 +0.120655656 127.88066 -0.74568176
1 5000 4.810407 +0.22416782 137.65207 +2.1371155
1 10000 9.793234 -0.034589767 144.12311 +0.15206909
1 50000 47.913868 -1.224453 172.28691 -2.131195
1 100000 97.34235 +2.0480347 235.52196 -4.50148
10 100 1.6380061 -0.12063444 132.55038 -1.4870605
10 500 5.827646 -0.91397285 139.96214 +0.9000397
10 1000 10.620724 -0.03459263 146.24637 -2.2285767
10 5000 52.300335 -1.3560181 180.48747 +6.2188873
10 10000 106.32825 +4.161766 230.533 +12.661377

…nza. Remove map structure tests as they are not implemented yet.
@djaglowski
Copy link
Member

Log Files Logs / Second CPU Avg (%) CPU Avg Δ (%) Memory Avg (MB) Memory Avg Δ (MB)
1 1000 1.4655461 +0.18964362 129.29257 +0.66622925
1 5000 5.327698 +0.7414589 137.28825 +1.7733002
1 10000 9.793391 -0.03443241 146.1937 +2.2226562
1 50000 49.512367 +0.37404633 178.17148 +3.7533722
1 100000 90.79407 -4.500244 228.26091 -11.762527
10 100 1.793089 +0.034448504 134.91743 +0.8799896
10 500 5.8621264 -0.8794923 138.62918 -0.43292236
10 1000 11.948475 +1.2931585 148.1832 -0.29174805
10 5000 55.45649 +1.8001366 177.3168 +3.0482178
10 10000 106.58609 +4.419609 227.07475 +9.203125

@djaglowski
Copy link
Member

Log Files Logs / Second CPU Avg (%) CPU Avg Δ (%) Memory Avg (MB) Memory Avg Δ (MB)
1 1000 1.3276224 +0.051719904 129.84294 +1.2165985
1 5000 4.5862193 -2.002716e-05 137.37433 +1.859375
1 10000 9.6036 -0.22422409 146.79445 +2.82341
1 50000 50.15443 +1.0161095 176.19571 +1.7776031
1 100000 90.44812 -4.8461914 234.25108 -5.772354
10 100 1.7414056 -0.017234921 133.6743 -0.36314392
10 500 6.206903 -0.53471565 140.7512 +1.6891022
10 1000 10.707217 +0.051900864 144.3226 -4.1523438
10 5000 57.25976 +3.6034088 178.14116 +3.8725739
10 10000 104.77508 +2.6085968 223.46376 +5.5921326

@codecov
Copy link

codecov bot commented May 26, 2021

Codecov Report

Merging #319 (ff98aa9) into master (34a85da) will decrease coverage by 0.05%.
The diff coverage is 68.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
- Coverage   70.09%   70.04%   -0.05%     
==========================================
  Files         119      121       +2     
  Lines        6330     6369      +39     
==========================================
+ Hits         4437     4461      +24     
- Misses       1422     1443      +21     
+ Partials      471      465       -6     
Impacted Files Coverage Δ
operator/builtin/input/file/file.go 75.86% <ø> (+2.07%) ⬆️
operator/helper/encoding.go 53.85% <53.85%> (ø)
operator/helper/multiline.go 80.77% <62.07%> (ø)
operator/builtin/input/file/config.go 78.12% <100.00%> (-2.52%) ⬇️
operator/builtin/input/file/reader.go 67.86% <100.00%> (ø)
operator/helper/operatortest/operatortest.go 100.00% <100.00%> (ø)
operator/builtin/output/otlp/otlp.go 61.73% <0.00%> (-3.70%) ⬇️
operator/builtin/output/forward/forward.go 55.07% <0.00%> (-1.45%) ⬇️
... and 2 more

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 34a85da...ff98aa9. Read the comment docs.

@djaglowski
Copy link
Member

Log Files Logs / Second CPU Avg (%) CPU Avg Δ (%) Memory Avg (MB) Memory Avg Δ (MB)
1 1000 1.431056 +1.9550323e-05 127.299706 -0.25862122
1 5000 5.0689917 +0.051639557 135.37392 -2.1064148
1 10000 9.81047 +0.51739407 142.99205 -2.3133087
1 50000 47.25964 -3.7589684 178.29579 -1.5126648
1 100000 99.82889 +8.500259 226.61638 -0.6441345
10 100 1.7931266 -0.12071848 134.90019 +3.1914062
10 500 5.8793793 -0.017116547 139.6452 +0.020339966
10 1000 11.844902 +0.15513134 146.40921 -1.7320862
10 5000 50.99617 -4.918644 177.29593 -1.744339
10 10000 105.118645 +6.971611 221.59496 +0.94369507

@jsirianni jsirianni requested a review from djaglowski May 26, 2021 23:28
@jsirianni jsirianni merged commit 02ea8fd into master Jun 1, 2021
@jsirianni jsirianni deleted the move-multiline-to-helper branch June 1, 2021 21:13
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.

2 participants