Benchmark benchmarks the test scenario. Example: func BenchmarkListExample(b *testing.B) { scenario := tests.ApiScenario{ Name: "list example collection", Method: http.MethodGet, URL: "/api/collections/example/records", Expecte
(b *testing.B)
| 149 | // scenario.Benchmark(b) |
| 150 | // } |
| 151 | func (scenario *ApiScenario) Benchmark(b *testing.B) { |
| 152 | b.Run(scenario.normalizedName(), func(b *testing.B) { |
| 153 | for i := 0; i < b.N; i++ { |
| 154 | scenario.test(b) |
| 155 | } |
| 156 | }) |
| 157 | } |
| 158 | |
| 159 | func (scenario *ApiScenario) normalizedName() string { |
| 160 | var name = scenario.Name |
nothing calls this directly
no test coverage detected