MCPcopy
hub / github.com/pocketbase/pocketbase / Benchmark

Method Benchmark

tests/api.go:151–157  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

149// scenario.Benchmark(b)
150// }
151func (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
159func (scenario *ApiScenario) normalizedName() string {
160 var name = scenario.Name

Callers

nothing calls this directly

Calls 3

normalizedNameMethod · 0.95
testMethod · 0.95
RunMethod · 0.45

Tested by

no test coverage detected