| 1 | // Copyright 2011 Dmitry Chestnykh. All rights reserved. |
| 2 | // Use of this source code is governed by a MIT-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | package captcha |
| 6 | |
| 7 | import "testing" |
| 8 | |
| 9 | func BenchmarkNewImage(b *testing.B) { |
| 10 | d := RandomDigits(DefaultLen) |
| 11 | id := randomID() |
| 12 | |
| 13 | for b.Loop() { |
| 14 | NewImage(id, d, StdWidth, StdHeight) |
| 15 | } |
| 16 | } |