Skip to content

Commit 052672f

Browse files
committed
use go modules and get running again
1 parent 734f0bc commit 052672f

File tree

9 files changed

+518
-192
lines changed

9 files changed

+518
-192
lines changed

bench_test.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ func BenchmarkR2router_Param(b *testing.B) {
234234
benchRequest(b, router, r)
235235
}
236236

237-
func BenchmarkRevel_Param(b *testing.B) {
238-
router := loadRevelSingle("GET", "/user/:name", "RevelController.Handle")
237+
// func BenchmarkRevel_Param(b *testing.B) {
238+
// router := loadRevelSingle("GET", "/user/:name", "RevelController.Handle")
239239

240-
r, _ := http.NewRequest("GET", "/user/gordon", nil)
241-
benchRequest(b, router, r)
242-
}
240+
// r, _ := http.NewRequest("GET", "/user/gordon", nil)
241+
// benchRequest(b, router, r)
242+
// }
243243
func BenchmarkRivet_Param(b *testing.B) {
244244
router := loadRivetSingle("GET", "/user/:name", rivetHandler)
245245

@@ -420,12 +420,12 @@ func BenchmarkR2router_Param5(b *testing.B) {
420420
benchRequest(b, router, r)
421421
}
422422

423-
func BenchmarkRevel_Param5(b *testing.B) {
424-
router := loadRevelSingle("GET", fiveColon, "RevelController.Handle")
423+
// func BenchmarkRevel_Param5(b *testing.B) {
424+
// router := loadRevelSingle("GET", fiveColon, "RevelController.Handle")
425425

426-
r, _ := http.NewRequest("GET", fiveRoute, nil)
427-
benchRequest(b, router, r)
428-
}
426+
// r, _ := http.NewRequest("GET", fiveRoute, nil)
427+
// benchRequest(b, router, r)
428+
// }
429429
func BenchmarkRivet_Param5(b *testing.B) {
430430
router := loadRivetSingle("GET", fiveColon, rivetHandler)
431431

@@ -606,12 +606,12 @@ func BenchmarkR2router_Param20(b *testing.B) {
606606
benchRequest(b, router, r)
607607
}
608608

609-
func BenchmarkRevel_Param20(b *testing.B) {
610-
router := loadRevelSingle("GET", twentyColon, "RevelController.Handle")
609+
// func BenchmarkRevel_Param20(b *testing.B) {
610+
// router := loadRevelSingle("GET", twentyColon, "RevelController.Handle")
611611

612-
r, _ := http.NewRequest("GET", twentyRoute, nil)
613-
benchRequest(b, router, r)
614-
}
612+
// r, _ := http.NewRequest("GET", twentyRoute, nil)
613+
// benchRequest(b, router, r)
614+
// }
615615
func BenchmarkRivet_Param20(b *testing.B) {
616616
router := loadRivetSingle("GET", twentyColon, rivetHandler)
617617

@@ -788,12 +788,12 @@ func BenchmarkR2router_ParamWrite(b *testing.B) {
788788
benchRequest(b, router, r)
789789
}
790790

791-
func BenchmarkRevel_ParamWrite(b *testing.B) {
792-
router := loadRevelSingle("GET", "/user/:name", "RevelController.HandleWrite")
791+
// func BenchmarkRevel_ParamWrite(b *testing.B) {
792+
// router := loadRevelSingle("GET", "/user/:name", "RevelController.HandleWrite")
793793

794-
r, _ := http.NewRequest("GET", "/user/gordon", nil)
795-
benchRequest(b, router, r)
796-
}
794+
// r, _ := http.NewRequest("GET", "/user/gordon", nil)
795+
// benchRequest(b, router, r)
796+
// }
797797
func BenchmarkRivet_ParamWrite(b *testing.B) {
798798
router := loadRivetSingle("GET", "/user/:name", rivetHandlerWrite)
799799

github_test.go

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ func init() {
374374
calcMem("R2router", func() {
375375
githubR2router = loadR2router(githubAPI)
376376
})
377-
calcMem("Revel", func() {
378-
githubRevel = loadRevel(githubAPI)
379-
})
377+
// calcMem("Revel", func() {
378+
// githubRevel = loadRevel(githubAPI)
379+
// })
380380
calcMem("Rivet", func() {
381381
githubRivet = loadRivet(githubAPI)
382382
})
@@ -488,10 +488,11 @@ func BenchmarkR2router_GithubStatic(b *testing.B) {
488488
req, _ := http.NewRequest("GET", "/user/repos", nil)
489489
benchRequest(b, githubR2router, req)
490490
}
491-
func BenchmarkRevel_GithubStatic(b *testing.B) {
492-
req, _ := http.NewRequest("GET", "/user/repos", nil)
493-
benchRequest(b, githubRevel, req)
494-
}
491+
492+
// func BenchmarkRevel_GithubStatic(b *testing.B) {
493+
// req, _ := http.NewRequest("GET", "/user/repos", nil)
494+
// benchRequest(b, githubRevel, req)
495+
// }
495496
func BenchmarkRivet_GithubStatic(b *testing.B) {
496497
req, _ := http.NewRequest("GET", "/user/repos", nil)
497498
benchRequest(b, githubRivet, req)
@@ -607,10 +608,11 @@ func BenchmarkR2router_GithubParam(b *testing.B) {
607608
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
608609
benchRequest(b, githubR2router, req)
609610
}
610-
func BenchmarkRevel_GithubParam(b *testing.B) {
611-
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
612-
benchRequest(b, githubRevel, req)
613-
}
611+
612+
// func BenchmarkRevel_GithubParam(b *testing.B) {
613+
// req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
614+
// benchRequest(b, githubRevel, req)
615+
// }
614616
func BenchmarkRivet_GithubParam(b *testing.B) {
615617
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
616618
benchRequest(b, githubRivet, req)
@@ -704,9 +706,10 @@ func BenchmarkPossum_GithubAll(b *testing.B) {
704706
func BenchmarkR2router_GithubAll(b *testing.B) {
705707
benchRoutes(b, githubR2router, githubAPI)
706708
}
707-
func BenchmarkRevel_GithubAll(b *testing.B) {
708-
benchRoutes(b, githubRevel, githubAPI)
709-
}
709+
710+
// func BenchmarkRevel_GithubAll(b *testing.B) {
711+
// benchRoutes(b, githubRevel, githubAPI)
712+
// }
710713
func BenchmarkRivet_GithubAll(b *testing.B) {
711714
benchRoutes(b, githubRivet, githubAPI)
712715
}

go.mod

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
module github.com/julienschmidt/go-http-routing-benchmark
2+
3+
go 1.13
4+
5+
require (
6+
github.com/ant0ine/go-json-rest v3.3.2+incompatible
7+
github.com/astaxie/beego v1.12.0
8+
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40
9+
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
10+
github.com/dimfeld/httptreemux v5.0.1+incompatible
11+
github.com/emicklei/go-restful v2.10.0+incompatible
12+
github.com/fsnotify/fsnotify v1.4.7 // indirect
13+
github.com/gin-gonic/gin v1.4.0
14+
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab
15+
github.com/go-playground/form v3.1.4+incompatible // indirect
16+
github.com/go-playground/lars v4.0.1+incompatible
17+
github.com/go-zoo/bone v1.3.0
18+
github.com/gocraft/web v0.0.0-20190207150652-9707327fb69b
19+
github.com/gorilla/mux v1.7.3
20+
github.com/gorilla/sessions v1.2.0 // indirect
21+
github.com/gorilla/websocket v1.4.1 // indirect
22+
github.com/gravitational/trace v0.0.0-20190726142706-a535a178675f // indirect
23+
github.com/inconshreveable/log15 v0.0.0-20180818164646-67afb5ed74ec // indirect
24+
github.com/jonboulle/clockwork v0.1.0 // indirect
25+
github.com/julienschmidt/httprouter v1.2.0
26+
github.com/labstack/echo v3.3.10+incompatible
27+
github.com/labstack/gommon v0.3.0 // indirect
28+
github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de
29+
github.com/lunny/tango v0.5.6
30+
github.com/mailgun/route v0.0.0-20181101151700-58b44163b968
31+
github.com/mikespook/possum v0.0.0-20170224044927-56d7ebb6470b
32+
github.com/naoina/denco v0.0.0-20180930074809-8475105a6b4c
33+
github.com/naoina/kocha-urlrouter v0.0.0-20140609163054-ad3a6f079210
34+
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
35+
github.com/philhofer/fwd v1.0.0 // indirect
36+
github.com/pilu/config v0.0.0-20131214182432-3eb99e6c0b9a // indirect
37+
github.com/pilu/miniassert v0.0.0-20140522125902-bee63581261a // indirect
38+
github.com/pilu/traffic v0.5.3
39+
github.com/plimble/ace v0.0.0-20180623113504-ba79f505f416
40+
github.com/plimble/sessions v0.0.0-20180326075456-7047d39da9ad // indirect
41+
github.com/plimble/utils v0.0.0-20150615054616-fe08d46675cd // indirect
42+
github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563 // indirect
43+
github.com/rcrowley/go-tigertonic v0.0.0-20170420123839-fe6b9f080eb7
44+
github.com/revel/config v0.21.0 // indirect
45+
github.com/revel/log15 v2.11.20+incompatible // indirect
46+
github.com/revel/pathtree v0.0.0-20140121041023-41257a1839e9
47+
github.com/revel/revel v0.21.0
48+
github.com/robfig/pathtree v0.0.0-20140121041023-41257a1839e9
49+
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
50+
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
51+
github.com/sirupsen/logrus v1.4.2 // indirect
52+
github.com/tinylib/msgp v1.1.0 // indirect
53+
github.com/twinj/uuid v1.0.0 // indirect
54+
github.com/typepress/rivet v1.1.1-0.20151208095308-d62b4fcaf6b9
55+
github.com/ursiform/bear v1.0.1
56+
github.com/vanng822/r2router v0.0.0-20150523112421-1023140a4f30
57+
github.com/vulcand/predicate v1.1.0 // indirect
58+
github.com/xeonx/timeago v1.0.0-rc4 // indirect
59+
github.com/zenazn/goji v0.9.0
60+
goji.io v2.0.2+incompatible
61+
gopkg.in/fsnotify.v1 v1.4.7 // indirect
62+
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
63+
gopkg.in/macaron.v1 v1.3.4
64+
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
65+
gopkg.in/stack.v0 v0.0.0-20141108040640-9b43fcefddd0 // indirect
66+
)

0 commit comments

Comments
 (0)