avgtime - Small D util for your everyday benchmarking needs
Tove
tove at fransson.se
Wed Mar 21 18:37:18 PDT 2012
On Thursday, 22 March 2012 at 00:32:31 UTC, Juan Manuel Cabo
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
>
> 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
Awesome, I do have a tiny feature request for the next version...
a commandline switch to enable automatically discarding the first
run as an outlier.
/Tove
More information about the Digitalmars-d-announce
mailing list