func Benchmark(b *testing.B) {
	for _, tc := range []struct {
		name string
		im   *imageserver.Image
	}{
		{"Small", testdata.Small},
		{"Medium", testdata.Medium},
		{"Large", testdata.Large},
		{"Huge", testdata.Huge},
	} {
		b.Run(tc.name, func(b *testing.B) {
			imageserver_image_test.BenchmarkEncoder(b, &Encoder{}, tc.im, imageserver.Params{})
		})
	}
}
Exemple #2
0
func benchmark(b *testing.B, im *imageserver.Image) {
	enc := &Encoder{}
	params := imageserver.Params{}
	b.ResetTimer()
	imageserver_image_test.BenchmarkEncoder(b, enc, im, params)
}
func benchmark(b *testing.B, name string, enc *Encoder, im *imageserver.Image) {
	b.Run(name, func(b *testing.B) {
		imageserver_image_test.BenchmarkEncoder(b, enc, im, imageserver.Params{})
	})
}
Exemple #4
0
func benchmark(b *testing.B, im *imageserver.Image, params imageserver.Params) {
	enc := &Encoder{}
	imageserver_image_test.BenchmarkEncoder(b, enc, im, params)
}
Exemple #5
0
func benchmark(b *testing.B, enc *Encoder, im *imageserver.Image) {
	params := imageserver.Params{}
	imageserver_image_test.BenchmarkEncoder(b, enc, im, params)
}
func benchmark(b *testing.B, name string, im *imageserver.Image, params imageserver.Params) {
	b.Run(name, func(b *testing.B) {
		imageserver_image_test.BenchmarkEncoder(b, &Encoder{}, im, params)
	})
}