Skip to content

Instantly share code, notes, and snippets.

@yifan-gu
Last active January 1, 2016 10:29
Show Gist options
  • Save yifan-gu/8131355 to your computer and use it in GitHub Desktop.
Save yifan-gu/8131355 to your computer and use it in GitHub Desktop.
bench for message layer
BenchmarkNoSerializedServer 10 154370813 ns/op
BenchmarkSerializedServer 10 234600748 ns/op
compared with original rpc:
BenchmarkHttpSync 2 591041878 ns/op
BenchmarkHttpAsync 2 595159969 ns/op
BenchmarkTCPSync 2 612891027 ns/op
BenchmarkTCPAsync 2 623569721 ns/op
BenchmarkTcpDummySync 10 163692992 ns/op // this uses dummycodec, no serialization
@yifan-gu
Copy link
Author

raw http&tcp result, just for reference

BenchmarkHTTP 5 478226633 ns/op
BenchmarkTCP 10 134444952 ns/op

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment