Slow tests

John Arbash Meinel john at arbash-meinel.com
Thu Sep 17 13:50:49 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Thu, 2009-09-17 at 14:50 +1000, Martin Pool wrote:
> 
>> I think so too, and I think the thing is to establish a rhythm of
>> fixing at least some of them.
>>
>> That mail is not very readable at first, at least on my laptop's screen.
> 
> Its generated by
> bzr pull lp:bzr && make && ./bzr --no-plugins selftest --subunit |
> subunit-ls --times | sort -n -k2 | tail -n 30 | mail -s 'Slow tests'
> bazaar at l.c.c
> 
> We can process it as much further as we like :)
> 
>> I presume those are the total runtimes in seconds?  Why not sort by
>> time, put the time first, and truncate it to %.3f? Oh, apparently it
>> is sorted by time, but with the least-important first. ;-)
> 
> Adding -r & using head will get the slowest first. I'll do that for the
> next one.
> 
>> time grep "assert " bzrlib/**/*py takes 100ms on my laptop so there
>> seems considerable room for improvement from 30000ms.
> 
> Yup. That was run on my desktop, which is still importing my netbeans
> memory dump; its possble there was IO noise. Never-the-less, it did take
> that long :).
> 
> -Rob

assert tests run slow because it compiles the AST and walks it, rather
than just grepping the source code for 'assert'.

I assumed that this was an explicit decision by Martin when he wrote the
test, but yes, that is a very slow one.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqyMKkACgkQJdeBCYSNAAPNNgCfTjhLgFcyluyBGKXzhYR37LTc
emkAnjrW48P9Wa97eG9y/Lpk6bSGMy03
=L8gE
-----END PGP SIGNATURE-----



More information about the bazaar mailing list