watery01 / libyuv

Automatically exported from code.google.com/p/libyuv
0 stars 0 forks source link

unittests take too long to run #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The number of unittests has grown to 466 tests.
On slower CPU's they take a long time to run, even with 1 iteration.

Suggest reducing resolution

Using sed "s/\(.*(\)\([0-9]*\)\( ms)\)/\2 - \1\2\3/g"   | \cygwin\bin\sort -rn  
 | grep ms
to sort, this is the result on a linux box

c:\src\libyuv\trunk>sed "s/\(.*(\)\([0-9]*\)\( ms)\)/\2 - \1\2\3/g"   | 
\cygwin\bin\sort -rn   | grep ms
658 - [       OK ] libyuvTest.RotatePlane270 (658 ms)
517 - [       OK ] libyuvTest.RotatePlane90 (517 ms)
392 - [       OK ] libyuvTest.RotatePlane180 (392 ms)
356 - [       OK ] libyuvTest.Transpose (356 ms)
192 - [       OK ] libyuvTest.RotateUV180 (192 ms)
186 - [       OK ] libyuvTest.RotateUV270 (186 ms)
182 - [       OK ] libyuvTest.RotateUV90 (182 ms)
136 - [       OK ] libyuvTest.TransposeUV (136 ms)
90 - [       OK ] libyuvTest.ARGBScaleTo1366x768 (90 ms)
59 - [       OK ] libyuvTest.ScaleTo1366x768 (59 ms)
38 - [       OK ] libyuvTest.ARGBScaleTo853x480 (38 ms)
24 - [       OK ] libyuvTest.ScaleTo853x480 (24 ms)
20 - [       OK ] libyuvTest.RotatePlane90and270 (20 ms)
20 - [       OK ] libyuvTest.RotatePlane90Pitch (20 ms)
20 - [       OK ] libyuvTest.RotatePlane270Pitch (20 ms)
17 - [       OK ] libyuvTest.TestDjb2 (17 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy8 (5 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy4 (5 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy38 (5 ms)

Original issue reported on code.google.com by fbarch...@google.com on 24 Oct 2012 at 7:26

GoogleCodeExporter commented 9 years ago
rotate has its own width/height variables which are set to 128x128

  for (iw = 16; iw < rotate_max_w_ && !err; iw += 2) {
    for (ih = 8; ih < rotate_max_h_ && !err; ++ih) {

and the tests exhaustively try all resolutions up to that size.
suggest testing 1 size, but settable.

Original comment by fbarch...@google.com on 24 Oct 2012 at 7:40

GoogleCodeExporter commented 9 years ago
djb2 had hard coded size.  removed the 'test' and use benchmark, which respects 
size and compares properly.
hard coded destination sizes for scale makes sense, but extremely large sizes 
removed.
c:\src\libyuv\trunk>sed "s/\(.*(\)\([0-9]*\)\( ms)\)/\2 - \1\2\3/g"   | 
\cygwin\bin\sort -rn   | grep ms
90 - [       OK ] libyuvTest.ARGBScaleTo1366x768 (90 ms)
59 - [       OK ] libyuvTest.ScaleTo1366x768 (59 ms)
38 - [       OK ] libyuvTest.ARGBScaleTo853x480 (38 ms)
25 - [       OK ] libyuvTest.ScaleTo853x480 (25 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy5 (5 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy34 (5 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy2 (5 ms)
5 - [       OK ] libyuvTest.ARGBScaleDownBy16 (5 ms)
4 - [       OK ] libyuvTest.ARGBScaleDownBy8 (4 ms)
4 - [       OK ] libyuvTest.ARGBScaleDownBy4 (4 ms)
4 - [       OK ] libyuvTest.ARGBScaleDownBy38 (4 ms)
3 - [       OK ] libyuvTest.Ssim (3 ms)
3 - [       OK ] libyuvTest.ARGBRotate90 (3 ms)
3 - [       OK ] libyuvTest.ARGBRotate180_Odd (3 ms)

Original comment by fbarch...@google.com on 24 Oct 2012 at 7:44

GoogleCodeExporter commented 9 years ago
linux reduced to: 465 tests from 1 test case ran. (950 ms total)
arm test 464 tests from 1 test case ran. (2172 ms total)

Original comment by fbarch...@google.com on 25 Oct 2012 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by fbarch...@chromium.org on 25 Oct 2012 at 9:37