[rspec-users] Spec/Test Speed

M. Edward (Ed) Borasky znmeb at cesmail.net
Thu Oct 4 01:03:59 EDT 2007


Scott Taylor wrote:
>> If your test suite and application are fully open source and you don't
>> mind someone playing with it, I'm collecting benchmark suites for the
>> Ruby interpreter and would love to have a nice heavy "rspec" run as an
>> example of real-world Ruby usage. Contact me off-list if you're
>> interested, or if you want me to show you how to profile the Ruby
>> interpreter itself on your test case.
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
> 
> Unfortunately, the app isn't open source, although I do have one  
> other app, and a rails plugins which both have specs:
> 
> http://rubyforge.org/projects/replacefixtures/
> http://rubyforge.org/projects/datedbackup/
> 
> Those don't hit a database, so they are incredibly fast:
> 
> Finished in 0.19639 seconds
> 
> 257 examples, 2 failures, 4 pending
> 
> I'm going to give the profiler a shot, plus compiling ruby from  
> source (I'm using the fink package manager, after having ditched  
> darwin ports).  I'll see where that leaves me.
> 
> As for running the profiler - is there an easy way to wrap the blocks/ 
> closures given to an 'it' example with the profiler?  (I haven't  
> contacted you off list since I'm sure others would benefit from this  
> information).
> 
> Other, more general ideas are still welcome...
> 
> Scott
> 
> 
> 
> 
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
> 

Ah ... you're on a Mac ... Intel or PPC? If Intel, you might want to 
look into their VTune tool (I think it runs on MacOS). Even if you don't 
have the latest whiz-bang multi-core Intel chip, VTune will tell you 
stuff you probably never knew you should care about.

(I'm an Intel-free zone, and so I use AMD's CodeAnalyst.) :)

Database, eh? Maybe you should be recompiling the database from source 
too. PostgreSQL? MySQL? There are *lots* of tweaking gizmos for them, 
plus a benchmark called "MySQL Super Smack".


More information about the rspec-users mailing list