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

Function BenchmarkParallelGithub

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

Source from the content-addressed store, hash-verified

444}
445
446func BenchmarkParallelGithub(b *testing.B) {
447 DefaultWriter = os.Stdout
448 router := New()
449 githubConfigRouter(router)
450
451 req, _ := http.NewRequest(http.MethodPost, "/repos/manucorporat/sse/git/blobs", nil)
452
453 b.RunParallel(func(pb *testing.PB) {
454 // Each goroutine has its own bytes.Buffer.
455 for pb.Next() {
456 w := httptest.NewRecorder()
457 router.ServeHTTP(w, req)
458 }
459 })
460}
461
462func BenchmarkParallelGithubDefault(b *testing.B) {
463 DefaultWriter = os.Stdout

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