forked from julienschmidt/go-http-routing-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
github_test.go
806 lines (780 loc) · 27.3 KB
/
github_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
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
// Copyright 2013 Julien Schmidt. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file.
package main
import (
"net/http"
"testing"
)
// http://developer.github.com/v3/
var githubAPI = []route{
// OAuth Authorizations
{"GET", "/authorizations"},
{"GET", "/authorizations/:id"},
{"POST", "/authorizations"},
//{"PUT", "/authorizations/clients/:client_id"},
//{"PATCH", "/authorizations/:id"},
{"DELETE", "/authorizations/:id"},
{"GET", "/applications/:client_id/tokens/:access_token"},
{"DELETE", "/applications/:client_id/tokens"},
{"DELETE", "/applications/:client_id/tokens/:access_token"},
// Activity
{"GET", "/events"},
{"GET", "/repos/:owner/:repo/events"},
{"GET", "/networks/:owner/:repo/events"},
{"GET", "/orgs/:org/events"},
{"GET", "/users/:user/received_events"},
{"GET", "/users/:user/received_events/public"},
{"GET", "/users/:user/events"},
{"GET", "/users/:user/events/public"},
{"GET", "/users/:user/events/orgs/:org"},
{"GET", "/feeds"},
{"GET", "/notifications"},
{"GET", "/repos/:owner/:repo/notifications"},
{"PUT", "/notifications"},
{"PUT", "/repos/:owner/:repo/notifications"},
{"GET", "/notifications/threads/:id"},
//{"PATCH", "/notifications/threads/:id"},
{"GET", "/notifications/threads/:id/subscription"},
{"PUT", "/notifications/threads/:id/subscription"},
{"DELETE", "/notifications/threads/:id/subscription"},
{"GET", "/repos/:owner/:repo/stargazers"},
{"GET", "/users/:user/starred"},
{"GET", "/user/starred"},
{"GET", "/user/starred/:owner/:repo"},
{"PUT", "/user/starred/:owner/:repo"},
{"DELETE", "/user/starred/:owner/:repo"},
{"GET", "/repos/:owner/:repo/subscribers"},
{"GET", "/users/:user/subscriptions"},
{"GET", "/user/subscriptions"},
{"GET", "/repos/:owner/:repo/subscription"},
{"PUT", "/repos/:owner/:repo/subscription"},
{"DELETE", "/repos/:owner/:repo/subscription"},
{"GET", "/user/subscriptions/:owner/:repo"},
{"PUT", "/user/subscriptions/:owner/:repo"},
{"DELETE", "/user/subscriptions/:owner/:repo"},
// Gists
{"GET", "/users/:user/gists"},
{"GET", "/gists"},
//{"GET", "/gists/public"},
//{"GET", "/gists/starred"},
{"GET", "/gists/:id"},
{"POST", "/gists"},
//{"PATCH", "/gists/:id"},
{"PUT", "/gists/:id/star"},
{"DELETE", "/gists/:id/star"},
{"GET", "/gists/:id/star"},
{"POST", "/gists/:id/forks"},
{"DELETE", "/gists/:id"},
// Git Data
{"GET", "/repos/:owner/:repo/git/blobs/:sha"},
{"POST", "/repos/:owner/:repo/git/blobs"},
{"GET", "/repos/:owner/:repo/git/commits/:sha"},
{"POST", "/repos/:owner/:repo/git/commits"},
//{"GET", "/repos/:owner/:repo/git/refs/*ref"},
{"GET", "/repos/:owner/:repo/git/refs"},
{"POST", "/repos/:owner/:repo/git/refs"},
//{"PATCH", "/repos/:owner/:repo/git/refs/*ref"},
//{"DELETE", "/repos/:owner/:repo/git/refs/*ref"},
{"GET", "/repos/:owner/:repo/git/tags/:sha"},
{"POST", "/repos/:owner/:repo/git/tags"},
{"GET", "/repos/:owner/:repo/git/trees/:sha"},
{"POST", "/repos/:owner/:repo/git/trees"},
// Issues
{"GET", "/issues"},
{"GET", "/user/issues"},
{"GET", "/orgs/:org/issues"},
{"GET", "/repos/:owner/:repo/issues"},
{"GET", "/repos/:owner/:repo/issues/:number"},
{"POST", "/repos/:owner/:repo/issues"},
//{"PATCH", "/repos/:owner/:repo/issues/:number"},
{"GET", "/repos/:owner/:repo/assignees"},
{"GET", "/repos/:owner/:repo/assignees/:assignee"},
{"GET", "/repos/:owner/:repo/issues/:number/comments"},
//{"GET", "/repos/:owner/:repo/issues/comments"},
//{"GET", "/repos/:owner/:repo/issues/comments/:id"},
{"POST", "/repos/:owner/:repo/issues/:number/comments"},
//{"PATCH", "/repos/:owner/:repo/issues/comments/:id"},
//{"DELETE", "/repos/:owner/:repo/issues/comments/:id"},
{"GET", "/repos/:owner/:repo/issues/:number/events"},
//{"GET", "/repos/:owner/:repo/issues/events"},
//{"GET", "/repos/:owner/:repo/issues/events/:id"},
{"GET", "/repos/:owner/:repo/labels"},
{"GET", "/repos/:owner/:repo/labels/:name"},
{"POST", "/repos/:owner/:repo/labels"},
//{"PATCH", "/repos/:owner/:repo/labels/:name"},
{"DELETE", "/repos/:owner/:repo/labels/:name"},
{"GET", "/repos/:owner/:repo/issues/:number/labels"},
{"POST", "/repos/:owner/:repo/issues/:number/labels"},
{"DELETE", "/repos/:owner/:repo/issues/:number/labels/:name"},
{"PUT", "/repos/:owner/:repo/issues/:number/labels"},
{"DELETE", "/repos/:owner/:repo/issues/:number/labels"},
{"GET", "/repos/:owner/:repo/milestones/:number/labels"},
{"GET", "/repos/:owner/:repo/milestones"},
{"GET", "/repos/:owner/:repo/milestones/:number"},
{"POST", "/repos/:owner/:repo/milestones"},
//{"PATCH", "/repos/:owner/:repo/milestones/:number"},
{"DELETE", "/repos/:owner/:repo/milestones/:number"},
// Miscellaneous
{"GET", "/emojis"},
{"GET", "/gitignore/templates"},
{"GET", "/gitignore/templates/:name"},
{"POST", "/markdown"},
{"POST", "/markdown/raw"},
{"GET", "/meta"},
{"GET", "/rate_limit"},
// Organizations
{"GET", "/users/:user/orgs"},
{"GET", "/user/orgs"},
{"GET", "/orgs/:org"},
//{"PATCH", "/orgs/:org"},
{"GET", "/orgs/:org/members"},
{"GET", "/orgs/:org/members/:user"},
{"DELETE", "/orgs/:org/members/:user"},
{"GET", "/orgs/:org/public_members"},
{"GET", "/orgs/:org/public_members/:user"},
{"PUT", "/orgs/:org/public_members/:user"},
{"DELETE", "/orgs/:org/public_members/:user"},
{"GET", "/orgs/:org/teams"},
{"GET", "/teams/:id"},
{"POST", "/orgs/:org/teams"},
//{"PATCH", "/teams/:id"},
{"DELETE", "/teams/:id"},
{"GET", "/teams/:id/members"},
{"GET", "/teams/:id/members/:user"},
{"PUT", "/teams/:id/members/:user"},
{"DELETE", "/teams/:id/members/:user"},
{"GET", "/teams/:id/repos"},
{"GET", "/teams/:id/repos/:owner/:repo"},
{"PUT", "/teams/:id/repos/:owner/:repo"},
{"DELETE", "/teams/:id/repos/:owner/:repo"},
{"GET", "/user/teams"},
// Pull Requests
{"GET", "/repos/:owner/:repo/pulls"},
{"GET", "/repos/:owner/:repo/pulls/:number"},
{"POST", "/repos/:owner/:repo/pulls"},
//{"PATCH", "/repos/:owner/:repo/pulls/:number"},
{"GET", "/repos/:owner/:repo/pulls/:number/commits"},
{"GET", "/repos/:owner/:repo/pulls/:number/files"},
{"GET", "/repos/:owner/:repo/pulls/:number/merge"},
{"PUT", "/repos/:owner/:repo/pulls/:number/merge"},
{"GET", "/repos/:owner/:repo/pulls/:number/comments"},
//{"GET", "/repos/:owner/:repo/pulls/comments"},
//{"GET", "/repos/:owner/:repo/pulls/comments/:number"},
{"PUT", "/repos/:owner/:repo/pulls/:number/comments"},
//{"PATCH", "/repos/:owner/:repo/pulls/comments/:number"},
//{"DELETE", "/repos/:owner/:repo/pulls/comments/:number"},
// Repositories
{"GET", "/user/repos"},
{"GET", "/users/:user/repos"},
{"GET", "/orgs/:org/repos"},
{"GET", "/repositories"},
{"POST", "/user/repos"},
{"POST", "/orgs/:org/repos"},
{"GET", "/repos/:owner/:repo"},
//{"PATCH", "/repos/:owner/:repo"},
{"GET", "/repos/:owner/:repo/contributors"},
{"GET", "/repos/:owner/:repo/languages"},
{"GET", "/repos/:owner/:repo/teams"},
{"GET", "/repos/:owner/:repo/tags"},
{"GET", "/repos/:owner/:repo/branches"},
{"GET", "/repos/:owner/:repo/branches/:branch"},
{"DELETE", "/repos/:owner/:repo"},
{"GET", "/repos/:owner/:repo/collaborators"},
{"GET", "/repos/:owner/:repo/collaborators/:user"},
{"PUT", "/repos/:owner/:repo/collaborators/:user"},
{"DELETE", "/repos/:owner/:repo/collaborators/:user"},
{"GET", "/repos/:owner/:repo/comments"},
{"GET", "/repos/:owner/:repo/commits/:sha/comments"},
{"POST", "/repos/:owner/:repo/commits/:sha/comments"},
{"GET", "/repos/:owner/:repo/comments/:id"},
//{"PATCH", "/repos/:owner/:repo/comments/:id"},
{"DELETE", "/repos/:owner/:repo/comments/:id"},
{"GET", "/repos/:owner/:repo/commits"},
{"GET", "/repos/:owner/:repo/commits/:sha"},
{"GET", "/repos/:owner/:repo/readme"},
//{"GET", "/repos/:owner/:repo/contents/*path"},
//{"PUT", "/repos/:owner/:repo/contents/*path"},
//{"DELETE", "/repos/:owner/:repo/contents/*path"},
//{"GET", "/repos/:owner/:repo/:archive_format/:ref"},
{"GET", "/repos/:owner/:repo/keys"},
{"GET", "/repos/:owner/:repo/keys/:id"},
{"POST", "/repos/:owner/:repo/keys"},
//{"PATCH", "/repos/:owner/:repo/keys/:id"},
{"DELETE", "/repos/:owner/:repo/keys/:id"},
{"GET", "/repos/:owner/:repo/downloads"},
{"GET", "/repos/:owner/:repo/downloads/:id"},
{"DELETE", "/repos/:owner/:repo/downloads/:id"},
{"GET", "/repos/:owner/:repo/forks"},
{"POST", "/repos/:owner/:repo/forks"},
{"GET", "/repos/:owner/:repo/hooks"},
{"GET", "/repos/:owner/:repo/hooks/:id"},
{"POST", "/repos/:owner/:repo/hooks"},
//{"PATCH", "/repos/:owner/:repo/hooks/:id"},
{"POST", "/repos/:owner/:repo/hooks/:id/tests"},
{"DELETE", "/repos/:owner/:repo/hooks/:id"},
{"POST", "/repos/:owner/:repo/merges"},
{"GET", "/repos/:owner/:repo/releases"},
{"GET", "/repos/:owner/:repo/releases/:id"},
{"POST", "/repos/:owner/:repo/releases"},
//{"PATCH", "/repos/:owner/:repo/releases/:id"},
{"DELETE", "/repos/:owner/:repo/releases/:id"},
{"GET", "/repos/:owner/:repo/releases/:id/assets"},
{"GET", "/repos/:owner/:repo/stats/contributors"},
{"GET", "/repos/:owner/:repo/stats/commit_activity"},
{"GET", "/repos/:owner/:repo/stats/code_frequency"},
{"GET", "/repos/:owner/:repo/stats/participation"},
{"GET", "/repos/:owner/:repo/stats/punch_card"},
{"GET", "/repos/:owner/:repo/statuses/:ref"},
{"POST", "/repos/:owner/:repo/statuses/:ref"},
// Search
{"GET", "/search/repositories"},
{"GET", "/search/code"},
{"GET", "/search/issues"},
{"GET", "/search/users"},
{"GET", "/legacy/issues/search/:owner/:repository/:state/:keyword"},
{"GET", "/legacy/repos/search/:keyword"},
{"GET", "/legacy/user/search/:keyword"},
{"GET", "/legacy/user/email/:email"},
// Users
{"GET", "/users/:user"},
{"GET", "/user"},
//{"PATCH", "/user"},
{"GET", "/users"},
{"GET", "/user/emails"},
{"POST", "/user/emails"},
{"DELETE", "/user/emails"},
{"GET", "/users/:user/followers"},
{"GET", "/user/followers"},
{"GET", "/users/:user/following"},
{"GET", "/user/following"},
{"GET", "/user/following/:user"},
{"GET", "/users/:user/following/:target_user"},
{"PUT", "/user/following/:user"},
{"DELETE", "/user/following/:user"},
{"GET", "/users/:user/keys"},
{"GET", "/user/keys"},
{"GET", "/user/keys/:id"},
{"POST", "/user/keys"},
//{"PATCH", "/user/keys/:id"},
{"DELETE", "/user/keys/:id"},
}
var (
githubAce http.Handler
githubAero http.Handler
githubBear http.Handler
githubBeego http.Handler
githubBone http.Handler
githubChi http.Handler
githubCloudyKitRouter http.Handler
githubDenco http.Handler
githubEcho http.Handler
githubGin http.Handler
githubGocraftWeb http.Handler
githubGoji http.Handler
githubGojiv2 http.Handler
githubGoJsonRest http.Handler
githubGoRestful http.Handler
githubGorillaMux http.Handler
githubGowwwRouter http.Handler
githubHttpRouter http.Handler
githubHttpTreeMux http.Handler
githubJin http.Handler
githubKocha http.Handler
githubLARS http.Handler
githubMacaron http.Handler
githubMartini http.Handler
githubPat http.Handler
githubPossum http.Handler
githubR2router http.Handler
githubRevel http.Handler
githubRivet http.Handler
githubTango http.Handler
githubTigerTonic http.Handler
githubTraffic http.Handler
githubVulcan http.Handler
// githubZeus http.Handler
)
func init() {
println("#GithubAPI Routes:", len(githubAPI))
calcMem("Ace", func() {
githubAce = loadAce(githubAPI)
})
calcMem("Aero", func() {
githubAero = loadAero(githubAPI)
})
calcMem("Bear", func() {
githubBear = loadBear(githubAPI)
})
calcMem("Beego", func() {
githubBeego = loadBeego(githubAPI)
})
calcMem("Bone", func() {
githubBone = loadBone(githubAPI)
})
calcMem("Chi", func() {
githubChi = loadChi(githubAPI)
})
calcMem("CloudyKitRouter", func() {
githubCloudyKitRouter = loadCloudyKitRouter(githubAPI)
})
calcMem("Denco", func() {
githubDenco = loadDenco(githubAPI)
})
calcMem("Echo", func() {
githubEcho = loadEcho(githubAPI)
})
calcMem("Gin", func() {
githubGin = loadGin(githubAPI)
})
calcMem("GocraftWeb", func() {
githubGocraftWeb = loadGocraftWeb(githubAPI)
})
calcMem("Goji", func() {
githubGoji = loadGoji(githubAPI)
})
calcMem("Gojiv2", func() {
githubGojiv2 = loadGojiv2(githubAPI)
})
calcMem("GoJsonRest", func() {
githubGoJsonRest = loadGoJsonRest(githubAPI)
})
calcMem("GoRestful", func() {
githubGoRestful = loadGoRestful(githubAPI)
})
calcMem("GorillaMux", func() {
githubGorillaMux = loadGorillaMux(githubAPI)
})
calcMem("GowwwRouter", func() {
githubGowwwRouter = loadGowwwRouter(githubAPI)
})
calcMem("HttpRouter", func() {
githubHttpRouter = loadHttpRouter(githubAPI)
})
calcMem("HttpTreeMux", func() {
githubHttpTreeMux = loadHttpTreeMux(githubAPI)
})
calcMem("Jin", func() {
githubJin = loadJin(githubAPI)
})
calcMem("Kocha", func() {
githubKocha = loadKocha(githubAPI)
})
calcMem("LARS", func() {
githubLARS = loadLARS(githubAPI)
})
calcMem("Macaron", func() {
githubMacaron = loadMacaron(githubAPI)
})
calcMem("Martini", func() {
githubMartini = loadMartini(githubAPI)
})
calcMem("Pat", func() {
githubPat = loadPat(githubAPI)
})
calcMem("Possum", func() {
githubPossum = loadPossum(githubAPI)
})
calcMem("R2router", func() {
githubR2router = loadR2router(githubAPI)
})
// calcMem("Revel", func() {
// githubRevel = loadRevel(githubAPI)
// })
calcMem("Rivet", func() {
githubRivet = loadRivet(githubAPI)
})
calcMem("Tango", func() {
githubTango = loadTango(githubAPI)
})
calcMem("TigerTonic", func() {
githubTigerTonic = loadTigerTonic(githubAPI)
})
calcMem("Traffic", func() {
githubTraffic = loadTraffic(githubAPI)
})
calcMem("Vulcan", func() {
githubVulcan = loadVulcan(githubAPI)
})
// calcMem("Zeus", func() {
// githubZeus = loadZeus(githubAPI)
// })
println()
}
// Static
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)
}
func BenchmarkBeego_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubBeego, req)
}
func BenchmarkBone_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubBone, req)
}
func BenchmarkCloudyKitRouter_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubCloudyKitRouter, req)
}
func BenchmarkChi_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubChi, req)
}
func BenchmarkDenco_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubDenco, req)
}
func BenchmarkEcho_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubEcho, req)
}
func BenchmarkGin_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGin, req)
}
func BenchmarkGocraftWeb_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGocraftWeb, req)
}
func BenchmarkGoji_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGoji, req)
}
func BenchmarkGojiv2_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGojiv2, req)
}
func BenchmarkGoRestful_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGoRestful, req)
}
func BenchmarkGoJsonRest_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGoJsonRest, req)
}
func BenchmarkGorillaMux_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGorillaMux, req)
}
func BenchmarkGowwwRouter_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubGowwwRouter, req)
}
func BenchmarkHttpRouter_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubHttpRouter, req)
}
func BenchmarkHttpTreeMux_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubHttpTreeMux, req)
}
func BenchmarkJin_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubJin, req)
}
func BenchmarkKocha_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubKocha, req)
}
func BenchmarkLARS_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubLARS, req)
}
func BenchmarkMacaron_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubMacaron, req)
}
func BenchmarkMartini_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubMartini, req)
}
func BenchmarkPat_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubPat, req)
}
func BenchmarkPossum_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubPossum, req)
}
func BenchmarkR2router_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubR2router, req)
}
// func BenchmarkRevel_GithubStatic(b *testing.B) {
// req, _ := http.NewRequest("GET", "/user/repos", nil)
// benchRequest(b, githubRevel, req)
// }
func BenchmarkRivet_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubRivet, req)
}
func BenchmarkTango_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubTango, req)
}
func BenchmarkTigerTonic_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubTigerTonic, req)
}
func BenchmarkTraffic_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubTraffic, req)
}
func BenchmarkVulcan_GithubStatic(b *testing.B) {
req, _ := http.NewRequest("GET", "/user/repos", nil)
benchRequest(b, githubVulcan, req)
}
// func BenchmarkZeus_GithubStatic(b *testing.B) {
// req, _ := http.NewRequest("GET", "/user/repos", nil)
// benchRequest(b, githubZeus, req)
// }
// Param
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)
}
func BenchmarkBeego_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubBeego, req)
}
func BenchmarkBone_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubBone, req)
}
func BenchmarkChi_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubChi, req)
}
func BenchmarkCloudyKitRouter_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubCloudyKitRouter, req)
}
func BenchmarkDenco_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubDenco, req)
}
func BenchmarkEcho_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubEcho, req)
}
func BenchmarkGin_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGin, req)
}
func BenchmarkGocraftWeb_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGocraftWeb, req)
}
func BenchmarkGoji_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGoji, req)
}
func BenchmarkGojiv2_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGojiv2, req)
}
func BenchmarkGoJsonRest_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGoJsonRest, req)
}
func BenchmarkGoRestful_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGoRestful, req)
}
func BenchmarkGorillaMux_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGorillaMux, req)
}
func BenchmarkGowwwRouter_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubGowwwRouter, req)
}
func BenchmarkHttpRouter_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubHttpRouter, req)
}
func BenchmarkHttpTreeMux_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubHttpTreeMux, req)
}
func BenchmarkJin_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubJin, req)
}
func BenchmarkKocha_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubKocha, req)
}
func BenchmarkLARS_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubLARS, req)
}
func BenchmarkMacaron_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubMacaron, req)
}
func BenchmarkMartini_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubMartini, req)
}
func BenchmarkPat_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubPat, req)
}
func BenchmarkPossum_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubPossum, req)
}
func BenchmarkR2router_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubR2router, req)
}
// func BenchmarkRevel_GithubParam(b *testing.B) {
// req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
// benchRequest(b, githubRevel, req)
// }
func BenchmarkRivet_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubRivet, req)
}
func BenchmarkTango_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubTango, req)
}
func BenchmarkTigerTonic_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubTigerTonic, req)
}
func BenchmarkTraffic_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubTraffic, req)
}
func BenchmarkVulcan_GithubParam(b *testing.B) {
req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
benchRequest(b, githubVulcan, req)
}
// func BenchmarkZeus_GithubParam(b *testing.B) {
// req, _ := http.NewRequest("GET", "/repos/julienschmidt/httprouter/stargazers", nil)
// benchRequest(b, githubZeus, req)
// }
// All routes
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)
}
func BenchmarkBeego_GithubAll(b *testing.B) {
benchRoutes(b, githubBeego, githubAPI)
}
func BenchmarkBone_GithubAll(b *testing.B) {
benchRoutes(b, githubBone, githubAPI)
}
func BenchmarkChi_GithubAll(b *testing.B) {
benchRoutes(b, githubChi, githubAPI)
}
func BenchmarkCloudyKitRouter_GithubAll(b *testing.B) {
benchRoutes(b, githubCloudyKitRouter, githubAPI)
}
func BenchmarkDenco_GithubAll(b *testing.B) {
benchRoutes(b, githubDenco, githubAPI)
}
func BenchmarkEcho_GithubAll(b *testing.B) {
benchRoutes(b, githubEcho, githubAPI)
}
func BenchmarkGin_GithubAll(b *testing.B) {
benchRoutes(b, githubGin, githubAPI)
}
func BenchmarkGocraftWeb_GithubAll(b *testing.B) {
benchRoutes(b, githubGocraftWeb, githubAPI)
}
func BenchmarkGoji_GithubAll(b *testing.B) {
benchRoutes(b, githubGoji, githubAPI)
}
func BenchmarkGojiv2_GithubAll(b *testing.B) {
benchRoutes(b, githubGojiv2, githubAPI)
}
func BenchmarkGoJsonRest_GithubAll(b *testing.B) {
benchRoutes(b, githubGoJsonRest, githubAPI)
}
func BenchmarkGoRestful_GithubAll(b *testing.B) {
benchRoutes(b, githubGoRestful, githubAPI)
}
func BenchmarkGorillaMux_GithubAll(b *testing.B) {
benchRoutes(b, githubGorillaMux, githubAPI)
}
func BenchmarkGowwwRouter_GithubAll(b *testing.B) {
benchRoutes(b, githubGowwwRouter, githubAPI)
}
func BenchmarkHttpRouter_GithubAll(b *testing.B) {
benchRoutes(b, githubHttpRouter, githubAPI)
}
func BenchmarkHttpTreeMux_GithubAll(b *testing.B) {
benchRoutes(b, githubHttpTreeMux, githubAPI)
}
func BenchmarkJin_GithubAll(b *testing.B) {
benchRoutes(b, githubJin, githubAPI)
}
func BenchmarkKocha_GithubAll(b *testing.B) {
benchRoutes(b, githubKocha, githubAPI)
}
func BenchmarkLARS_GithubAll(b *testing.B) {
benchRoutes(b, githubLARS, githubAPI)
}
func BenchmarkMacaron_GithubAll(b *testing.B) {
benchRoutes(b, githubMacaron, githubAPI)
}
func BenchmarkMartini_GithubAll(b *testing.B) {
benchRoutes(b, githubMartini, githubAPI)
}
func BenchmarkPat_GithubAll(b *testing.B) {
benchRoutes(b, githubPat, githubAPI)
}
func BenchmarkPossum_GithubAll(b *testing.B) {
benchRoutes(b, githubPossum, githubAPI)
}
func BenchmarkR2router_GithubAll(b *testing.B) {
benchRoutes(b, githubR2router, githubAPI)
}
// func BenchmarkRevel_GithubAll(b *testing.B) {
// benchRoutes(b, githubRevel, githubAPI)
// }
func BenchmarkRivet_GithubAll(b *testing.B) {
benchRoutes(b, githubRivet, githubAPI)
}
func BenchmarkTango_GithubAll(b *testing.B) {
benchRoutes(b, githubTango, githubAPI)
}
func BenchmarkTigerTonic_GithubAll(b *testing.B) {
benchRoutes(b, githubTigerTonic, githubAPI)
}
func BenchmarkTraffic_GithubAll(b *testing.B) {
benchRoutes(b, githubTraffic, githubAPI)
}
func BenchmarkVulcan_GithubAll(b *testing.B) {
benchRoutes(b, githubVulcan, githubAPI)
}
// func BenchmarkZeus_GithubAll(b *testing.B) {
// benchRoutes(b, githubZeus, githubAPI)
// }