Hi, Check this out. PowerBook:~/Projects/gamefest/trunk joe$ time rake <snip> Started ............................. Finished in 8.136012 seconds. 29 tests, 63 assertions, 0 failures, 0 errors <snip> Started .......................... Finished in 6.780027 seconds. 26 tests, 285 assertions, 0 failures, 0 errors real 0m28.893s user 0m10.610s sys 0m2.755s Almost 30 seconds to do around 55 tests and 350 assertations. That seems a little slow. I''m doing the tests on a 1.33 ghz Powerbook using mysql 4.1 as the database. Anything I can do to speed them up?
I''d look at the disk utilization first. Laptop disks are notoriously slow because of power costs and small size. You''ve got 29 seconds of real time and 14 seconds of CPU time (user + sys). That leaves 15 seconds of disk time. How much memory does the computer have? If it isn''t maxed out on RAM, you can probably bring the real time down by adding some memory. More memory means less I/O. Joe Van Dyk wrote:>Hi, > >Check this out. > >PowerBook:~/Projects/gamefest/trunk joe$ time rake ><snip> >Started >............................. >Finished in 8.136012 seconds. > >29 tests, 63 assertions, 0 failures, 0 errors > ><snip> >Started >.......................... >Finished in 6.780027 seconds. > >26 tests, 285 assertions, 0 failures, 0 errors > > > >real 0m28.893s >user 0m10.610s >sys 0m2.755s > >Almost 30 seconds to do around 55 tests and 350 assertations. That >seems a little slow. I''m doing the tests on a 1.33 ghz Powerbook >using mysql 4.1 as the database. > >Anything I can do to speed them up? >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- M. Edward (Ed) Borasky http://www.borasky-research.net/ http://borasky-research.blogspot.com/ http://pdxneurosemantics.com http://pdx-sales-coach.com http://algocompsynth.com
> >Almost 30 seconds to do around 55 tests and 350 assertations. That > >seems a little slow. I''m doing the tests on a 1.33 ghz Powerbook > >using mysql 4.1 as the database. > > > >Anything I can do to speed them up?I always turn on transactional fixtures and turn off instantiated fixtures. I find that speeds things up a lot. Moviing from mysql (MYISAM dbs) -> postgresql and making those 2 settings cut the testing time in half. I did have to make some changes to my tests since the models aren''t instantiated, however. -- rick http://techno-weenie.net
On 10/2/05, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > >Almost 30 seconds to do around 55 tests and 350 assertations. That > > >seems a little slow. I''m doing the tests on a 1.33 ghz Powerbook > > >using mysql 4.1 as the database. > > > > > >Anything I can do to speed them up? > > I always turn on transactional fixtures and turn off instantiated > fixtures. I find that speeds things up a lot. Moviing from mysql > (MYISAM dbs) -> postgresql and making those 2 settings cut the testing > time in half. > > I did have to make some changes to my tests since the models aren''t > instantiated, however.Can you give more details on that? What do you mean by transactional and instantiated fixtures?
> Can you give more details on that? What do you mean by transactional > and instantiated fixtures? >http://rails.rubyonrails.com/classes/Fixtures.html talks about it, as does the rails book if you have it handy. -- rick http://techno-weenie.net
On 10/1/05, Joe Van Dyk <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Check this out. > > PowerBook:~/Projects/gamefest/trunk joe$ time rake > <snip> > Started > ............................. > Finished in 8.136012 seconds. > > 29 tests, 63 assertions, 0 failures, 0 errors > > <snip> > Started > .......................... > Finished in 6.780027 seconds. > > 26 tests, 285 assertions, 0 failures, 0 errors > > > > real 0m28.893s > user 0m10.610s > sys 0m2.755s > > Almost 30 seconds to do around 55 tests and 350 assertations. That > seems a little slow. I''m doing the tests on a 1.33 ghz Powerbook > using mysql 4.1 as the database. > > Anything I can do to speed them up? >joe@big:~/projects/gamefest/trunk$ time rake <snip> Started ............................. Finished in 1.163847 seconds. 29 tests, 63 assertions, 0 failures, 0 errors <snip> Started .......................... Finished in 1.439797 seconds. 26 tests, 285 assertions, 0 failures, 0 errors real 0m6.683s user 0m5.046s sys 0m0.882s Pretty decent speed improvement, huh? Amazing what moving to 64 bit linux on a A64 3000+ with 2 gigs of ram will do for you. :-)