From 20c6afea041e3ac148114d9b7ad2a53b7421b561 Mon Sep 17 00:00:00 2001 From: jst Date: Mon, 15 Sep 2014 11:58:05 +0200 Subject: [PATCH] Remove unnecessary benchmark --- resize_test.go | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/resize_test.go b/resize_test.go index 41f8f46..ef14c66 100644 --- a/resize_test.go +++ b/resize_test.go @@ -3,16 +3,14 @@ package resize import ( "image" "image/color" - "image/png" - "os" - //"runtime" + "runtime" "testing" ) var img = image.NewGray16(image.Rect(0, 0, 3, 3)) func init() { - //runtime.GOMAXPROCS(runtime.NumCPU()) + runtime.GOMAXPROCS(runtime.NumCPU()) img.Set(1, 1, color.White) } @@ -125,21 +123,3 @@ func Benchmark_LargeJpegThumbLanczos2(b *testing.B) { func Benchmark_LargeJpegThumbLanczos3(b *testing.B) { jpegThumb(b, Lanczos3) } - -func Benchmark_LargeN(b *testing.B) { - file, _ := os.Open("M94A0467.png") - defer file.Close() - img, _ := png.Decode(file) - var output image.Image - - b.ResetTimer() - for i := 0; i < b.N; i++ { - output = Resize(900, 0, img, Bicubic) - } - b.StopTimer() - - output.At(0, 0) - outPng, _ := os.Create("out.png") - defer outPng.Close() - png.Encode(outPng, output) -}