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

noreply at rubyforge.org noreply at rubyforge.org
Mon Nov 5 17:48:58 EST 2007


Patches item #13943, was opened at 2007-09-14 17: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: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Ian Leitch (idl)
>Assigned to: Aslak Hellesøy (aslak_hellesoy)
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: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-11-05 17:48

Message:
Applied in r2815.
This supercedes http://rubyforge.org/tracker/index.php?func=detail&aid=14402&group_id=797&atid=3151 - which has been reverted in favour of this patch.

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

Comment By: Ian Leitch (idl)
Date: 2007-09-17 12:09

Message:
What do you guys think about committing this, anything you
want changing?

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

Comment By: Ian Leitch (idl)
Date: 2007-09-15 04: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-14 23: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