avgtime - Small D util for your everyday benchmarking needs

Brad Anderson eco at gnuk.net
Thu Mar 29 10:49:11 PDT 2012


On Wed, Mar 21, 2012 at 6:32 PM, Juan Manuel Cabo <juanmanuel.cabo at gmail.com
> wrote:

> This is a small util I wrote in D which is like the unix
> 'time' command but can repeat the command N times and show
> median, average, standard deviation, minimum and maximum.
>
> As you all know, it is not proper to conclude that
> a program is faster than another program by running
> them just once.
>
> It's BOOST and is in github:
>
>    https://github.com/jmcabo/**avgtime <https://github.com/jmcabo/avgtime>
>
> Example:
>
>
>    avgtime -r 10 -q ls -lR /etc
>
>    ------------------------
>    Total time (ms): 933.742
>    Repetitions    : 10
>    Median time    : 90.505
>    Avg time       : 93.3742
>    Std dev.       : 4.66808
>    Minimum        : 88.732
>    Maximum        : 101.225
>
> The -q argument pipes stderr and stdout of the program
> under test to /dev/null
>
> I put more info in the github page.
>
>
> HAVE FUN!!
>
> --jm
>
>
>
Nice tool.  I used it here:
http://www.reddit.com/r/programming/comments/rif9x/uniform_function_call_syntax_for_the_d/c46bjs7?context=2

It'd be neat if it could create comparison statistics between
the execution of two different programs so you could compare the
performance of changes or alternative approaches to the same problem as I
was doing.

Regards,
Brad Anderson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20120329/451aa63a/attachment.html>


More information about the Digitalmars-d-announce mailing list