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

Leveled event pool #689

Merged
merged 17 commits into from
Dec 10, 2024
Merged

Leveled event pool #689

merged 17 commits into from
Dec 10, 2024

Conversation

vadimalekseev
Copy link
Collaborator

@vadimalekseev vadimalekseev commented Oct 19, 2024

Closes #688

Before (best of 5):

$ export POOL_LOW_MEMORY=false && go test -bench "BenchmarkLightJsonReadPar" -run ^$ ./plugin/input/file

goos: darwin
goarch: arm64
pkg: github.com/ozontech/file.d/plugin/input/file
BenchmarkLightJsonReadPar-8            1        2235307292 ns/op         649.23 MB/s      224088 B/op       2359 allocs/op
--- BENCH: BenchmarkLightJsonReadPar-8
    file_test.go:1187: Memory used: 249MiB

After (best of 5):

$ export POOL_LOW_MEMORY=true && go test -bench "BenchmarkLightJsonReadPar" -run ^$ ./plugin/input/file

goos: darwin
goarch: arm64
pkg: github.com/ozontech/file.d/plugin/input/file
BenchmarkLightJsonReadPar-8            1        1841799875 ns/op         787.94 MB/s     1192072 B/op       2224 allocs/op
--- BENCH: BenchmarkLightJsonReadPar-8
    file_test.go:1150: using low memory pool
    file_test.go:1187: Memory used: 90MiB

@vadimalekseev vadimalekseev force-pushed the 688-sync-pool branch 2 times, most recently from 9d3b24a to f2ad3ff Compare October 19, 2024 16:08
@vadimalekseev vadimalekseev force-pushed the 688-sync-pool branch 4 times, most recently from 382b311 to be8dbc0 Compare October 21, 2024 10:24
@vadimalekseev vadimalekseev changed the title Implement new events pool based on sync.Pool Leveled event pool Dec 10, 2024
@vadimalekseev vadimalekseev merged commit 75710ca into master Dec 10, 2024
8 checks passed
@vadimalekseev vadimalekseev deleted the 688-sync-pool branch December 10, 2024 10:07
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.

Feature: leveled event pool
3 participants