[rspec-users] Spec time reporting precision

Ronald Chaplin t73net at t73.biz
Wed Dec 30 11:26:49 EST 2009

On Wed, 2009-12-30 at 09:26 -0600, David Chelimsky wrote:
> 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 :)

Hey David,
Great book btw. I'm learning so much and it has really helped me in my
newbie days to ruby.

No, it's not a pain. Just seemed like overkill that it would report to
such a finite decimal place is all. I guess that's the PHPer in me
ackking @ the wasted numbers :p

Ronald Chaplin <t73net at t73.biz>
T73 Biz
> 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 

More information about the rspec-users mailing list