(b *testing.B)
| 39 | } |
| 40 | |
| 41 | func BenchmarkCaptcha_VerifyCode_100_50(b *testing.B) { |
| 42 | runtime.GOMAXPROCS(4) |
| 43 | |
| 44 | b.RunParallel(func(pb *testing.PB) { |
| 45 | for pb.Next() { |
| 46 | var id = captcha.NewLen(6) |
| 47 | var writer = &bytes.Buffer{} |
| 48 | err := captcha.WriteImage(writer, id, 100, 50) |
| 49 | if err != nil { |
| 50 | b.Fatal(err) |
| 51 | } |
| 52 | } |
| 53 | }) |
| 54 | } |
| 55 | |
| 56 | func BenchmarkCaptcha_VerifyCode_200_100(b *testing.B) { |
| 57 | runtime.GOMAXPROCS(4) |
nothing calls this directly
no test coverage detected