-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
benchmark_test.go
622 lines (505 loc) · 17.2 KB
/
benchmark_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
package main
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
)
func testServeHTTP(b *testing.B, r route, router http.Handler) {
rec := httptest.NewRecorder()
req, err := http.NewRequest(http.MethodGet, r.reqPath, nil)
if err != nil {
b.Fatal(err)
}
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
router.ServeHTTP(rec, req)
if rec.Code != 200 {
panic(fmt.Sprintf("Request failed. path: %v request path:%v", r.path, r.reqPath))
}
}
}
func benchmark(b *testing.B, r route, router http.Handler) {
testServeHTTP(b, r, router)
}
// net/http#ServeMux
// https://pkg.go.dev/net/http#ServeMux
func BenchmarkStaticRoutesRootServeMux(b *testing.B) {
router := loadServeMux(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1ServeMux(b *testing.B) {
router := loadServeMux(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5ServeMux(b *testing.B) {
router := loadServeMux(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10ServeMux(b *testing.B) {
router := loadServeMux(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1BracketServeMux(b *testing.B) {
router := loadServeMux(pathParamRoutes1Bracket)
benchmark(b, pathParamRoutes1Bracket, router)
}
func BenchmarkPathParamRoutes5BracketServeMux(b *testing.B) {
router := loadServeMux(pathParamRoutes5Bracket)
benchmark(b, pathParamRoutes5Bracket, router)
}
func BenchmarkPathParamRoutes10BracketServeMux(b *testing.B) {
router := loadServeMux(pathParamRoutes10Bracket)
benchmark(b, pathParamRoutes10Bracket, router)
}
// bmf-san/goblin
// https://github.com/bmf-san/goblin
func BenchmarkStaticRoutesRootGoblin(b *testing.B) {
router := loadGoblin(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Goblin(b *testing.B) {
router := loadGoblin(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Goblin(b *testing.B) {
router := loadGoblin(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Goblin(b *testing.B) {
router := loadGoblin(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonGoblin(b *testing.B) {
router := loadGoblin(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonGoblin(b *testing.B) {
router := loadGoblin(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonGoblin(b *testing.B) {
router := loadGoblin(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// julienschmidt/httprouter
// https://github.com/julienschmidt/httprouter
func BenchmarkStaticRoutesRootHTTPRouter(b *testing.B) {
router := loadHTTPRouter(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1HTTPRouter(b *testing.B) {
router := loadHTTPRouter(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5HTTPRouter(b *testing.B) {
router := loadHTTPRouter(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10HTTPRouter(b *testing.B) {
router := loadHTTPRouter(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonHTTPRouter(b *testing.B) {
router := loadHTTPRouter(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonHTTPRouter(b *testing.B) {
router := loadHTTPRouter(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonHTTPRouter(b *testing.B) {
router := loadHTTPRouter(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// go-chi/chi
// https://github.com/go-chi/chi
func BenchmarkStaticRoutesRootChi(b *testing.B) {
router := loadChi(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Chi(b *testing.B) {
router := loadChi(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Chi(b *testing.B) {
router := loadChi(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Chi(b *testing.B) {
router := loadChi(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1BracketChi(b *testing.B) {
router := loadChi(pathParamRoutes1Bracket)
benchmark(b, pathParamRoutes1Bracket, router)
}
func BenchmarkPathParamRoutes5BracketChi(b *testing.B) {
router := loadChi(pathParamRoutes5Bracket)
benchmark(b, pathParamRoutes5Bracket, router)
}
func BenchmarkPathParamRoutes10BracketChi(b *testing.B) {
router := loadChi(pathParamRoutes10Bracket)
benchmark(b, pathParamRoutes10Bracket, router)
}
// gin-gonic/gin
// https://github.com/gin-gonic/gin
func BenchmarkStaticRoutesRootGin(b *testing.B) {
router := loadGin(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Gin(b *testing.B) {
router := loadGin(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Gin(b *testing.B) {
router := loadGin(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Gin(b *testing.B) {
router := loadGin(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonGin(b *testing.B) {
router := loadGin(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonGin(b *testing.B) {
router := loadGin(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonGin(b *testing.B) {
router := loadGin(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// uptrace/bunrouter
// https://github.com/uptrace/bunrouter
func BenchmarkStaticRoutesRootBunRouter(b *testing.B) {
router := loadBunRouter(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1BunRouter(b *testing.B) {
router := loadBunRouter(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5BunRouter(b *testing.B) {
router := loadBunRouter(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10BunRouter(b *testing.B) {
router := loadBunRouter(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonBunRouter(b *testing.B) {
router := loadBunRouter(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonBunRouter(b *testing.B) {
router := loadBunRouter(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonBunRouter(b *testing.B) {
router := loadBunRouter(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// dimfeld/httptreemux
// https://github.com/dimfeld/httptreemux
func BenchmarkStaticRoutesRootHTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1HTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5HTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10HTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonHTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonHTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonHTTPTreeMux(b *testing.B) {
router := loadHTTPTreeMux(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// beego/mux
// https://github.com/beego/mux
func BenchmarkStaticRoutesRootBeegoMux(b *testing.B) {
router := loadBeegoMux(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1BeegoMux(b *testing.B) {
router := loadBeegoMux(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5BeegoMux(b *testing.B) {
router := loadBeegoMux(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10BeegoMux(b *testing.B) {
router := loadBeegoMux(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonBeegoMux(b *testing.B) {
router := loadBeegoMux(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonBeegoMux(b *testing.B) {
router := loadBeegoMux(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonBeegoMux(b *testing.B) {
router := loadBeegoMux(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// gorilla/mux
// https://github.com/gorilla/mux
func BenchmarkStaticRoutesRootGorillaMux(b *testing.B) {
router := loadGorillaMux(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1GorillaMux(b *testing.B) {
router := loadGorillaMux(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5GorillaMux(b *testing.B) {
router := loadGorillaMux(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10GorillaMux(b *testing.B) {
router := loadGorillaMux(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1BracketGorillaMux(b *testing.B) {
router := loadGorillaMux(pathParamRoutes1Bracket)
benchmark(b, pathParamRoutes1Bracket, router)
}
func BenchmarkPathParamRoutes5BracketGorillaMux(b *testing.B) {
router := loadGorillaMux(pathParamRoutes5Bracket)
benchmark(b, pathParamRoutes5Bracket, router)
}
func BenchmarkPathParamRoutes10BracketGorillaMux(b *testing.B) {
router := loadGorillaMux(pathParamRoutes10Bracket)
benchmark(b, pathParamRoutes10Bracket, router)
}
// nissy/bon
// https://github.com/nissy/bon
func BenchmarkStaticRoutesRootBon(b *testing.B) {
router := loadBon(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Bon(b *testing.B) {
router := loadBon(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Bon(b *testing.B) {
router := loadBon(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Bon(b *testing.B) {
router := loadBon(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonBon(b *testing.B) {
router := loadBon(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonBon(b *testing.B) {
router := loadBon(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonBon(b *testing.B) {
router := loadBon(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// naoina/denco
// https://github.com/naoina/denco
func BenchmarkStaticRoutesRootDenco(b *testing.B) {
router := loadDenco(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Denco(b *testing.B) {
router := loadDenco(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Denco(b *testing.B) {
router := loadDenco(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Denco(b *testing.B) {
router := loadDenco(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonDenco(b *testing.B) {
router := loadDenco(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonDenco(b *testing.B) {
router := loadDenco(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonDenco(b *testing.B) {
router := loadDenco(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// labstack/echo
// https://github.com/labstack/echo
func BenchmarkStaticRoutesRootEcho(b *testing.B) {
router := loadEcho(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Echo(b *testing.B) {
router := loadEcho(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Echo(b *testing.B) {
router := loadEcho(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Echo(b *testing.B) {
router := loadEcho(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonEcho(b *testing.B) {
router := loadEcho(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonEcho(b *testing.B) {
router := loadEcho(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonEcho(b *testing.B) {
router := loadEcho(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// gocraft/web
// https://github.com/gocraft/web
func BenchmarkStaticRoutesRootGocraftWeb(b *testing.B) {
router := loadGocraftWeb(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1GocraftWeb(b *testing.B) {
router := loadGocraftWeb(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5GocraftWeb(b *testing.B) {
router := loadGocraftWeb(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10GocraftWeb(b *testing.B) {
router := loadGocraftWeb(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonGocraftWeb(b *testing.B) {
router := loadGocraftWeb(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonGocraftWeb(b *testing.B) {
router := loadGocraftWeb(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonGocraftWeb(b *testing.B) {
router := loadGocraftWeb(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}
// vardius/gorouter
// https://github.com/vardius/gorouter
func BenchmarkStaticRoutesRootGorouter(b *testing.B) {
router := loadGorouter(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1Gorouter(b *testing.B) {
router := loadGorouter(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5Gorouter(b *testing.B) {
router := loadGorouter(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10Gorouter(b *testing.B) {
router := loadGorouter(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1BracketGorouter(b *testing.B) {
router := loadGorouter(pathParamRoutes1Bracket)
benchmark(b, pathParamRoutes1Bracket, router)
}
func BenchmarkPathParamRoutes5BracketGorouter(b *testing.B) {
router := loadGorouter(pathParamRoutes5Bracket)
benchmark(b, pathParamRoutes5Bracket, router)
}
func BenchmarkPathParamRoutes10BracketGorouter(b *testing.B) {
router := loadGorouter(pathParamRoutes10Bracket)
benchmark(b, pathParamRoutes10Bracket, router)
}
// go-ozzo/ozzo-routing
// https://github.com/go-ozzo/ozzo-routing
func BenchmarkStaticRoutesRootOzzoRouting(b *testing.B) {
router := loadOzzoRouting(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1OzzoRouting(b *testing.B) {
router := loadOzzoRouting(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5OzzoRouting(b *testing.B) {
router := loadOzzoRouting(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10OzzoRouting(b *testing.B) {
router := loadOzzoRouting(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1InequalitySignOzzoRouting(b *testing.B) {
router := loadOzzoRouting(pathParamRoutes1InequalitySign)
benchmark(b, pathParamRoutes1InequalitySign, router)
}
func BenchmarkPathParamRoutes5InequalitySignOzzoRouting(b *testing.B) {
router := loadOzzoRouting(pathParamRoutes5InequalitySign)
benchmark(b, pathParamRoutes5InequalitySign, router)
}
func BenchmarkPathParamRoutes10InequalitySignOzzoRouting(b *testing.B) {
router := loadOzzoRouting(pathParamRoutes10InequalitySign)
benchmark(b, pathParamRoutes10InequalitySign, router)
}
// n9te9 router
// https://github.com/lkeix/techbook13-sample
func BenchmarkStaticRoutesRootN9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(staticRoutesRoot)
benchmark(b, staticRoutesRoot, router)
}
func BenchmarkStaticRoutes1ON9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(staticRoutes1)
benchmark(b, staticRoutes1, router)
}
func BenchmarkStaticRoutes5ON9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(staticRoutes5)
benchmark(b, staticRoutes5, router)
}
func BenchmarkStaticRoutes10N9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(staticRoutes10)
benchmark(b, staticRoutes10, router)
}
func BenchmarkPathParamRoutes1ColonN9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(pathParamRoutes1Colon)
benchmark(b, pathParamRoutes1Colon, router)
}
func BenchmarkPathParamRoutes5ColonN9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(pathParamRoutes5Colon)
benchmark(b, pathParamRoutes5Colon, router)
}
func BenchmarkPathParamRoutes10ColonN9tE9Routing(b *testing.B) {
router := loadN9tE9Routing(pathParamRoutes10Colon)
benchmark(b, pathParamRoutes10Colon, router)
}