Skip to content

Commit

Permalink
refactor(test): bench
Browse files Browse the repository at this point in the history
  • Loading branch information
h2non committed Apr 3, 2016
1 parent 318642e commit dbf85ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ func TestMethodPatch(t *testing.T) {
func BenchmarkPatternMatching(b *testing.B) {
p := New()
p.Get("/hello/:name").Handle(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))

b.ResetTimer()
for n := 0; n < b.N; n++ {
b.StopTimer()
r := newRequest("GET", "/hello/blake", nil)
Expand Down

0 comments on commit dbf85ba

Please sign in to comment.