@@ -38,12 +38,12 @@ var gplusAPI = []route{
38
38
var (
39
39
gplusBeego http.Handler
40
40
gplusDenco http.Handler
41
+ gplusGin http.Handler
41
42
gplusGocraftWeb http.Handler
42
43
gplusGoji http.Handler
43
44
gplusGoJsonRest http.Handler
44
45
gplusGoRestful http.Handler
45
46
gplusGorillaMux http.Handler
46
- gplusGin http.Handler
47
47
gplusHttpRouter http.Handler
48
48
gplusHttpTreeMux http.Handler
49
49
gplusKocha http.Handler
@@ -64,6 +64,9 @@ func init() {
64
64
calcMem ("Denco" , func () {
65
65
gplusDenco = loadDenco (gplusAPI )
66
66
})
67
+ calcMem ("Gin" , func () {
68
+ gplusGin = loadGin (gplusAPI )
69
+ })
67
70
calcMem ("GocraftWeb" , func () {
68
71
gplusGocraftWeb = loadGocraftWeb (gplusAPI )
69
72
})
@@ -79,9 +82,6 @@ func init() {
79
82
calcMem ("GorillaMux" , func () {
80
83
gplusGorillaMux = loadGorillaMux (gplusAPI )
81
84
})
82
- calcMem ("Gin" , func () {
83
- gplusGin = loadGin (gplusAPI )
84
- })
85
85
calcMem ("HttpRouter" , func () {
86
86
gplusHttpRouter = loadHttpRouter (gplusAPI )
87
87
})
@@ -122,6 +122,10 @@ func BenchmarkDenco_GPlusStatic(b *testing.B) {
122
122
req , _ := http .NewRequest ("GET" , "/people" , nil )
123
123
benchRequest (b , gplusDenco , req )
124
124
}
125
+ func BenchmarkGin_GPlusStatic (b * testing.B ) {
126
+ req , _ := http .NewRequest ("GET" , "/people" , nil )
127
+ benchRequest (b , gplusGin , req )
128
+ }
125
129
func BenchmarkGocraftWeb_GPlusStatic (b * testing.B ) {
126
130
req , _ := http .NewRequest ("GET" , "/people" , nil )
127
131
benchRequest (b , gplusGocraftWeb , req )
@@ -142,10 +146,6 @@ func BenchmarkGorillaMux_GPlusStatic(b *testing.B) {
142
146
req , _ := http .NewRequest ("GET" , "/people" , nil )
143
147
benchRequest (b , gplusGorillaMux , req )
144
148
}
145
- func BenchmarkGin_GPlusStatic (b * testing.B ) {
146
- req , _ := http .NewRequest ("GET" , "/people" , nil )
147
- benchRequest (b , gplusGin , req )
148
- }
149
149
func BenchmarkHttpRouter_GPlusStatic (b * testing.B ) {
150
150
req , _ := http .NewRequest ("GET" , "/people" , nil )
151
151
benchRequest (b , gplusHttpRouter , req )
@@ -192,6 +192,10 @@ func BenchmarkDenco_GPlusParam(b *testing.B) {
192
192
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327" , nil )
193
193
benchRequest (b , gplusDenco , req )
194
194
}
195
+ func BenchmarkGin_GPlusParam (b * testing.B ) {
196
+ req , _ := http .NewRequest ("GET" , "/people/118051310819094153327" , nil )
197
+ benchRequest (b , gplusGin , req )
198
+ }
195
199
func BenchmarkGocraftWeb_GPlusParam (b * testing.B ) {
196
200
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327" , nil )
197
201
benchRequest (b , gplusGocraftWeb , req )
@@ -212,10 +216,6 @@ func BenchmarkGorillaMux_GPlusParam(b *testing.B) {
212
216
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327" , nil )
213
217
benchRequest (b , gplusGorillaMux , req )
214
218
}
215
- func BenchmarkGin_GPlusParam (b * testing.B ) {
216
- req , _ := http .NewRequest ("GET" , "/people/118051310819094153327" , nil )
217
- benchRequest (b , gplusGin , req )
218
- }
219
219
func BenchmarkHttpRouter_GPlusParam (b * testing.B ) {
220
220
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327" , nil )
221
221
benchRequest (b , gplusHttpRouter , req )
@@ -262,6 +262,10 @@ func BenchmarkDenco_GPlus2Params(b *testing.B) {
262
262
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327/activities/123456789" , nil )
263
263
benchRequest (b , gplusDenco , req )
264
264
}
265
+ func BenchmarkGin_GPlus2Params (b * testing.B ) {
266
+ req , _ := http .NewRequest ("GET" , "/people/118051310819094153327/activities/123456789" , nil )
267
+ benchRequest (b , gplusGin , req )
268
+ }
265
269
func BenchmarkGocraftWeb_GPlus2Params (b * testing.B ) {
266
270
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327/activities/123456789" , nil )
267
271
benchRequest (b , gplusGocraftWeb , req )
@@ -282,10 +286,6 @@ func BenchmarkGorillaMux_GPlus2Params(b *testing.B) {
282
286
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327/activities/123456789" , nil )
283
287
benchRequest (b , gplusGorillaMux , req )
284
288
}
285
- func BenchmarkGin_GPlus2Params (b * testing.B ) {
286
- req , _ := http .NewRequest ("GET" , "/people/118051310819094153327/activities/123456789" , nil )
287
- benchRequest (b , gplusGin , req )
288
- }
289
289
func BenchmarkHttpRouter_GPlus2Params (b * testing.B ) {
290
290
req , _ := http .NewRequest ("GET" , "/people/118051310819094153327/activities/123456789" , nil )
291
291
benchRequest (b , gplusHttpRouter , req )
@@ -330,6 +330,9 @@ func BenchmarkBeego_GPlusAll(b *testing.B) {
330
330
func BenchmarkDenco_GPlusAll (b * testing.B ) {
331
331
benchRoutes (b , gplusDenco , gplusAPI )
332
332
}
333
+ func BenchmarkGin_GPlusAll (b * testing.B ) {
334
+ benchRoutes (b , gplusGin , gplusAPI )
335
+ }
333
336
func BenchmarkGocraftWeb_GPlusAll (b * testing.B ) {
334
337
benchRoutes (b , gplusGocraftWeb , gplusAPI )
335
338
}
@@ -345,9 +348,6 @@ func BenchmarkGoRestful_GPlusAll(b *testing.B) {
345
348
func BenchmarkGorillaMux_GPlusAll (b * testing.B ) {
346
349
benchRoutes (b , gplusGorillaMux , gplusAPI )
347
350
}
348
- func BenchmarkGin_GPlusAll (b * testing.B ) {
349
- benchRoutes (b , gplusGin , gplusAPI )
350
- }
351
351
func BenchmarkHttpRouter_GPlusAll (b * testing.B ) {
352
352
benchRoutes (b , gplusHttpRouter , gplusAPI )
353
353
}
0 commit comments