(b *testing.B)
| 27 | } |
| 28 | |
| 29 | func BenchmarkRenderCompressed(b *testing.B) { |
| 30 | startFakeBookingApp() |
| 31 | resp := httptest.NewRecorder() |
| 32 | resp.Body = nil |
| 33 | c := NewTestController(resp, showRequest) |
| 34 | if err := c.SetAction("Hotels", "Show"); err != nil { |
| 35 | b.Errorf("SetAction failed: %s", err) |
| 36 | } |
| 37 | Config.SetOption("results.compressed", "true") |
| 38 | b.ResetTimer() |
| 39 | |
| 40 | hotels := Hotels{c} |
| 41 | for i := 0; i < b.N; i++ { |
| 42 | hotels.Show(3).Apply(c.Request, c.Response) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func BenchmarkRenderUnCompressed(b *testing.B) { |
| 47 | startFakeBookingApp() |
nothing calls this directly
no test coverage detected