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

perf: add basic benchmark to demonstrate overhead #53

Merged
merged 1 commit into from
Jul 7, 2024

Conversation

abraithwaite
Copy link
Member

Not a scientific benchmark, but this sends 1MM events through a source and destination to demonstrate the low overhead of the framework.

No serialization is done in the benchmark, so achieving these results in real world applications is unlikely if not impossible.

The results are that the source + destination combo processes sent and received events at a rate of 1MM/478ms or about 2MM events/s.

goos: darwin
goarch: arm64
pkg: github.com/runreveal/kawa/test
BenchmarkMem-10     3    479789639 ns/op
BenchmarkMem-10     3    470265097 ns/op
BenchmarkMem-10     3    468312402 ns/op
BenchmarkMem-10     3    441723403 ns/op
BenchmarkMem-10     3    478304306 ns/op
BenchmarkMem-10     3    481978250 ns/op
BenchmarkMem-10     3    464515333 ns/op
BenchmarkMem-10     3    478364931 ns/op
BenchmarkMem-10     3    478826166 ns/op
BenchmarkMem-10     3    483086972 ns/op
PASS
ok      github.com/runreveal/kawa/test  28.571s

16:59:43 $ benchstat ./bench.txt
goos: darwin
goarch: arm64
pkg: github.com/runreveal/kawa/test
       │ ./bench.txt │
       │   sec/op    │
Mem-10   478.3m ± 3%

Not a scientific benchmark, but this sends 1MM events through a source
and destination to demonstrate the low overhead of the framework.

No serialization is done in the benchmark, so achieving these results in
real world applications is unlikely if not impossible.

The results are that the source + destination combo processes sent and
received events at a rate of 1MM/478ms or about 2MM events/s.

    goos: darwin
    goarch: arm64
    pkg: github.com/runreveal/kawa/test
    BenchmarkMem-10     3    479789639 ns/op
    BenchmarkMem-10     3    470265097 ns/op
    BenchmarkMem-10     3    468312402 ns/op
    BenchmarkMem-10     3    441723403 ns/op
    BenchmarkMem-10     3    478304306 ns/op
    BenchmarkMem-10     3    481978250 ns/op
    BenchmarkMem-10     3    464515333 ns/op
    BenchmarkMem-10     3    478364931 ns/op
    BenchmarkMem-10     3    478826166 ns/op
    BenchmarkMem-10     3    483086972 ns/op
    PASS
    ok      github.com/runreveal/kawa/test  28.571s

    16:59:43 $ benchstat ./bench.txt
    goos: darwin
    goarch: arm64
    pkg: github.com/runreveal/kawa/test
           │ ./bench.txt │
           │   sec/op    │
    Mem-10   478.3m ± 3%
@abraithwaite abraithwaite merged commit f6ee4a5 into main Jul 7, 2024
1 check passed
@abraithwaite abraithwaite deleted the alan/basic-bench branch July 7, 2024 01:08
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.

None yet

1 participant