[rspec-devel] [ rspec-Patches-13943 ] ProfileFormatter (Top 10 slowest examples)

noreply at rubyforge.org noreply at rubyforge.org
Sat Sep 15 04:47:52 EDT 2007


Patches item #13943, was opened at 2007-09-14 21:44
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=13943&group_id=797

Category: runner module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Ian Leitch (idl)
Assigned to: Nobody (None)
Summary: ProfileFormatter (Top 10 slowest examples)

Initial Comment:
At work we have roughly 1600 examples, and they take about 45 seconds to run; a bit too long.

Upgrading from 1.0.5 to 1.0.8 actually almost doubled the time it takes for our specs to run, though I haven't had the time to investigate what particular change (s) introduced the new overhead.

In an attempt to improve this situation, I've created a simple formatter (attached) that times each example and produces a list of the 10 slowest. It turns out that our slowest examples are in the 0.4 seconds range, way too slow for a single example. Unsurprisingly, most of them are Rails view specs, and I suspect the rendering and response body parsing is to blame here. I plan to investigate this further down the stack and see if there is any low hanging fruit to be had.

Cheers
Ian Leitch

----------------------------------------------------------------------

>Comment By: Ian Leitch (idl)
Date: 2007-09-15 08:47

Message:
It extends ProgressBarFormatter just to give the user some
indication of progress while it's running.

----------------------------------------------------------------------

Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-09-15 03:26

Message:
Very nice. A small comment - why is it extending ProgressBarFormatter?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3151&aid=13943&group_id=797


More information about the rspec-devel mailing list