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

fix syslog parser test case #240

Merged
merged 1 commit into from
Jan 5, 2021
Merged

fix syslog parser test case #240

merged 1 commit into from
Jan 5, 2021

Conversation

jsirianni
Copy link
Member

Description of Changes

Updated the syslog parser test case TestSyslogParser time function.

Error before

--- FAIL: TestSyslogParser (0.04s)
    --- FAIL: TestSyslogParser/RFC3164 (0.01s)
        syslog_test.go:149:
            	Error Trace:	syslog_test.go:149
            	Error:      	Not equal:
            	            	expected: time.Time{wall:0x0, ext:63714407400, loc:(*time.Location)(nil)}
            	            	actual  : time.Time{wall:0x0, ext:63746029800, loc:(*time.Location)(nil)}

            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -2,3 +2,3 @@
            	            	  wall: (uint64) 0,
            	            	- ext: (int64) 63714407400,
            	            	+ ext: (int64) 63746029800,
            	            	  loc: (*time.Location)(<nil>)
            	Test:       	TestSyslogParser/RFC3164
    --- FAIL: TestSyslogParser/RFC3164Bytes (0.01s)
        syslog_test.go:149:
            	Error Trace:	syslog_test.go:149
            	Error:      	Not equal:
            	            	expected: time.Time{wall:0x0, ext:63714407400, loc:(*time.Location)(nil)}
            	            	actual  : time.Time{wall:0x0, ext:63746029800, loc:(*time.Location)(nil)}

            	            	Diff:
            	            	--- Expected
            	            	+++ Actual
            	            	@@ -2,3 +2,3 @@
            	            	  wall: (uint64) 0,
            	            	- ext: (int64) 63714407400,
            	            	+ ext: (int64) 63746029800,
            	            	  loc: (*time.Location)(<nil>)
            	Test:       	TestSyslogParser/RFC3164Bytes
FAIL
coverage: 72.6% of statements in ./...
FAIL	github.com/observiq/stanza/operator/builtin/parser/syslog	0.169s
FAIL
make[1]: *** [for-all] Error 1
make: *** [test-only] Error 2

Tests pass now.

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

@jsirianni jsirianni requested a review from djaglowski January 5, 2021 17:05
@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #240 (131e86b) into master (0a43d10) will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
- Coverage   71.29%   71.20%   -0.09%     
==========================================
  Files         101      101              
  Lines        5542     5542              
==========================================
- Hits         3951     3946       -5     
- Misses       1166     1169       +3     
- Partials      425      427       +2     
Impacted Files Coverage Δ
operator/builtin/output/otlp/otlp.go 62.96% <0.00%> (-2.47%) ⬇️
operator/builtin/input/file/file.go 73.97% <0.00%> (-2.05%) ⬇️

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 0a43d10...131e86b. 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.6034675 -0.05172515 123.92605 -1.8147888
1 5000 5.913896 +0.017064571 133.94087 +2.5982056
1 10000 12.379553 +0.41373062 142.35062 +2.3791656
1 50000 57.960503 -0.5048561 174.69841 -0.7335663
1 100000 117.415436 +0.8674164 232.76144 +2.7241364
10 100 2.2759385 +0.034441233 125.25889 -3.6197433
10 500 6.9829597 +0.34466505 132.68764 -0.6592102
10 1000 13.207129 -0.17252254 140.89844 +0.015625
10 5000 66.09917 +3.4749832 187.8428 +7.4733276
10 10000 123.62278 -2.357376 226.49704 +1.7233276

@jsirianni jsirianni merged commit cb89ebc into master Jan 5, 2021
@jsirianni jsirianni deleted the TestSyslogParser-fix branch January 5, 2021 17:23
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