[rspec-users] Spec time reporting precision

David Chelimsky dchelimsky at gmail.com
Wed Dec 30 10:26:15 EST 2009


On Wed, Dec 30, 2009 at 6:20 AM, Ronald Chaplin <t73net at t73.biz> wrote:

> Hey all,
> So I woke up early this morning, and was running some tests through
> autospec, and it returned a time as follows:
>
> Finished in 0.0151600000000001 seconds
>
> I know that there are alot of other more important issues being
> addressed right now for the rspec project, (2.0 for Rails 3.0). However,
> do we really need this level of precision for spec tests? I know that
> it's nice to see if your refactoring made any changes in overall
> performance. But do we really need it carried out to 16 decimal places?
> Just seems like over kill to me.
>

Hey Ronald,

Is this actually causing you pain? RSpec isn't doing anything special to get
16 decimal places here. It just uses Timeout from the standard lib, which
offers no API for precision. Reducing the precision would require additional
code in RSpec, and _that_ seems like overkill to me :)

Cheers,
David

One solution I had thought about was simply having a boolean switch
> option for rspec called precise, wherein it would print shortened, less
> precise times for those who wanted it. I'd even be willing to do the leg
> work/patches for it if this doesn't seem like a crazy idea.
>
> Just  self.trying_to + something.useful?
>
> --
> Ronald Chaplin <t73net at t73.biz>
> T73 Biz
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091230/d6157d42/attachment.html>


More information about the rspec-users mailing list