avgtime - Small D util for your everyday benchmarking needs

Juan Manuel Cabo juanmanuel.cabo at gmail.com
Wed Mar 21 17:32:30 PDT 2012


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




More information about the Digitalmars-d-announce mailing list