超全的Go Http路由框架性能比较

时间:2022-10-27 19:21:09

from:http://colobu.com/2016/03/23/Go-HTTP-request-router-and-web-framework-benchmark/

超全的Go Http路由框架性能比较

使用Go开发Web应用非常方便,它自己的路由器default request multiplexer超级简单,但是功能也有限,所幸net/http库的设计非常好,很容易实现自己定义的路由器,所以你如果在github搜一下,会找到很多的第三方的路由库。

但是这些路由库良莠不齐,尤其是早期实现的路由器,有些实现了很差的路由算法,有些没有仔细考虑内存的分配,导致垃圾回收的问题。

Julien Schmidt在实现HttpRouter库的时候将测试代码抽象出一个测试框架,用来测试Go的各种的路由器,测试的库相当的全。这个测试框架放在了github上。

对于架构师和Go Web开发人员来说,这个测试确实是一份值得参考的资料,在选择一款路由框架的时候非常有帮助。

路由是Go Web框架的一个功能,它可以将不同的URL映射到相应的处理方法上。一些库只实现了路由的功能,也有一些库实现了完整的Web框架的特性,如上下文管理,Session的维护,模版的处理,ORM等。本文只比较路由的性能。

这个项目的README并没有列出一部分的测试结果,我在Amazon AWS C3.xlarge机器上做了测试,下面是测试的结果,并整理成图表,分享给大家。

C3:https://aws.amazon.com/cn/ec2/instance-types/

功能:
高频 Intel Xeon E5-2680 v2 (Ivy Bridge) 处理器
对 Enhanced Networking 的支持
支持集群
采用 SSD 的实例存储

型号 vCPU 内存 (GiB) SSD 存储 (GB)
c3.large 2 3.75 2 x 16
c3.xlarge 4 7.5 2 x 40
c3.2xlarge 8 15 2 x 80
c3.4xlarge 16 30 2 x 160
c3.8xlarge 32 60 2 x 320

路由框架

测试的路由框架包括(此处排名不分先后):

Benchmark

测试代码包含了几种测试case,在不同的测试case中,各路由/Web框架的性能可能会有些不同。

静态路由测试

静态路由使用一组定义好的路由测试web框架,不带参数, 一共157个路由。路由定义如下:

12345678
var staticRoutes = []route{{"GET", "/"},{"GET", "/cmd.html"},{"GET", "/code.html"},{"GET", "/contrib.html"},{"GET", "/contribute.html"},{"GET", "/debugging_with_gdb.html"},……

它用来和Go官方的http.ServeMux路由库进行比较。

超全的Go Http路由框架性能比较静态路由Benchmark

纵坐标轴是单次操作所耗费的时间(纳秒),越小越好

可以看到, 即使是官方库 HttpServeMux,也有不错的性能,一些其它的路由框架如GoRestful等居然性能远远低于官方库。

而性能最好的Denco框架,时间花费只有官方库的0.02%。

通过性能的对比,即使是web框架中的路由功能,不同的框架实现性能差别也是天壤之别。选择一款合适的路由库/Web框架,的确是架构师慎重考虑的一件事情。

笔者最初开发 http://uridb.com网站的时候,看到了go-zoo/bone的网站,它列出了几款路由器的比较,显示bone的性能最好,所以笔者就选择了这个框架,很遗憾官方介绍只列出对它有利的几个框架。如果可以重来,看到本文结果的情况下,我会调研更多的框架,选择性能更好的一款路由库。

微测试

这个测试case用来测试路径带有参数的情况,参数作为路径的一部分。
分别测试路径带有1个参数(Param),5个参数(Param5),20个参数(Param20)的情况,并没有往Response写数据。
ParamWrite测试URL中带有一个参数,并且把这个参数值写入到Response中。

各框架的测试代码类似下面的代码:

123456
func BenchmarkAce_Param(b *testing.B) {router := loadAceSingle("GET", "/user/:name", aceHandle)r, _ := http.NewRequest("GET", "/user/gordon", nil)benchRequest(b, router, r)}

测试结果如下:
超全的Go Http路由框架性能比较基本测试

Github API

这个测试模仿Github API, Github API包含203个路由,每个框架都实现了这些API的路由,返回Response为URL。
这个测试用来比较在大量路由情况下框架的表现。 (它还包含一个静态路由测试和一个参数测试,性能和下图差不多,放在一张图中不方便查看,所以这里不列出来了)

超全的Go Http路由框架性能比较Github API Route Benchmark

Google+ API

这个测试case用来测试Google+的13个路由的情况,实际Google+包含的API不止这些。

超全的Go Http路由框架性能比较Google+ API Route Benchmark

Parse API

这个测试case用来测试Parse的API, 包含26个路由的情况,比较各框架的在真实的路由下的性能的情况。

超全的Go Http路由框架性能比较Parse API Route Benchmark

内存占用

即使在同样的路由映射的情况下,各框架的内存占用也是云壤之别。

在各种测试case下,各框架配置好路由的情况下占用的内存情况如下:

超全的Go Http路由框架性能比较内存占用

如果你查看文末完整的测试结果,还可以发现在处理每个请求时,不同的框架会分配不同数量的中间对象,性能好的框架可能是0分配,但是有的框架居然达到了几百次的分配,差距相当的明显。

结论

选择一个框架有很多的理由,比如灵活性、扩展性、API友好程度、文档详细程度、项目活跃度、社区活跃度等,但是性能和内存占用绝对是必须考虑的一个重要方面,虽然我不想列出唯一的一个推荐的路由库,但是在还是建议你在benchmark结果比较好几款路由库中做选择。

其中我看到了几个来自中国的程序员贡献的框架,加油。

完整的测试数据

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
BenchmarkAce_Param                5000000       376 ns/op      32 B/op       1 allocs/opBenchmarkBear_Param               1000000      1464 ns/op     456 B/op       5 allocs/opBenchmarkBeego_Param              1000000      2214 ns/op       0 B/op       0 allocs/opBenchmarkBone_Param               1000000      1440 ns/op     384 B/op       3 allocs/opBenchmarkDenco_Param              5000000       261 ns/op      32 B/op       1 allocs/opBenchmarkEcho_Param              20000000       106 ns/op       0 B/op       0 allocs/opBenchmarkGin_Param               20000000        94.5 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_Param         1000000      2263 ns/op     648 B/op       8 allocs/opBenchmarkGoji_Param               1000000      1060 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_Param             2000000       952 ns/op     176 B/op       5 allocs/opBenchmarkGoJsonRest_Param         1000000      2446 ns/op     649 B/op      13 allocs/opBenchmarkGoRestful_Param           200000     11008 ns/op    2696 B/op      27 allocs/opBenchmarkGorillaMux_Param          500000      4672 ns/op     752 B/op       8 allocs/opBenchmarkHttpRouter_Param        10000000       179 ns/op      32 B/op       1 allocs/opBenchmarkHttpTreeMux_Param        2000000       986 ns/op     352 B/op       3 allocs/opBenchmarkIris_Param                 30000000           51.3 ns/op          0 B/op          0 allocs/opBenchmarkKocha_Param              3000000       453 ns/op      56 B/op       3 allocs/opBenchmarkLARS_Param              20000000        98.2 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_Param            1000000      3713 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_Param             300000      6801 ns/op    1104 B/op      11 allocs/opBenchmarkPat_Param                1000000      2474 ns/op     648 B/op      12 allocs/opBenchmarkPossum_Param             1000000      2440 ns/op     560 B/op       6 allocs/opBenchmarkR2router_Param           1000000      1339 ns/op     432 B/op       5 allocs/opBenchmarkRevel_Param               200000      8200 ns/op    1632 B/op      26 allocs/opBenchmarkRivet_Param              5000000       289 ns/op      48 B/op       1 allocs/opBenchmarkTango_Param              1000000      1681 ns/op     256 B/op       9 allocs/opBenchmarkTigerTonic_Param          500000      4260 ns/op     976 B/op      16 allocs/opBenchmarkTraffic_Param             300000      6945 ns/op    1960 B/op      21 allocs/opBenchmarkVulcan_Param             2000000       925 ns/op      98 B/op       3 allocs/opBenchmarkAce_Param5               2000000       729 ns/op     160 B/op       1 allocs/opBenchmarkBear_Param5              1000000      1968 ns/op     501 B/op       5 allocs/opBenchmarkBeego_Param5              500000      2463 ns/op       0 B/op       0 allocs/opBenchmarkBone_Param5              1000000      1857 ns/op     432 B/op       3 allocs/opBenchmarkDenco_Param5             2000000       730 ns/op     160 B/op       1 allocs/opBenchmarkEcho_Param5             10000000       194 ns/op       0 B/op       0 allocs/opBenchmarkGin_Param5              10000000       170 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_Param5        1000000      3500 ns/op     920 B/op      11 allocs/opBenchmarkGoji_Param5              1000000      1453 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_Param5            1000000      1345 ns/op     240 B/op       5 allocs/opBenchmarkGoJsonRest_Param5         500000      4460 ns/op    1097 B/op      16 allocs/opBenchmarkGoRestful_Param5          100000     12908 ns/op    2872 B/op      27 allocs/opBenchmarkGorillaMux_Param5         300000      6696 ns/op     816 B/op       8 allocs/opBenchmarkHttpRouter_Param5        3000000       531 ns/op     160 B/op       1 allocs/opBenchmarkHttpTreeMux_Param5       1000000      2194 ns/op     576 B/op       6 allocs/opBenchmarkIris_Param5                30000000          51.3 ns/op           0 B/op          0 allocs/opBenchmarkKocha_Param5             1000000      2043 ns/op     440 B/op      10 allocs/opBenchmarkLARS_Param5             10000000       167 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_Param5            500000      4150 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_Param5            200000      8193 ns/op    1232 B/op      11 allocs/opBenchmarkPat_Param5                300000      5593 ns/op     964 B/op      32 allocs/opBenchmarkPossum_Param5            1000000      2470 ns/op     560 B/op       6 allocs/opBenchmarkR2router_Param5          1000000      1700 ns/op     432 B/op       5 allocs/opBenchmarkRevel_Param5              200000      9906 ns/op    1984 B/op      33 allocs/opBenchmarkRivet_Param5             2000000       937 ns/op     240 B/op       1 allocs/opBenchmarkTango_Param5              500000      4129 ns/op     944 B/op      17 allocs/opBenchmarkTigerTonic_Param5         200000     13169 ns/op    2471 B/op      38 allocs/opBenchmarkTraffic_Param5            200000     10445 ns/op    2248 B/op      25 allocs/opBenchmarkVulcan_Param5            1000000      1188 ns/op      98 B/op       3 allocs/opBenchmarkAce_Param20              1000000      1808 ns/op     640 B/op       1 allocs/opBenchmarkBear_Param20              300000      5793 ns/op    1665 B/op       5 allocs/opBenchmarkBeego_Param20             300000      4254 ns/op       0 B/op       0 allocs/opBenchmarkBone_Param20              200000      8633 ns/op    2540 B/op       5 allocs/opBenchmarkDenco_Param20            1000000      2361 ns/op     640 B/op       1 allocs/opBenchmarkEcho_Param20             3000000       510 ns/op       0 B/op       0 allocs/opBenchmarkGin_Param20              5000000       398 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_Param20        200000     11806 ns/op    3796 B/op      15 allocs/opBenchmarkGoji_Param20              500000      4591 ns/op    1246 B/op       2 allocs/opBenchmarkGojiv2_Param20           1000000      2245 ns/op     480 B/op       5 allocs/opBenchmarkGoJsonRest_Param20        100000     15243 ns/op    4485 B/op      20 allocs/opBenchmarkGoRestful_Param20         100000     22360 ns/op    5444 B/op      29 allocs/opBenchmarkGorillaMux_Param20        100000     14276 ns/op    2923 B/op      10 allocs/opBenchmarkHttpRouter_Param20       1000000      1597 ns/op     640 B/op       1 allocs/opBenchmarkHttpTreeMux_Param20       200000     10298 ns/op    3196 B/op      10 allocs/opBenchmarkKocha_Param20             300000      6376 ns/op    1808 B/op      27 allocs/opBenchmarkLARS_Param20             5000000       376 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_Param20           200000     10811 ns/op    2892 B/op      11 allocs/opBenchmarkMartini_Param20           100000     16657 ns/op    3596 B/op      13 allocs/opBenchmarkPat_Param20                50000     26382 ns/op    4687 B/op     111 allocs/opBenchmarkPossum_Param20           1000000      2483 ns/op     560 B/op       6 allocs/opBenchmarkR2router_Param20          200000      7794 ns/op    2284 B/op       7 allocs/opBenchmarkRevel_Param20             100000     20359 ns/op    5510 B/op      52 allocs/opBenchmarkRivet_Param20            1000000      3210 ns/op    1024 B/op       1 allocs/opBenchmarkTango_Param20             100000     22607 ns/op    8224 B/op      47 allocs/opBenchmarkTigerTonic_Param20         30000     50040 ns/op   10344 B/op     118 allocs/opBenchmarkTraffic_Param20            50000     32472 ns/op    7944 B/op      45 allocs/opBenchmarkVulcan_Param20           1000000      1957 ns/op      98 B/op       3 allocs/opBenchmarkAce_ParamWrite           3000000       513 ns/op      40 B/op       2 allocs/opBenchmarkBear_ParamWrite          1000000      1490 ns/op     456 B/op       5 allocs/opBenchmarkBeego_ParamWrite         1000000      2352 ns/op       8 B/op       1 allocs/opBenchmarkBone_ParamWrite          1000000      1547 ns/op     384 B/op       3 allocs/opBenchmarkDenco_ParamWrite         5000000       329 ns/op      32 B/op       1 allocs/opBenchmarkEcho_ParamWrite         10000000       234 ns/op       8 B/op       1 allocs/opBenchmarkGin_ParamWrite          10000000       239 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_ParamWrite    1000000      2456 ns/op     656 B/op       9 allocs/opBenchmarkGoji_ParamWrite          1000000      1177 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_ParamWrite        1000000      1252 ns/op     208 B/op       7 allocs/opBenchmarkGoJsonRest_ParamWrite    1000000      4063 ns/op    1128 B/op      18 allocs/opBenchmarkGoRestful_ParamWrite      200000     11313 ns/op    2704 B/op      28 allocs/opBenchmarkGorillaMux_ParamWrite     500000      5033 ns/op     752 B/op       8 allocs/opBenchmarkHttpRouter_ParamWrite   10000000       242 ns/op      32 B/op       1 allocs/opBenchmarkHttpTreeMux_ParamWrite   1000000      1025 ns/op     352 B/op       3 allocs/opBenchmarkIris_ParamWrite            10000000           165 ns/op           0 B/op          0 allocs/opBenchmarkKocha_ParamWrite         3000000       519 ns/op      56 B/op       3 allocs/opBenchmarkLARS_ParamWrite         10000000       224 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_ParamWrite        500000      4903 ns/op    1144 B/op      13 allocs/opBenchmarkMartini_ParamWrite        200000      8170 ns/op    1208 B/op      15 allocs/opBenchmarkPat_ParamWrite            500000      4148 ns/op    1072 B/op      17 allocs/opBenchmarkPossum_ParamWrite        1000000      2482 ns/op     560 B/op       6 allocs/opBenchmarkR2router_ParamWrite      1000000      1426 ns/op     432 B/op       5 allocs/opBenchmarkRevel_ParamWrite          200000      9772 ns/op    2096 B/op      31 allocs/opBenchmarkRivet_ParamWrite         3000000       595 ns/op     144 B/op       3 allocs/opBenchmarkTango_ParamWrite         2000000       871 ns/op     136 B/op       4 allocs/opBenchmarkTigerTonic_ParamWrite     200000      6642 ns/op    1408 B/op      22 allocs/opBenchmarkTraffic_ParamWrite        200000      8751 ns/op    2384 B/op      25 allocs/opBenchmarkVulcan_ParamWrite        2000000       928 ns/op      98 B/op       3 allocs/opBenchmarkAce_GithubStatic         5000000       242 ns/op       0 B/op       0 allocs/opBenchmarkBear_GithubStatic        2000000       681 ns/op     120 B/op       3 allocs/opBenchmarkBeego_GithubStatic       1000000      2216 ns/op       0 B/op       0 allocs/opBenchmarkBone_GithubStatic         100000     16700 ns/op    2880 B/op      60 allocs/opBenchmarkDenco_GithubStatic      30000000        52.3 ns/op       0 B/op       0 allocs/opBenchmarkEcho_GithubStatic       10000000       126 ns/op       0 B/op       0 allocs/opBenchmarkGin_GithubStatic        10000000       122 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GithubStatic  1000000      1295 ns/op     296 B/op       5 allocs/opBenchmarkGoji_GithubStatic        5000000       302 ns/op       0 B/op       0 allocs/opBenchmarkGojiv2_GithubStatic      2000000       903 ns/op     160 B/op       4 allocs/opBenchmarkGoRestful_GithubStatic     30000     52595 ns/op    3720 B/op      32 allocs/opBenchmarkGoJsonRest_GithubStatic  1000000      1736 ns/op     329 B/op      11 allocs/opBenchmarkGorillaMux_GithubStatic   100000     23750 ns/op     448 B/op       7 allocs/opBenchmarkHttpRouter_GithubStatic 20000000        65.1 ns/op       0 B/op       0 allocs/opBenchmarkHttpTreeMux_GithubStatic20000000        77.8 ns/op       0 B/op       0 allocs/opBenchmarkIris_GithubStatic          30000000            51.3 ns/op         0 B/op          0 allocs/opBenchmarkKocha_GithubStatic      20000000        94.0 ns/op       0 B/op       0 allocs/opBenchmarkLARS_GithubStatic       10000000       122 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GithubStatic     1000000      3143 ns/op     752 B/op       8 allocs/opBenchmarkMartini_GithubStatic      100000     18552 ns/op     784 B/op      10 allocs/opBenchmarkPat_GithubStatic          100000     14052 ns/op    3648 B/op      76 allocs/opBenchmarkPossum_GithubStatic      1000000      1516 ns/op     416 B/op       3 allocs/opBenchmarkR2router_GithubStatic    2000000       748 ns/op     144 B/op       4 allocs/opBenchmarkRevel_GithubStatic        300000      7086 ns/op    1248 B/op      23 allocs/opBenchmarkRivet_GithubStatic      10000000       140 ns/op       0 B/op       0 allocs/opBenchmarkTango_GithubStatic       1000000      1862 ns/op     256 B/op       9 allocs/opBenchmarkTigerTonic_GithubStatic  5000000       392 ns/op      48 B/op       1 allocs/opBenchmarkTraffic_GithubStatic       30000     56251 ns/op   18904 B/op     148 allocs/opBenchmarkVulcan_GithubStatic      1000000      1281 ns/op      98 B/op       3 allocs/opBenchmarkAce_GithubParam          3000000       597 ns/op      96 B/op       1 allocs/opBenchmarkBear_GithubParam         1000000      1768 ns/op     496 B/op       5 allocs/opBenchmarkBeego_GithubParam         500000      2485 ns/op       0 B/op       0 allocs/opBenchmarkBone_GithubParam          300000      7780 ns/op    1456 B/op      16 allocs/opBenchmarkDenco_GithubParam        3000000       601 ns/op     128 B/op       1 allocs/opBenchmarkEcho_GithubParam        10000000       214 ns/op       0 B/op       0 allocs/opBenchmarkGin_GithubParam         10000000       202 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GithubParam   1000000      2656 ns/op     712 B/op       9 allocs/opBenchmarkGoji_GithubParam         1000000      1555 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_GithubParam       1000000      1945 ns/op     256 B/op       7 allocs/opBenchmarkGoJsonRest_GithubParam   1000000      3201 ns/op     713 B/op      14 allocs/opBenchmarkGoRestful_GithubParam      10000    158940 ns/op    3016 B/op      31 allocs/opBenchmarkGorillaMux_GithubParam    100000     13605 ns/op     768 B/op       8 allocs/opBenchmarkHttpRouter_GithubParam   5000000       403 ns/op      96 B/op       1 allocs/opBenchmarkHttpTreeMux_GithubParam  1000000      1373 ns/op     384 B/op       4 allocs/opBenchmarkIris_GithubParam           30000000          51.8 ns/op           0 B/op          0 allocs/opBenchmarkKocha_GithubParam        2000000       968 ns/op     128 B/op       5 allocs/opBenchmarkLARS_GithubParam        10000000       197 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GithubParam      1000000      3782 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_GithubParam       100000     15844 ns/op    1136 B/op      11 allocs/opBenchmarkPat_GithubParam           200000      9531 ns/op    2464 B/op      48 allocs/opBenchmarkPossum_GithubParam       1000000      2370 ns/op     560 B/op       6 allocs/opBenchmarkR2router_GithubParam     1000000      1469 ns/op     432 B/op       5 allocs/opBenchmarkRevel_GithubParam         200000      8602 ns/op    1744 B/op      28 allocs/opBenchmarkRivet_GithubParam        3000000       609 ns/op      96 B/op       1 allocs/opBenchmarkTango_GithubParam        1000000      2710 ns/op     480 B/op      12 allocs/opBenchmarkTigerTonic_GithubParam    300000      6767 ns/op    1408 B/op      22 allocs/opBenchmarkTraffic_GithubParam       100000     23116 ns/op    5992 B/op      52 allocs/opBenchmarkVulcan_GithubParam       1000000      1927 ns/op      98 B/op       3 allocs/opBenchmarkAce_GithubAll              10000    113025 ns/op   13792 B/op     167 allocs/opBenchmarkBear_GithubAll             10000    336857 ns/op   86448 B/op     943 allocs/opBenchmarkBeego_GithubAll             3000    501042 ns/op       0 B/op       0 allocs/opBenchmarkBone_GithubAll               500   2844328 ns/op  548736 B/op    7241 allocs/opBenchmarkDenco_GithubAll            10000    109515 ns/op   20224 B/op     167 allocs/opBenchmarkEcho_GithubAll             30000     49252 ns/op       0 B/op       0 allocs/opBenchmarkGin_GithubAll              30000     43531 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GithubAll        5000    517208 ns/op  131656 B/op    1686 allocs/opBenchmarkGoji_GithubAll              3000    641485 ns/op   56112 B/op     334 allocs/opBenchmarkGojiv2_GithubAll            2000    869630 ns/op  118864 B/op    3103 allocs/opBenchmarkGoJsonRest_GithubAll        3000    611777 ns/op  134371 B/op    2737 allocs/opBenchmarkGoRestful_GithubAll          100  17388700 ns/op  837832 B/op    6913 allocs/opBenchmarkGorillaMux_GithubAll         200   7694609 ns/op  144464 B/op    1588 allocs/opBenchmarkHttpRouter_GithubAll       20000     72241 ns/op   13792 B/op     167 allocs/opBenchmarkHttpTreeMux_GithubAll      10000    240082 ns/op   65856 B/op     671 allocs/opBenchmarkIris_GithubAll               100000         21199 ns/op           0 B/op          0 allocs/opBenchmarkKocha_GithubAll            10000    183300 ns/op   23304 B/op     843 allocs/opBenchmarkLARS_GithubAll             30000     42847 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GithubAll           2000    773393 ns/op  201138 B/op    1803 allocs/opBenchmarkMartini_GithubAll            200   6520353 ns/op  228214 B/op    2483 allocs/opBenchmarkPat_GithubAll                300   4863404 ns/op 1499569 B/op   27435 allocs/opBenchmarkPossum_GithubAll           10000    292668 ns/op   84448 B/op     609 allocs/opBenchmarkR2router_GithubAll         10000    270070 ns/op   77328 B/op     979 allocs/opBenchmarkRevel_GithubAll             1000   1637315 ns/op  337424 B/op    5512 allocs/opBenchmarkRivet_GithubAll            10000    106604 ns/op   16272 B/op     167 allocs/opBenchmarkTango_GithubAll             5000    493225 ns/op   87075 B/op    2267 allocs/opBenchmarkTigerTonic_GithubAll        2000   1179077 ns/op  233680 B/op    5035 allocs/opBenchmarkTraffic_GithubAll            200   9399517 ns/op 2659331 B/op   21848 allocs/opBenchmarkVulcan_GithubAll            5000    314788 ns/op   19894 B/op     609 allocs/opBenchmarkAce_GPlusStatic         10000000       209 ns/op       0 B/op       0 allocs/opBenchmarkBear_GPlusStatic         3000000       480 ns/op     104 B/op       3 allocs/opBenchmarkBeego_GPlusStatic        1000000      2157 ns/op       0 B/op       0 allocs/opBenchmarkBone_GPlusStatic        10000000       235 ns/op      32 B/op       1 allocs/opBenchmarkDenco_GPlusStatic       50000000        34.5 ns/op       0 B/op       0 allocs/opBenchmarkEcho_GPlusStatic        20000000        98.5 ns/op       0 B/op       0 allocs/opBenchmarkGin_GPlusStatic         20000000        92.7 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GPlusStatic   1000000      1039 ns/op     280 B/op       5 allocs/opBenchmarkGoji_GPlusStatic        10000000       220 ns/op       0 B/op       0 allocs/opBenchmarkGojiv2_GPlusStatic       2000000       708 ns/op     160 B/op       4 allocs/opBenchmarkGoJsonRest_GPlusStatic   1000000      1364 ns/op     329 B/op      11 allocs/opBenchmarkGoRestful_GPlusStatic     200000     10222 ns/op    2360 B/op      26 allocs/opBenchmarkGorillaMux_GPlusStatic    500000      3222 ns/op     448 B/op       7 allocs/opBenchmarkHttpRouter_GPlusStatic  50000000        37.3 ns/op       0 B/op       0 allocs/opBenchmarkHttpTreeMux_GPlusStatic 30000000        46.4 ns/op       0 B/op       0 allocs/opBenchmarkIris_GPlusStatic           30000000            51.1 ns/op         0 B/op          0 allocs/opBenchmarkKocha_GPlusStatic       20000000        61.3 ns/op       0 B/op       0 allocs/opBenchmarkLARS_GPlusStatic        20000000        94.9 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GPlusStatic      1000000      2634 ns/op     752 B/op       8 allocs/opBenchmarkMartini_GPlusStatic       300000      5255 ns/op     784 B/op      10 allocs/opBenchmarkPat_GPlusStatic          5000000       397 ns/op      96 B/op       2 allocs/opBenchmarkPossum_GPlusStatic       1000000      1348 ns/op     416 B/op       3 allocs/opBenchmarkR2router_GPlusStatic     2000000       624 ns/op     144 B/op       4 allocs/opBenchmarkRevel_GPlusStatic         300000      6526 ns/op    1232 B/op      23 allocs/opBenchmarkRivet_GPlusStatic       20000000        90.1 ns/op       0 B/op       0 allocs/opBenchmarkTango_GPlusStatic        1000000      1342 ns/op     208 B/op       9 allocs/opBenchmarkTigerTonic_GPlusStatic  10000000       247 ns/op      32 B/op       1 allocs/opBenchmarkTraffic_GPlusStatic      1000000      3308 ns/op    1192 B/op      15 allocs/opBenchmarkVulcan_GPlusStatic       2000000       817 ns/op      98 B/op       3 allocs/opBenchmarkAce_GPlusParam           3000000       452 ns/op      64 B/op       1 allocs/opBenchmarkBear_GPlusParam          1000000      1277 ns/op     480 B/op       5 allocs/opBenchmarkBeego_GPlusParam         1000000      2283 ns/op       0 B/op       0 allocs/opBenchmarkBone_GPlusParam          1000000      1208 ns/op     384 B/op       3 allocs/opBenchmarkDenco_GPlusParam         5000000       354 ns/op      64 B/op       1 allocs/opBenchmarkEcho_GPlusParam         10000000       137 ns/op       0 B/op       0 allocs/opBenchmarkGin_GPlusParam          10000000       128 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GPlusParam    1000000      1972 ns/op     648 B/op       8 allocs/opBenchmarkGoji_GPlusParam          2000000       987 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_GPlusParam        1000000      1048 ns/op     176 B/op       5 allocs/opBenchmarkGoJsonRest_GPlusParam    1000000      2299 ns/op     649 B/op      13 allocs/opBenchmarkGoRestful_GPlusParam      100000     18783 ns/op    2760 B/op      29 allocs/opBenchmarkGorillaMux_GPlusParam     300000      5566 ns/op     752 B/op       8 allocs/opBenchmarkHttpRouter_GPlusParam    5000000       272 ns/op      64 B/op       1 allocs/opBenchmarkHttpTreeMux_GPlusParam   2000000       876 ns/op     352 B/op       3 allocs/opBenchmarkIris_GPlusParam            30000000          53.7 ns/op           0 B/op          0 allocs/opBenchmarkKocha_GPlusParam         3000000       482 ns/op      56 B/op       3 allocs/opBenchmarkLARS_GPlusParam         10000000       131 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GPlusParam       1000000      3259 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_GPlusParam        300000      6824 ns/op    1104 B/op      11 allocs/opBenchmarkPat_GPlusParam           1000000      2326 ns/op     688 B/op      12 allocs/opBenchmarkPossum_GPlusParam        1000000      2152 ns/op     560 B/op       6 allocs/opBenchmarkR2router_GPlusParam      1000000      1170 ns/op     432 B/op       5 allocs/opBenchmarkRevel_GPlusParam          300000      7518 ns/op    1664 B/op      26 allocs/opBenchmarkRivet_GPlusParam         5000000       330 ns/op      48 B/op       1 allocs/opBenchmarkTango_GPlusParam         1000000      1773 ns/op     272 B/op       9 allocs/opBenchmarkTigerTonic_GPlusParam     500000      4049 ns/op    1040 B/op      16 allocs/opBenchmarkTraffic_GPlusParam        300000      6846 ns/op    1976 B/op      21 allocs/opBenchmarkVulcan_GPlusParam        1000000      1119 ns/op      98 B/op       3 allocs/opBenchmarkAce_GPlus2Params         3000000       500 ns/op      64 B/op       1 allocs/opBenchmarkBear_GPlus2Params        1000000      1580 ns/op     496 B/op       5 allocs/opBenchmarkBeego_GPlus2Params        500000      2492 ns/op       0 B/op       0 allocs/opBenchmarkBone_GPlus2Params         500000      3390 ns/op     736 B/op       7 allocs/opBenchmarkDenco_GPlus2Params       3000000       464 ns/op      64 B/op       1 allocs/opBenchmarkEcho_GPlus2Params       10000000       191 ns/op       0 B/op       0 allocs/opBenchmarkGin_GPlus2Params        10000000       168 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GPlus2Params  1000000      2444 ns/op     712 B/op       9 allocs/opBenchmarkGoji_GPlus2Params        1000000      1399 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_GPlus2Params      1000000      2045 ns/op     256 B/op       8 allocs/opBenchmarkGoJsonRest_GPlus2Params  1000000      2958 ns/op     713 B/op      14 allocs/opBenchmarkGoRestful_GPlus2Params    100000     23056 ns/op    2920 B/op      31 allocs/opBenchmarkGorillaMux_GPlus2Params   200000     10588 ns/op     768 B/op       8 allocs/opBenchmarkHttpRouter_GPlus2Params  5000000       315 ns/op      64 B/op       1 allocs/opBenchmarkHttpTreeMux_GPlus2Params 1000000      1217 ns/op     384 B/op       4 allocs/opBenchmarkIris_GPlus2Params          30000000          54.1 ns/op           0 B/op          0 allocs/opBenchmarkKocha_GPlus2Params       2000000       928 ns/op     128 B/op       5 allocs/opBenchmarkLARS_GPlus2Params       10000000       168 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GPlus2Params     1000000      3434 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_GPlus2Params      100000     15189 ns/op    1232 B/op      15 allocs/opBenchmarkPat_GPlus2Params          200000      7206 ns/op    2256 B/op      34 allocs/opBenchmarkPossum_GPlus2Params      1000000      2169 ns/op     560 B/op       6 allocs/opBenchmarkR2router_GPlus2Params    1000000      1302 ns/op     432 B/op       5 allocs/opBenchmarkRevel_GPlus2Params        200000      8042 ns/op    1760 B/op      28 allocs/opBenchmarkRivet_GPlus2Params       3000000       483 ns/op      96 B/op       1 allocs/opBenchmarkTango_GPlus2Params       1000000      2251 ns/op     448 B/op      11 allocs/opBenchmarkTigerTonic_GPlus2Params   300000      6479 ns/op    1456 B/op      22 allocs/opBenchmarkTraffic_GPlus2Params      100000     14594 ns/op    3272 B/op      31 allocs/opBenchmarkVulcan_GPlus2Params      1000000      1588 ns/op      98 B/op       3 allocs/opBenchmarkAce_GPlusAll              300000      6011 ns/op     640 B/op      11 allocs/opBenchmarkBear_GPlusAll             100000     17309 ns/op    5488 B/op      61 allocs/opBenchmarkBeego_GPlusAll             50000     30892 ns/op       0 B/op       0 allocs/opBenchmarkBone_GPlusAll             100000     22674 ns/op    4912 B/op      61 allocs/opBenchmarkDenco_GPlusAll            300000      4953 ns/op     672 B/op      11 allocs/opBenchmarkEcho_GPlusAll             500000      2543 ns/op       0 B/op       0 allocs/opBenchmarkGin_GPlusAll             1000000      2070 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_GPlusAll        50000     26694 ns/op    8040 B/op     103 allocs/opBenchmarkGoji_GPlusAll             200000     13666 ns/op    3696 B/op      22 allocs/opBenchmarkGojiv2_GPlusAll           100000     17038 ns/op    2640 B/op      76 allocs/opBenchmarkGoJsonRest_GPlusAll        50000     31756 ns/op    8117 B/op     170 allocs/opBenchmarkGoRestful_GPlusAll         10000    207579 ns/op   38664 B/op     389 allocs/opBenchmarkGorillaMux_GPlusAll        20000     83537 ns/op    9248 B/op     102 allocs/opBenchmarkHttpRouter_GPlusAll       500000      3376 ns/op     640 B/op      11 allocs/opBenchmarkHttpTreeMux_GPlusAll      200000     11639 ns/op    4032 B/op      38 allocs/opBenchmarkIris_GPlusAll               1000000          1227 ns/op           0 B/op          0 allocs/opBenchmarkKocha_GPlusAll            200000      8193 ns/op     976 B/op      43 allocs/opBenchmarkLARS_GPlusAll            1000000      2086 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_GPlusAll           30000     42275 ns/op   12944 B/op     115 allocs/opBenchmarkMartini_GPlusAll           10000    113111 ns/op   14448 B/op     165 allocs/opBenchmarkPat_GPlusAll               30000     57505 ns/op   16576 B/op     298 allocs/opBenchmarkPossum_GPlusAll           100000     18661 ns/op    5408 B/op      39 allocs/opBenchmarkR2router_GPlusAll         100000     15602 ns/op    5040 B/op      63 allocs/opBenchmarkRevel_GPlusAll             20000     99153 ns/op   21136 B/op     342 allocs/opBenchmarkRivet_GPlusAll            300000      4892 ns/op     768 B/op      11 allocs/opBenchmarkTango_GPlusAll            100000     24402 ns/op    4304 B/op     129 allocs/opBenchmarkTigerTonic_GPlusAll        20000     63441 ns/op   14256 B/op     272 allocs/opBenchmarkTraffic_GPlusAll           10000    128642 ns/op   37360 B/op     392 allocs/opBenchmarkVulcan_GPlusAll           100000     16243 ns/op    1274 B/op      39 allocs/opBenchmarkAce_ParseStatic         10000000       210 ns/op       0 B/op       0 allocs/opBenchmarkBear_ParseStatic         3000000       561 ns/op     120 B/op       3 allocs/opBenchmarkBeego_ParseStatic        1000000      2178 ns/op       0 B/op       0 allocs/opBenchmarkBone_ParseStatic         2000000       771 ns/op     144 B/op       3 allocs/opBenchmarkDenco_ParseStatic       30000000        43.4 ns/op       0 B/op       0 allocs/opBenchmarkEcho_ParseStatic        20000000       100 ns/op       0 B/op       0 allocs/opBenchmarkGin_ParseStatic         20000000        95.1 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_ParseStatic   1000000      1113 ns/op     296 B/op       5 allocs/opBenchmarkGoji_ParseStatic         5000000       282 ns/op       0 B/op       0 allocs/opBenchmarkGojiv2_ParseStatic       2000000       726 ns/op     160 B/op       4 allocs/opBenchmarkGoJsonRest_ParseStatic   1000000      1407 ns/op     329 B/op      11 allocs/opBenchmarkGoRestful_ParseStatic     100000     14842 ns/op    3656 B/op      30 allocs/opBenchmarkGorillaMux_ParseStatic    500000      4249 ns/op     448 B/op       7 allocs/opBenchmarkHttpRouter_ParseStatic  30000000        40.2 ns/op       0 B/op       0 allocs/opBenchmarkHttpTreeMux_ParseStatic 20000000        79.1 ns/op       0 B/op       0 allocs/opBenchmarkKocha_ParseStatic       20000000        66.7 ns/op       0 B/op       0 allocs/opBenchmarkIris_ParseStatic           30000000            51.5 ns/op         0 B/op          0 allocs/opBenchmarkLARS_ParseStatic        20000000        95.0 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_ParseStatic      1000000      2703 ns/op     752 B/op       8 allocs/opBenchmarkMartini_ParseStatic       300000      5844 ns/op     784 B/op      10 allocs/opBenchmarkPat_ParseStatic          2000000       951 ns/op     240 B/op       5 allocs/opBenchmarkPossum_ParseStatic       1000000      1352 ns/op     416 B/op       3 allocs/opBenchmarkR2router_ParseStatic     2000000       677 ns/op     144 B/op       4 allocs/opBenchmarkRevel_ParseStatic         300000      6594 ns/op    1248 B/op      23 allocs/opBenchmarkRivet_ParseStatic       20000000        96.7 ns/op       0 B/op       0 allocs/opBenchmarkTango_ParseStatic        1000000      1481 ns/op     256 B/op       9 allocs/opBenchmarkTigerTonic_ParseStatic   5000000       334 ns/op      48 B/op       1 allocs/opBenchmarkTraffic_ParseStatic       500000      4885 ns/op    1816 B/op      20 allocs/opBenchmarkVulcan_ParseStatic       2000000       908 ns/op      98 B/op       3 allocs/opBenchmarkAce_ParseParam           3000000       427 ns/op      64 B/op       1 allocs/opBenchmarkBear_ParseParam          1000000      1248 ns/op     467 B/op       5 allocs/opBenchmarkBeego_ParseParam         1000000      2225 ns/op       0 B/op       0 allocs/opBenchmarkBone_ParseParam          1000000      1510 ns/op     464 B/op       4 allocs/opBenchmarkDenco_ParseParam         5000000       346 ns/op      64 B/op       1 allocs/opBenchmarkEcho_ParseParam         20000000       118 ns/op       0 B/op       0 allocs/opBenchmarkGin_ParseParam          20000000       100 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_ParseParam    1000000      1987 ns/op     664 B/op       8 allocs/opBenchmarkGoji_ParseParam          1000000      1060 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_ParseParam        1000000      1111 ns/op     208 B/op       6 allocs/opBenchmarkGoJsonRest_ParseParam    1000000      2142 ns/op     649 B/op      13 allocs/opBenchmarkGoRestful_ParseParam      100000     16895 ns/op    4024 B/op      31 allocs/opBenchmarkGorillaMux_ParseParam     500000      4709 ns/op     752 B/op       8 allocs/opBenchmarkHttpRouter_ParseParam   10000000       243 ns/op      64 B/op       1 allocs/opBenchmarkHttpTreeMux_ParseParam   2000000       834 ns/op     352 B/op       3 allocs/opBenchmarkIris_ParseParam            30000000          54.1 ns/op           0 B/op          0 allocs/opBenchmarkKocha_ParseParam         3000000       451 ns/op      56 B/op       3 allocs/opBenchmarkLARS_ParseParam         20000000       104 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_ParseParam       1000000      3258 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_ParseParam        300000      6822 ns/op    1104 B/op      11 allocs/opBenchmarkPat_ParseParam           1000000      3342 ns/op    1120 B/op      17 allocs/opBenchmarkPossum_ParseParam        1000000      2132 ns/op     560 B/op       6 allocs/opBenchmarkR2router_ParseParam      1000000      1190 ns/op     432 B/op       5 allocs/opBenchmarkRevel_ParseParam          300000      7533 ns/op    1664 B/op      26 allocs/opBenchmarkRivet_ParseParam         5000000       285 ns/op      48 B/op       1 allocs/opBenchmarkTango_ParseParam         1000000      1616 ns/op     288 B/op       9 allocs/opBenchmarkTigerTonic_ParseParam     500000      3820 ns/op     992 B/op      16 allocs/opBenchmarkTraffic_ParseParam        300000      6715 ns/op    2248 B/op      23 allocs/opBenchmarkVulcan_ParseParam        1000000      1008 ns/op      98 B/op       3 allocs/opBenchmarkAce_Parse2Params         3000000       457 ns/op      64 B/op       1 allocs/opBenchmarkBear_Parse2Params        1000000      1441 ns/op     496 B/op       5 allocs/opBenchmarkBeego_Parse2Params       1000000      2340 ns/op       0 B/op       0 allocs/opBenchmarkBone_Parse2Params        1000000      1359 ns/op     416 B/op       3 allocs/opBenchmarkDenco_Parse2Params       5000000       410 ns/op      64 B/op       1 allocs/opBenchmarkEcho_Parse2Params       10000000       145 ns/op       0 B/op       0 allocs/opBenchmarkGin_Parse2Params        10000000       124 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_Parse2Params  1000000      2290 ns/op     712 B/op       9 allocs/opBenchmarkGoji_Parse2Params        1000000      1062 ns/op     336 B/op       2 allocs/opBenchmarkGojiv2_Parse2Params      1000000      1060 ns/op     192 B/op       5 allocs/opBenchmarkGoJsonRest_Parse2Params  1000000      2609 ns/op     713 B/op      14 allocs/opBenchmarkGoRestful_Parse2Params     50000     25612 ns/op    6856 B/op      39 allocs/opBenchmarkGorillaMux_Parse2Params   300000      5184 ns/op     768 B/op       8 allocs/opBenchmarkHttpRouter_Parse2Params  5000000       267 ns/op      64 B/op       1 allocs/opBenchmarkHttpTreeMux_Parse2Params 1000000      1121 ns/op     384 B/op       4 allocs/opBenchmarkIris_Parse2Params          30000000          56.2 ns/op           0 B/op          0 allocs/opBenchmarkKocha_Parse2Params       2000000       835 ns/op     128 B/op       5 allocs/opBenchmarkLARS_Parse2Params       10000000       129 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_Parse2Params     1000000      3409 ns/op    1040 B/op       9 allocs/opBenchmarkMartini_Parse2Params      300000      6689 ns/op    1136 B/op      11 allocs/opBenchmarkPat_Parse2Params         1000000      3282 ns/op     832 B/op      17 allocs/opBenchmarkPossum_Parse2Params      1000000      2157 ns/op     560 B/op       6 allocs/opBenchmarkR2router_Parse2Params    1000000      1293 ns/op     432 B/op       5 allocs/opBenchmarkRevel_Parse2Params        200000      7881 ns/op    1728 B/op      28 allocs/opBenchmarkRivet_Parse2Params       3000000       433 ns/op      96 B/op       1 allocs/opBenchmarkTango_Parse2Params       1000000      2111 ns/op     416 B/op      11 allocs/opBenchmarkTigerTonic_Parse2Params   300000      6109 ns/op    1376 B/op      22 allocs/opBenchmarkTraffic_Parse2Params      300000      6961 ns/op    2040 B/op      22 allocs/opBenchmarkVulcan_Parse2Params      1000000      1140 ns/op      98 B/op       3 allocs/opBenchmarkAce_ParseAll              200000      9773 ns/op     640 B/op      16 allocs/opBenchmarkBear_ParseAll              50000     29056 ns/op    8928 B/op     110 allocs/opBenchmarkBeego_ParseAll             30000     58810 ns/op       0 B/op       0 allocs/opBenchmarkBone_ParseAll              50000     32671 ns/op    8048 B/op      90 allocs/opBenchmarkDenco_ParseAll            200000      7228 ns/op     928 B/op      16 allocs/opBenchmarkEcho_ParseAll             300000      4502 ns/op       0 B/op       0 allocs/opBenchmarkGin_ParseAll              500000      3799 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_ParseAll        30000     46784 ns/op   13728 B/op     181 allocs/opBenchmarkGoji_ParseAll             100000     21732 ns/op    5376 B/op      32 allocs/opBenchmarkGojiv2_ParseAll           100000     25764 ns/op    4496 B/op     121 allocs/opBenchmarkGoJsonRest_ParseAll        30000     54617 ns/op   13866 B/op     321 allocs/opBenchmarkGoRestful_ParseAll          5000    528057 ns/op  125600 B/op     868 allocs/opBenchmarkGorillaMux_ParseAll        10000    166329 ns/op   16560 B/op     198 allocs/opBenchmarkHttpRouter_ParseAll       300000      4783 ns/op     640 B/op      16 allocs/opBenchmarkHttpTreeMux_ParseAll      100000     16820 ns/op    5728 B/op      51 allocs/opBenchmarkIris_ParseAll                500000          2431 ns/op           0 B/op          0 allocs/opBenchmarkKocha_ParseAll            200000     11006 ns/op    1112 B/op      54 allocs/opBenchmarkLARS_ParseAll             500000      4001 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_ParseAll           20000     82102 ns/op   24160 B/op     224 allocs/opBenchmarkMartini_ParseAll           10000    181166 ns/op   25600 B/op     276 allocs/opBenchmarkPat_ParseAll               20000     63217 ns/op   17264 B/op     343 allocs/opBenchmarkPossum_ParseAll            50000     36679 ns/op   10816 B/op      78 allocs/opBenchmarkR2router_ParseAll          50000     27948 ns/op    8352 B/op     120 allocs/opBenchmarkRevel_ParseAll             10000    191336 ns/op   39424 B/op     652 allocs/opBenchmarkRivet_ParseAll            200000      7394 ns/op     912 B/op      16 allocs/opBenchmarkTango_ParseAll             30000     44328 ns/op    7664 B/op     240 allocs/opBenchmarkTigerTonic_ParseAll        20000     84400 ns/op   19424 B/op     360 allocs/opBenchmarkTraffic_ParseAll           10000    184485 ns/op   57776 B/op     642 allocs/opBenchmarkVulcan_ParseAll            50000     30571 ns/op    2548 B/op      78 allocs/opBenchmarkAce_StaticAll              30000     47957 ns/op       0 B/op       0 allocs/opBenchmarkHttpServeMux_StaticAll      2000    787046 ns/op      96 B/op       8 allocs/opBenchmarkBeego_StaticAll             5000    380445 ns/op       0 B/op       0 allocs/opBenchmarkBear_StaticAll             10000    112556 ns/op   20336 B/op     461 allocs/opBenchmarkBone_StaticAll             20000     94966 ns/op       0 B/op       0 allocs/opBenchmarkDenco_StaticAll           100000     13926 ns/op       0 B/op       0 allocs/opBenchmarkEcho_StaticAll             50000     32464 ns/op       0 B/op       0 allocs/opBenchmarkGin_StaticAll              50000     29679 ns/op       0 B/op       0 allocs/opBenchmarkGocraftWeb_StaticAll       10000    193033 ns/op   46440 B/op     785 allocs/opBenchmarkGoji_StaticAll             20000     67110 ns/op       0 B/op       0 allocs/opBenchmarkGojiv2_StaticAll           10000    171440 ns/op   25120 B/op     628 allocs/opBenchmarkGoJsonRest_StaticAll       10000    279781 ns/op   51653 B/op    1727 allocs/opBenchmarkGoRestful_StaticAll          300   5746021 ns/op  392312 B/op    4694 allocs/opBenchmarkGorillaMux_StaticAll        1000   2241602 ns/op   70432 B/op    1107 allocs/opBenchmarkHttpRouter_StaticAll      100000     17340 ns/op       0 B/op       0 allocs/opBenchmarkHttpTreeMux_StaticAll     100000     17313 ns/op       0 B/op       0 allocs/opBenchmarkIris_StaticAll               100000         16659 ns/op           0 B/op          0 allocs/opBenchmarkKocha_StaticAll            50000     25972 ns/op       0 B/op       0 allocs/opBenchmarkLARS_StaticAll             50000     29267 ns/op       0 B/op       0 allocs/opBenchmarkMacaron_StaticAll           5000    444243 ns/op  118065 B/op    1256 allocs/opBenchmarkMartini_StaticAll            500   3105201 ns/op  132818 B/op    2178 allocs/opBenchmarkPat_StaticAll               1000   1758983 ns/op  533904 B/op   11123 allocs/opBenchmarkPossum_StaticAll           10000    211771 ns/op   65312 B/op     471 allocs/opBenchmarkR2router_StaticAll         10000    124813 ns/op   22608 B/op     628 allocs/opBenchmarkRevel_StaticAll             2000   1036863 ns/op  198240 B/op    3611 allocs/opBenchmarkRivet_StaticAll            50000     35304 ns/op       0 B/op       0 allocs/opBenchmarkTango_StaticAll             5000    303647 ns/op   40481 B/op    1413 allocs/opBenchmarkTigerTonic_StaticAll       20000     69463 ns/op    7504 B/op     157 allocs/opBenchmarkTraffic_StaticAll           1000   2288676 ns/op  729736 B/op   14287 allocs/opBenchmarkVulcan_StaticAll           10000    215491 ns/op   15386 B/op     471 allocs/op

路由建立后的内存占用:

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
#GithubAPI Routes: 203   Ace: 48992 Bytes   Bear: 161496 Bytes   Beego: 144536 Bytes   Bone: 97696 Bytes   Denco: 36440 Bytes   Echo: 76264 Bytes   Gin: 52464 Bytes   GocraftWeb: 95304 Bytes   Goji: 86104 Bytes   Gojiv2: 144408 Bytes   GoJsonRest: 134376 Bytes   GoRestful: 1395576 Bytes   GorillaMux: 1494848 Bytes   HttpRouter: 37464 Bytes   HttpTreeMux: 78736 Bytes   Iris: 61928 Bytes   Kocha: 785408 Bytes   LARS: 49016 Bytes   Macaron: 128200 Bytes   Martini: 556192 Bytes   Pat: 21200 Bytes   Possum: 84368 Bytes   R2router: 47104 Bytes   Revel: 141504 Bytes   Rivet: 42840 Bytes   Tango: 54584 Bytes   TigerTonic: 95136 Bytes   Traffic: 1053712 Bytes   Vulcan: 465184 Bytes#GPlusAPI Routes: 13   Ace: 3600 Bytes   Bear: 7112 Bytes   Beego: 9712 Bytes   Bone: 6448 Bytes   Denco: 3256 Bytes   Echo: 7064 Bytes   Gin: 3856 Bytes   GocraftWeb: 7496 Bytes   Goji: 2912 Bytes   Gojiv2: 7376 Bytes   GoJsonRest: 11544 Bytes   GoRestful: 87608 Bytes   GorillaMux: 71072 Bytes   HttpRouter: 2712 Bytes   HttpTreeMux: 7376 Bytes   Iris: 6480 Bytes   Kocha: 128880 Bytes   LARS: 3624 Bytes   Macaron: 8448 Bytes   Martini: 23936 Bytes   Pat: 1856 Bytes   Possum: 7728 Bytes   R2router: 3928 Bytes   Revel: 10768 Bytes   Rivet: 3064 Bytes   Tango: 4912 Bytes   TigerTonic: 9408 Bytes   Traffic: 49472 Bytes   Vulcan: 25704 Bytes#ParseAPI Routes: 26   Ace: 6592 Bytes   Bear: 12320 Bytes   Beego: 18416 Bytes   Bone: 10992 Bytes   Denco: 4184 Bytes   Echo: 7984 Bytes   Gin: 6816 Bytes   GocraftWeb: 12800 Bytes   Goji: 5232 Bytes   Gojiv2: 14464 Bytes   GoJsonRest: 14088 Bytes   GoRestful: 126216 Bytes   GorillaMux: 122184 Bytes   HttpRouter: 4976 Bytes   HttpTreeMux: 7784 Bytes   Iris: 9928 Bytes   Kocha: 181712 Bytes   LARS: 6616 Bytes   Macaron: 13232 Bytes   Martini: 45952 Bytes   Pat: 2560 Bytes   Possum: 9200 Bytes   R2router: 7056 Bytes   Revel: 15488 Bytes   Rivet: 5680 Bytes   Tango: 8664 Bytes   TigerTonic: 9840 Bytes   Traffic: 93480 Bytes   Vulcan: 44504 Bytes#Static Routes: 157   HttpServeMux: 16864 Bytes   Ace: 30080 Bytes   Bear: 30216 Bytes   Beego: 93768 Bytes   Bone: 37872 Bytes   Denco: 9984 Bytes   Echo: 60960 Bytes   Gin: 30400 Bytes   GocraftWeb: 55256 Bytes   Goji: 27200 Bytes   Gojiv2: 104464 Bytes   GoJsonRest: 135864 Bytes   GoRestful: 908200 Bytes   GorillaMux: 668496 Bytes   HttpRouter: 21128 Bytes   HttpTreeMux: 73384 Bytes   Iris: 37264 Bytes   Kocha: 114816 Bytes   LARS: 30104 Bytes   Macaron: 35136 Bytes   Martini: 308784 Bytes   Pat: 20464 Bytes   Possum: 92288 Bytes   R2router: 23712 Bytes   Revel: 93392 Bytes   Rivet: 23880 Bytes   Tango: 28008 Bytes   TigerTonic: 79696 Bytes   Traffic: 624416 Bytes   Vulcan: 368520 Bytes