MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / BenchmarkCaptcha_VerifyCode_200_100

Function BenchmarkCaptcha_VerifyCode_200_100

internal/waf/captcha_test.go:56–70  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

54}
55
56func BenchmarkCaptcha_VerifyCode_200_100(b *testing.B) {
57 runtime.GOMAXPROCS(4)
58
59 b.RunParallel(func(pb *testing.PB) {
60 for pb.Next() {
61 var id = captcha.NewLen(6)
62 var writer = &bytes.Buffer{}
63 err := captcha.WriteImage(writer, id, 200, 100)
64 if err != nil {
65 b.Fatal(err)
66 }
67 _ = id
68 }
69 })
70}

Callers

nothing calls this directly

Calls 2

NextMethod · 0.80
WriteImageMethod · 0.80

Tested by

no test coverage detected