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

Microbenchmark for compression #275

Merged
merged 1 commit into from
Jun 11, 2020
Merged

Conversation

merlimat
Copy link
Contributor

Motivation

Added microbenchmark to report compression and decompression speeds.

Current results:

$ go test --bench=. ./pulsar/internal/compression
goos: darwin
goarch: amd64
pkg: github.com/apache/pulsar-client-go/pulsar/internal/compression
BenchmarkCompression/zlib-16 	     177	   6735144 ns/op	  14.94 MB/s
BenchmarkCompression/lz4-16  	    1261	    912741 ns/op	 110.22 MB/s
BenchmarkCompression/zstd-pure-go-fastest-16         	     910	   1246418 ns/op	  80.72 MB/s
BenchmarkCompression/zstd-pure-go-default-16         	     615	   1855754 ns/op	  54.21 MB/s
BenchmarkCompression/zstd-pure-go-best-16            	     364	   2748821 ns/op	  36.60 MB/s
BenchmarkCompression/zstd-cgo-level-fastest-16       	    1908	    633766 ns/op	 158.74 MB/s
BenchmarkCompression/zstd-cgo-level-default-16       	    1227	    978979 ns/op	 102.77 MB/s
BenchmarkCompression/zstd-cgo-level-best-16          	     207	   5735920 ns/op	  17.54 MB/s
BenchmarkDecompression/zlib-16                       	    1064	   1121950 ns/op	  89.67 MB/s
BenchmarkDecompression/lz4-16                        	    3138	    396332 ns/op	 253.84 MB/s
BenchmarkDecompression/zstd-pure-go-fastest-16       	    2042	    577495 ns/op	 174.21 MB/s
BenchmarkDecompression/zstd-pure-go-default-16       	    1965	    601248 ns/op	 167.33 MB/s
BenchmarkDecompression/zstd-pure-go-best-16          	    1984	    589628 ns/op	 170.63 MB/s
BenchmarkDecompression/zstd-cgo-level-fastest-16     	    6478	    206489 ns/op	 487.22 MB/s
BenchmarkDecompression/zstd-cgo-level-default-16     	    5970	    200285 ns/op	 502.31 MB/s
BenchmarkDecompression/zstd-cgo-level-best-16        	    5805	    205224 ns/op	 490.22 MB/s
PASS
ok  	github.com/apache/pulsar-client-go/pulsar/internal/compression	23.447s

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@merlimat merlimat added this to the 0.1.1 milestone Jun 10, 2020
@merlimat merlimat self-assigned this Jun 10, 2020
@wolfstudy
Copy link
Member

wolfstudy commented Jun 11, 2020

@merlimat The changes LGTM, can we add docs to introduction this? Or we can introduce it in README.md

@wolfstudy
Copy link
Member

wolfstudy commented Jun 11, 2020

@merlimat Maybe we can remove the Jenkins from the repo? Do you agree?

Copy link
Member

@wolfstudy wolfstudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@wolfstudy wolfstudy merged commit 4712db1 into apache:master Jun 11, 2020
@merlimat merlimat deleted the compression-bench branch June 19, 2020 06:03
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.

3 participants