项目作者: bmf-san

项目描述 :
This is a repository for benchmark tests for goblin.
高级语言: Go
项目地址: git://github.com/bmf-san/goblin-benchmark-tests.git
创建时间: 2021-05-11T16:12:38Z
项目社区:https://github.com/bmf-san/goblin-benchmark-tests

开源协议:MIT License

下载


goblin-benchmark-tests

This is a repository for benchmark tests of goblin.

Benchmark

Environment

key value
version 1.0.0
Model Name MacBook Air
Model Identifier MacBookAir8,1
Processor Name Dual-Core Intel Core i5
Processor Speed 1.6 GHz
Number of Processors 1
Total Number of Cores 2
Memory 16 GB

Test targets

Run a total of 203 static routes of GithubAPI.

How to run

  1. cd benchmark
  2. go test -bench . -benchmem

Results

Date: Wed May 12 00:08:40 JST 2021

  1. GithubAPI Routes: 203
  2. goblin: 96184 Bytes
  3. beego-mux: 108424 Bytes
  4. HttpRouter: 39264 Bytes
  5. httptreemux: 78800 Bytes
  6. gin: 59824 Bytes
  7. chi: 71624 Bytes
  8. goos: darwin
  9. goarch: amd64
  10. pkg: github.com/bmf-san/goblin/benchmark
  11. cpu: Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
  12. BenchmarkGoblin-4 675 1555694 ns/op 1069449 B/op 3455 allocs/op
  13. BenchmarkBeegoMux-4 703 1894363 ns/op 1147723 B/op 3475 allocs/op
  14. BenchmarkHttpRouter-4 676 1491278 ns/op 1024065 B/op 2603 allocs/op
  15. BenchmarkHttpTreeMux-4 661 1514271 ns/op 1076138 B/op 3108 allocs/op
  16. BenchmarkGin-4 808 1426821 ns/op 1010568 B/op 2438 allocs/op
  17. BenchmarkChi-4 775 2088961 ns/op 1101483 B/op 3047 allocs/op
  18. BenchmarkGoblinRequests-4 30 40026919 ns/op 899394 B/op 11230 allocs/op
  19. BenchmarkBeegoMuxRequests-4 27 38580942 ns/op 978540 B/op 11255 allocs/op
  20. BenchmarkHttpRouterRequests-4 49 31815059 ns/op 852927 B/op 10373 allocs/op
  21. BenchmarkHttpTreeMuxRequests-4 34 39901722 ns/op 906625 B/op 10897 allocs/op
  22. BenchmarkHttpGinRequests-4 38 28691349 ns/op 839147 B/op 10203 allocs/op
  23. BenchmarkHttpChiRequests-4 43 29239496 ns/op 930259 B/op 10815 allocs/op
  24. PASS
  25. ok github.com/bmf-san/goblin/benchmark 20.365s