Skip to content

Commit

Permalink
add new framework Aero
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Oct 22, 2019
1 parent 4a5e58f commit 0c47f5a
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 3 deletions.
24 changes: 24 additions & 0 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func BenchmarkAce_Param(b *testing.B) {
r, _ := http.NewRequest("GET", "/user/gordon", nil)
benchRequest(b, router, r)
}
func BenchmarkAero_Param(b *testing.B) {
router := loadAeroSingle("GET", "/user/:name", aeroHandler)

r, _ := http.NewRequest("GET", "/user/gordon", nil)
benchRequest(b, router, r)
}
func BenchmarkBear_Param(b *testing.B) {
router := loadBearSingle("GET", "/user/{name}", bearHandler)

Expand Down Expand Up @@ -314,6 +320,12 @@ func BenchmarkAce_Param5(b *testing.B) {
r, _ := http.NewRequest("GET", fiveRoute, nil)
benchRequest(b, router, r)
}
func BenchmarkAero_Param5(b *testing.B) {
router := loadAeroSingle("GET", fiveColon, aeroHandler)

r, _ := http.NewRequest("GET", fiveRoute, nil)
benchRequest(b, router, r)
}
func BenchmarkBear_Param5(b *testing.B) {
router := loadBearSingle("GET", fiveBrace, bearHandler)

Expand Down Expand Up @@ -518,6 +530,12 @@ func BenchmarkAce_Param20(b *testing.B) {
r, _ := http.NewRequest("GET", twentyRoute, nil)
benchRequest(b, router, r)
}
func BenchmarkAero_Param20(b *testing.B) {
router := loadAeroSingle("GET", twentyBrace, aeroHandler)

r, _ := http.NewRequest("GET", twentyRoute, nil)
benchRequest(b, router, r)
}
func BenchmarkBear_Param20(b *testing.B) {
router := loadBearSingle("GET", twentyBrace, bearHandler)

Expand Down Expand Up @@ -718,6 +736,12 @@ func BenchmarkAce_ParamWrite(b *testing.B) {
r, _ := http.NewRequest("GET", "/user/gordon", nil)
benchRequest(b, router, r)
}
func BenchmarkAero_ParamWrite(b *testing.B) {
router := loadAeroSingle("GET", "/user/:name", aeroHandlerTest)

r, _ := http.NewRequest("GET", "/user/gordon", nil)
benchRequest(b, router, r)
}
func BenchmarkBear_ParamWrite(b *testing.B) {
router := loadBearSingle("GET", "/user/{name}", bearHandlerWrite)

Expand Down
15 changes: 15 additions & 0 deletions github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ var githubAPI = []route{

var (
githubAce http.Handler
githubAero http.Handler
githubBear http.Handler
githubBeego http.Handler
githubBone http.Handler
Expand Down Expand Up @@ -314,6 +315,9 @@ func init() {
calcMem("Ace", func() {
githubAce = loadAce(githubAPI)
})
calcMem("Aero", func() {
githubAero = loadAero(githubAPI)
})
calcMem("Bear", func() {
githubBear = loadBear(githubAPI)
})
Expand Down Expand Up @@ -416,6 +420,10 @@ func BenchmarkAce_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubAce, req)
}
func BenchmarkAero_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubAero, req)
}
func BenchmarkBear_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubBear, req)
Expand Down Expand Up @@ -548,6 +556,10 @@ func BenchmarkAce_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubAce, req)
}
func BenchmarkAero_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubAero, req)
}
func BenchmarkBear_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubBear, req)
Expand Down Expand Up @@ -679,6 +691,9 @@ func BenchmarkVulcan_GithubParam(b *testing.B) {
func BenchmarkAce_GithubAll(b *testing.B) {
benchRoutes(b, githubAce, githubAPI)
}
func BenchmarkAero_GithubAll(b *testing.B) {
benchRoutes(b, githubAero, githubAPI)
}
func BenchmarkBear_GithubAll(b *testing.B) {
benchRoutes(b, githubBear, githubAPI)
}
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/julienschmidt/go-http-routing-benchmark
go 1.13

require (
github.com/aerogo/aero v1.3.28
github.com/ant0ine/go-json-rest v3.3.2+incompatible
github.com/astaxie/beego v1.12.0
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40
Expand All @@ -26,7 +27,6 @@ require (
github.com/gowww/router v0.0.0-20180327195201-5f9c626ef619
github.com/gravitational/trace v0.0.0-20190726142706-a535a178675f // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.7 // indirect
github.com/julienschmidt/httprouter v1.3.0
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/labstack/echo v3.3.10+incompatible
Expand Down Expand Up @@ -61,7 +61,6 @@ require (
goji.io v2.0.2+incompatible
golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad // indirect
golang.org/x/net v0.0.0-20190926025831-c00fd9afed17 // indirect
golang.org/x/sys v0.0.0-20190927073244-c990c680b611 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/ini.v1 v1.48.0 // indirect
gopkg.in/macaron.v1 v1.3.4
Expand Down
42 changes: 42 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,37 @@ gitea.com/lunny/log v0.0.0-20190322053110-01b5df579c4e h1:r1en/D7xJmcY24VkHkjkcJ
gitea.com/lunny/log v0.0.0-20190322053110-01b5df579c4e/go.mod h1:uJEsN4LQpeGYRCjuPXPZBClU7N5pWzGuyF4uqLpE/e0=
github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/OwnLocal/goes v1.0.0/go.mod h1:8rIFjBGTue3lCU0wplczcUgt9Gxgrkkrw7etMIcn8TM=
github.com/aerogo/aero v1.3.28 h1:ZoDvLxG4xUnH3YQd8FjLIQpi43ALOWq+DbBRwyvpS/c=
github.com/aerogo/aero v1.3.28/go.mod h1:WZq4j2dr9BbbyqBxhV8kOGpnyMI+1bkDKhFrvmlSn7c=
github.com/aerogo/csp v0.1.9 h1:7K8FujZkE62Wes0lXt9sTG0kf/pn3G3XkDwhmrTlnpY=
github.com/aerogo/csp v0.1.9/go.mod h1:xB+51XmDvkdRYsOCwVoG/D+aJGEJfi6KxqM3/zf2jZw=
github.com/aerogo/http v1.0.9/go.mod h1:qVlq+QszT9mFVL92hmMs71fqzA1DILTjNSucEWUdFmk=
github.com/aerogo/http v1.0.10 h1:CIFhdka8DjJ/vF2oxQVi+1lNi7LZp5xSmkEjbEwhrdI=
github.com/aerogo/http v1.0.10/go.mod h1:rG/KkSLgpcjuB9I8k+OWbQI9YbahHIridyva0AQdH70=
github.com/aerogo/linter-performance v1.0.5 h1:2tNBov+S/zuJ7Z0t2Yif2AYTfviNavJEGtfm1Sjyap4=
github.com/aerogo/linter-performance v1.0.5/go.mod h1:Frqz5+t0UnhaLy+zqU8FSXBne5D9Tt06EZh1ug2HZyY=
github.com/aerogo/session v0.1.7 h1:Natc9Pq9KIHDUBR/0YjdazckTdOWBItYmuDplGJJfFc=
github.com/aerogo/session v0.1.7/go.mod h1:6/99zuiGm8wzIPFGDlzv3636eLqhWR9cf0rRn/3IRJs=
github.com/aerogo/session-store-memory v0.1.6 h1:CZFuEkhL1NV4EFSwerPokuYHtYDXrePAipau/6xyM0Y=
github.com/aerogo/session-store-memory v0.1.6/go.mod h1:k3ElPubm0b+V/DV+pgtCLSArro/jbdS7niJ8uTKkvAQ=
github.com/akyoto/assert v0.1.3/go.mod h1:g5e6ag+ksCEQENq/LnmU9z04wCAIFDr8KacBusVL0H8=
github.com/akyoto/assert v0.2.0/go.mod h1:g5e6ag+ksCEQENq/LnmU9z04wCAIFDr8KacBusVL0H8=
github.com/akyoto/assert v0.2.1/go.mod h1:g5e6ag+ksCEQENq/LnmU9z04wCAIFDr8KacBusVL0H8=
github.com/akyoto/color v1.8.7/go.mod h1:eNfGr527GIJME/houfnrEIGiVlL5IJsOfuC2I+oby+4=
github.com/akyoto/color v1.8.9 h1:Uv8/rFdvq06ntG+GibKjbT+jWtc6o88SjKMUmi1Nom8=
github.com/akyoto/color v1.8.9/go.mod h1:ImvfyQaQbqtKLwiafRiRu6Fq98f4f9HBI/J0WK7q3Oc=
github.com/akyoto/colorable v0.1.4 h1:BPwbsaUmo90/JiwTB7v7TpRHkNsfIxsb9s25eASwwDg=
github.com/akyoto/colorable v0.1.4/go.mod h1:AUfZwbC9OzwBaIbVTyNpD2UmwPbh3ZQqpyrHzb2ZymY=
github.com/akyoto/hash v0.4.7 h1:z5yF4PPuzUqmSHVK6poV3UVFw+zR+/8IGDAy+zsR+U8=
github.com/akyoto/hash v0.4.7/go.mod h1:BSMAz3ncYc7mbb8VZlAo2nLIYPVB9QQ2SDsev7NJFmg=
github.com/akyoto/stringutils v0.2.3/go.mod h1:nyO78pc92gciYObsOGWasnQN/s18JEQusXtN/7iC2AM=
github.com/akyoto/stringutils v0.2.4 h1:VYW2FH2qjmQyJWZDSNFSP8btbSwJDoY0x14uiD/0OLU=
github.com/akyoto/stringutils v0.2.4/go.mod h1:nyO78pc92gciYObsOGWasnQN/s18JEQusXtN/7iC2AM=
github.com/akyoto/tty v0.1.0/go.mod h1:UMkevvI7yitoMBNoA9ALtJU0AL/6XGNkyuh9DqPvIOs=
github.com/akyoto/tty v0.1.1 h1:ZOJpp9fj0Y0CNVl9j7MJ7sJvlf9yVlFyDTiahD8FbUo=
github.com/akyoto/tty v0.1.1/go.mod h1:DLx0iz7IeaEsdXQkZ5IN/YOoWRvuV+JOSy6AQjyxA50=
github.com/akyoto/uuid v1.1.3 h1:FEz14tNTfaUeY0Jrkz2F17rjKiks6hOALGcPmAmtn1s=
github.com/akyoto/uuid v1.1.3/go.mod h1:8dgzDQyrpuApBGIQHOX7JkvCZHusXZ0tGlQcxxv4bYg=
github.com/ant0ine/go-json-rest v3.3.2+incompatible h1:nBixrkLFiDNAW0hauKDLc8yJI6XfrQumWvytE1Hk14E=
github.com/ant0ine/go-json-rest v3.3.2+incompatible/go.mod h1:q6aCt0GfU6LhpBsnZ/2U+mwe+0XB5WStbmwyoPfc+sk=
github.com/astaxie/beego v1.12.0 h1:MRhVoeeye5N+Flul5PoVfD9CslfdoH+xqC/xvSQ5u2Y=
Expand Down Expand Up @@ -96,6 +127,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGi
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg=
github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s=
github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
Expand Down Expand Up @@ -201,6 +235,8 @@ github.com/vanng822/r2router v0.0.0-20150523112421-1023140a4f30/go.mod h1:1BVq8p
github.com/vulcand/predicate v1.1.0 h1:Gq/uWopa4rx/tnZu2opOSBqHK63Yqlou/SzrbwdJiNg=
github.com/vulcand/predicate v1.1.0/go.mod h1:mlccC5IRBoc2cIFmCB8ZM62I3VDb6p2GXESMHa3CnZg=
github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
github.com/zeebo/xxh3 v0.0.0-20190923153500-83a7230063d0 h1:tFBBYU7YRi28AS9Oj/uoHxsxkUUjj9rcTt/Lkzd/VHQ=
github.com/zeebo/xxh3 v0.0.0-20190923153500-83a7230063d0/go.mod h1:e/zZObEJWtkq6f+bAzme0xQJSGI75oxoeqS+f2I7YVI=
github.com/zenazn/goji v0.9.0 h1:RSQQAbXGArQ0dIDEq+PI6WqN6if+5KHu6x2Cx/GXLTQ=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
goji.io v2.0.2+incompatible h1:uIssv/elbKRLznFUy3Xj4+2Mz/qKhek/9aZQDUMae7c=
Expand Down Expand Up @@ -228,8 +264,13 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190910064555-bbd175535a8b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190927073244-c990c680b611 h1:q9u40nxWT5zRClI/uU9dHCiYGottAg6Nzz4YUQyHxdA=
golang.org/x/sys v0.0.0-20190927073244-c990c680b611/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191007154456-ef33b2fb2c41/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191018095205-727590c5006e h1:ZtoklVMHQy6BFRHkbG6JzK+S6rX82//Yeok1vMlizfQ=
golang.org/x/sys v0.0.0-20191018095205-727590c5006e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand All @@ -238,6 +279,7 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190802220118-1d1727260058/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
Expand Down
19 changes: 19 additions & 0 deletions gplus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var gplusAPI = []route{

var (
gplusAce http.Handler
gplusAero http.Handler
gplusBear http.Handler
gplusBeego http.Handler
gplusBone http.Handler
Expand Down Expand Up @@ -76,6 +77,9 @@ func init() {
calcMem("Ace", func() {
gplusAce = loadAce(gplusAPI)
})
calcMem("Aero", func() {
gplusAero = loadAero(gplusAPI)
})
calcMem("Bear", func() {
gplusBear = loadBear(gplusAPI)
})
Expand Down Expand Up @@ -178,6 +182,10 @@ func BenchmarkAce_GPlusStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/people", nil)
benchRequest(b, gplusAce, req)
}
func BenchmarkAero_GPlusStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/people", nil)
benchRequest(b, gplusAero, req)
}
func BenchmarkBear_GPlusStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/people", nil)
benchRequest(b, gplusBear, req)
Expand Down Expand Up @@ -310,6 +318,10 @@ func BenchmarkAce_GPlusParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/people/118051310819094153327", nil)
benchRequest(b, gplusAce, req)
}
func BenchmarkAero_GPlusParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/people/118051310819094153327", nil)
benchRequest(b, gplusAero, req)
}
func BenchmarkBear_GPlusParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/people/118051310819094153327", nil)
benchRequest(b, gplusBear, req)
Expand Down Expand Up @@ -442,6 +454,10 @@ func BenchmarkAce_GPlus2Params(b *testing.B) {
req, _ := http.NewRequest("GET", "/people/118051310819094153327/activities/123456789", nil)
benchRequest(b, gplusAce, req)
}
func BenchmarkAero_GPlus2Params(b *testing.B) {
req, _ := http.NewRequest("GET", "/people/118051310819094153327/activities/123456789", nil)
benchRequest(b, gplusAero, req)
}
func BenchmarkBear_GPlus2Params(b *testing.B) {
req, _ := http.NewRequest("GET", "/people/118051310819094153327/activities/123456789", nil)
benchRequest(b, gplusBear, req)
Expand Down Expand Up @@ -573,6 +589,9 @@ func BenchmarkVulcan_GPlus2Params(b *testing.B) {
func BenchmarkAce_GPlusAll(b *testing.B) {
benchRoutes(b, gplusAce, gplusAPI)
}
func BenchmarkAero_GPlusAll(b *testing.B) {
benchRoutes(b, gplusAero, gplusAPI)
}
func BenchmarkBear_GPlusAll(b *testing.B) {
benchRoutes(b, gplusBear, gplusAPI)
}
Expand Down
19 changes: 19 additions & 0 deletions parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var parseAPI = []route{

var (
parseAce http.Handler
parseAero http.Handler
parseBear http.Handler
parseBeego http.Handler
parseBone http.Handler
Expand Down Expand Up @@ -96,6 +97,9 @@ func init() {
calcMem("Ace", func() {
parseAce = loadAce(parseAPI)
})
calcMem("Aero", func() {
parseAero = loadAero(parseAPI)
})
calcMem("Bear", func() {
parseBear = loadBear(parseAPI)
})
Expand Down Expand Up @@ -195,6 +199,10 @@ func BenchmarkAce_ParseStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/users", nil)
benchRequest(b, parseAce, req)
}
func BenchmarkAero_ParseStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/users", nil)
benchRequest(b, parseAero, req)
}
func BenchmarkBear_ParseStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/users", nil)
benchRequest(b, parseBear, req)
Expand Down Expand Up @@ -327,6 +335,10 @@ func BenchmarkAce_ParseParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/classes/go", nil)
benchRequest(b, parseAce, req)
}
func BenchmarkAero_ParseParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/classes/go", nil)
benchRequest(b, parseAero, req)
}
func BenchmarkBear_ParseParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/classes/go", nil)
benchRequest(b, parseBear, req)
Expand Down Expand Up @@ -459,6 +471,10 @@ func BenchmarkAce_Parse2Params(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/classes/go/123456789", nil)
benchRequest(b, parseAce, req)
}
func BenchmarkAero_Parse2Params(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/classes/go/123456789", nil)
benchRequest(b, parseAero, req)
}
func BenchmarkBear_Parse2Params(b *testing.B) {
req, _ := http.NewRequest("GET", "/1/classes/go/123456789", nil)
benchRequest(b, parseBear, req)
Expand Down Expand Up @@ -590,6 +606,9 @@ func BenchmarkVulcan_Parse2Params(b *testing.B) {
func BenchmarkAce_ParseAll(b *testing.B) {
benchRoutes(b, parseAce, parseAPI)
}
func BenchmarkAero_ParseAll(b *testing.B) {
benchRoutes(b, parseAero, parseAPI)
}
func BenchmarkBear_ParseAll(b *testing.B) {
benchRoutes(b, parseBear, parseAPI)
}
Expand Down
Loading

0 comments on commit 0c47f5a

Please sign in to comment.