MCPcopy
hub / github.com/gin-gonic/gin / BenchmarkParallelGithubDefault

Function BenchmarkParallelGithubDefault

githubapi_test.go:462–476  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

460}
461
462func BenchmarkParallelGithubDefault(b *testing.B) {
463 DefaultWriter = os.Stdout
464 router := New()
465 githubConfigRouter(router)
466
467 req, _ := http.NewRequest(http.MethodPost, "/repos/manucorporat/sse/git/blobs", nil)
468
469 b.RunParallel(func(pb *testing.PB) {
470 // Each goroutine has its own bytes.Buffer.
471 for pb.Next() {
472 w := httptest.NewRecorder()
473 router.ServeHTTP(w, req)
474 }
475 })
476}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
githubConfigRouterFunction · 0.85
NextMethod · 0.80
ServeHTTPMethod · 0.45

Tested by

no test coverage detected