(B *testing.B)
| 60 | } |
| 61 | |
| 62 | func BenchmarkOneRouteHTML(B *testing.B) { |
| 63 | router := New() |
| 64 | t := template.Must(template.New("index").Parse(` |
| 65 | <html><body><h1>{{.}}</h1></body></html>`)) |
| 66 | router.SetHTMLTemplate(t) |
| 67 | |
| 68 | router.GET("/html", func(c *Context) { |
| 69 | c.HTML(http.StatusOK, "index", "hola") |
| 70 | }) |
| 71 | runRequest(B, router, http.MethodGet, "/html") |
| 72 | } |
| 73 | |
| 74 | func BenchmarkOneRouteSet(B *testing.B) { |
| 75 | router := New() |
nothing calls this directly
no test coverage detected