Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awcodify/grpc_vs_rest_benchmark
Simple code to do benchmarking between GRPC Protobuf vs JSON REST HTTP
https://github.com/awcodify/grpc_vs_rest_benchmark
benchmark go golang grpc grpc-go rest-api restful
Last synced: 24 days ago
JSON representation
Simple code to do benchmarking between GRPC Protobuf vs JSON REST HTTP
- Host: GitHub
- URL: https://github.com/awcodify/grpc_vs_rest_benchmark
- Owner: awcodify
- Created: 2019-09-27T08:07:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-27T08:12:38.000Z (over 5 years ago)
- Last Synced: 2024-10-21T22:57:43.688Z (2 months ago)
- Topics: benchmark, go, golang, grpc, grpc-go, rest-api, restful
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Result in mine
```
~/Documents/playground/grpc-rest-benchmark(master ✔) go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: benchmark
BenchmarkGRPC-4 20000 89584 ns/op 9256 B/op 173 allocs/op
BenchmarkREST-4 10000 215445 ns/op 19023 B/op 143 allocs/op
PASS
ok benchmark 7.002s
~/Documents/playground/grpc-rest-benchmark(master ✔) go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: benchmark
BenchmarkGRPC-4 20000 90188 ns/op 9255 B/op 173 allocs/op
BenchmarkREST-4 3000 381953 ns/op 19037 B/op 143 allocs/op
PASS
ok benchmark 5.935s
~/Documents/playground/grpc-rest-benchmark(master ✔) go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: benchmark
BenchmarkGRPC-4 20000 88909 ns/op 9256 B/op 173 allocs/op
BenchmarkREST-4 3000 459965 ns/op 19038 B/op 143 allocs/op
PASS
ok benchmark 6.233s
```