Ejemplo n.º 1
0
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{})
		})
	}
}
Ejemplo n.º 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)
}
Ejemplo n.º 3
0
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{})
	})
}
Ejemplo n.º 4
0
func benchmark(b *testing.B, im *imageserver.Image, params imageserver.Params) {
	enc := &Encoder{}
	imageserver_image_test.BenchmarkEncoder(b, enc, im, params)
}
Ejemplo n.º 5
0
func benchmark(b *testing.B, enc *Encoder, im *imageserver.Image) {
	params := imageserver.Params{}
	imageserver_image_test.BenchmarkEncoder(b, enc, im, params)
}
Ejemplo n.º 6
0
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)
	})
}