perkeep/pkg/images
Bill Thiede 59ab7e0075 pkg/images: add benchmark for resizing images.
Sample run on my computer:
$ go test -bench . -benchmem
PASS
BenchmarkRescale1000To50              50          45211076 ns/op           92224 B/op          3 allocs/op
BenchmarkRescale1000To100             50          45182185 ns/op          364608 B/op          3 allocs/op
BenchmarkRescale1000To200             50          46602272 ns/op         1445952 B/op          3 allocs/op
BenchmarkRescale1000To400             50          61513579 ns/op         5763136 B/op          3 allocs/op
BenchmarkRescale1000To800             20         104372086 ns/op        23040064 B/op          3 allocs/op
BenchmarkRescale2000To50              10         179838094 ns/op           92224 B/op          3 allocs/op
BenchmarkRescale2000To100             10         180684898 ns/op          364608 B/op          3 allocs/op
BenchmarkRescale2000To200             10         181488279 ns/op         1445952 B/op          3 allocs/op
BenchmarkRescale2000To400             10         186902466 ns/op         5763136 B/op          3 allocs/op
BenchmarkRescale2000To800             10         246418484 ns/op        23040064 B/op          3 allocs/op
BenchmarkRescale4000To50            2000           1305587 ns/op          133251 B/op          5 allocs/op
BenchmarkRescale4000To100            500           5179999 ns/op          528512 B/op          5 allocs/op
BenchmarkRescale4000To200            100          20733512 ns/op         2089088 B/op          5 allocs/op
BenchmarkRescale4000To400             20          82820323 ns/op         8323200 B/op          5 allocs/op
BenchmarkRescale4000To800              5         333289471 ns/op        33280128 B/op          5 allocs/op
BenchmarkRescale8000To50            2000           1397384 ns/op          133251 B/op          5 allocs/op
BenchmarkRescale8000To100            500           5219709 ns/op          528515 B/op          5 allocs/op
BenchmarkRescale8000To200            100          20863617 ns/op         2089089 B/op          5 allocs/op
BenchmarkRescale8000To400             20          83260367 ns/op         8323200 B/op          5 allocs/op
BenchmarkRescale8000To800              5         331035176 ns/op        33280128 B/op          5 allocs/op
ok      camlistore.org/pkg/images       46.780s

Change-Id: Iab21f28f06681faf44b01a75c3bb8b23fb508a81
2013-12-08 22:39:49 -08:00
..
testdata images: move rescaling from server/image to pkg/images 2013-02-18 16:44:41 +01:00
bench_test.go pkg/images: add benchmark for resizing images. 2013-12-08 22:39:49 -08:00
images.go Document environment variables usage. 2013-09-06 21:54:03 -07:00
images_test.go images: move rescaling from server/image to pkg/images 2013-02-18 16:44:41 +01:00