(B *testing.B)
| 49 | } |
| 50 | |
| 51 | func BenchmarkOneRouteJSON(B *testing.B) { |
| 52 | router := New() |
| 53 | data := struct { |
| 54 | Status string `json:"status"` |
| 55 | }{"ok"} |
| 56 | router.GET("/json", func(c *Context) { |
| 57 | c.JSON(http.StatusOK, data) |
| 58 | }) |
| 59 | runRequest(B, router, http.MethodGet, "/json") |
| 60 | } |
| 61 | |
| 62 | func BenchmarkOneRouteHTML(B *testing.B) { |
| 63 | router := New() |
nothing calls this directly
no test coverage detected