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

[chore] Run BenchmarkReadExistingLogs at higher scale #38134

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

Conversation

djaglowski
Copy link
Member

@djaglowski djaglowski commented Feb 24, 2025

This PR has the BenchmarkReadExistingLogs benchmark run at each order of magnitude, up to 100,000 lines per file.

go test -benchmem -run=^$ -bench ^BenchmarkReadExistingLogs$ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file -race -v -count=1

goos: darwin
goarch: arm64
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file
cpu: Apple M4 Pro
BenchmarkReadExistingLogs
BenchmarkReadExistingLogs/1-lines
BenchmarkReadExistingLogs/1-lines-14         	    3182	    384916 ns/op	  126458 B/op	     215 allocs/op
BenchmarkReadExistingLogs/10-lines
BenchmarkReadExistingLogs/10-lines-14        	    2709	    458240 ns/op	  141818 B/op	     280 allocs/op
BenchmarkReadExistingLogs/100-lines
BenchmarkReadExistingLogs/100-lines-14       	    1015	   1077129 ns/op	  284335 B/op	     906 allocs/op
BenchmarkReadExistingLogs/1000-lines
BenchmarkReadExistingLogs/1000-lines-14      	     165	   7215992 ns/op	 1733706 B/op	    7208 allocs/op
BenchmarkReadExistingLogs/10000-lines
BenchmarkReadExistingLogs/10000-lines-14     	      16	  68408219 ns/op	16194153 B/op	   70187 allocs/op
BenchmarkReadExistingLogs/100000-lines
BenchmarkReadExistingLogs/100000-lines-14    	       2	 684563562 ns/op	160923128 B/op	  700202 allocs/op
PASS
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file	19.951s

@djaglowski djaglowski force-pushed the fileinput-bench-higher branch from da1fa5b to 9c61dfe Compare February 24, 2025 15:35
@djaglowski djaglowski marked this pull request as ready for review February 24, 2025 16:51
@djaglowski djaglowski requested a review from a team as a code owner February 24, 2025 16:51
@djaglowski djaglowski requested a review from dehaansa February 24, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants