minio/bench_test.go
Frederick F. Kautz IV 00f86a28a8 Squashed 'third_party/src/github.com/gorilla/mux/' content from commit e444e69
git-subtree-dir: third_party/src/github.com/gorilla/mux
git-subtree-split: e444e69cbd2e2e3e0749a2f3c717cec491552bbf
2014-11-01 21:02:55 -07:00

22 lines
496 B
Go

// Copyright 2012 The Gorilla Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mux
import (
"net/http"
"testing"
)
func BenchmarkMux(b *testing.B) {
router := new(Router)
handler := func(w http.ResponseWriter, r *http.Request) {}
router.HandleFunc("/v1/{v1}", handler)
request, _ := http.NewRequest("GET", "/v1/anything", nil)
for i := 0; i < b.N; i++ {
router.ServeHTTP(nil, request)
}
}