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

use more efficient wire serialization #141

Merged
merged 2 commits into from
Sep 21, 2020
Merged

use more efficient wire serialization #141

merged 2 commits into from
Sep 21, 2020

Conversation

ianwilkes
Copy link
Contributor

Switch to msgpack for internal (peer to peer and upstream) communication.

Switch to jsoniter for batch event unmarshal, which is notably faster than stock json.

The perf win here is pretty clear, and this benchmark doesn't capture the gains from encoding upstream traffic with msgpack, since libhoney's Writer transmission always uses json.

benchmark                              old ns/op     new ns/op     delta
BenchmarkDistributedTraces/batch-8     25991         17567         -32.41%

benchmark                              old allocs     new allocs     delta
BenchmarkDistributedTraces/batch-8     296            226            -23.65%

benchmark                              old bytes     new bytes     delta
BenchmarkDistributedTraces/batch-8     23634         19938         -15.64%

@ianwilkes ianwilkes requested review from a team, martin308 and asdvalenzuela September 17, 2020 17:18
Copy link
Member

@martin308 martin308 left a comment

Choose a reason for hiding this comment

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

Nice!

@ianwilkes ianwilkes merged commit 43b4fe6 into main Sep 21, 2020
@ianwilkes ianwilkes deleted the ian.perf branch September 21, 2020 16:33
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.

3 participants