avgtime - Small D util for your everyday benchmarking needs
Nick Sabalausky
a at a.a
Thu Mar 22 22:25:48 PDT 2012
"Juan Manuel Cabo" <juanmanuel.cabo at gmail.com> wrote in message
news:mytcmgglyntqsoybjcfz at forum.dlang.org...
> On Thursday, 22 March 2012 at 22:22:31 UTC, Andrei Alexandrescu wrote:
>>
>> Sweet! You may want to also print the mode of the distribution, which is
>> the time of the maximum sample density.
>> http://en.wikipedia.org/wiki/Mode_(statistics) (Warning: nontrivial but
>> informative.)
>>
>>
>> Andrei
>
> Thanks for your feedback!
>
>> Sweet! You may want to also print the mode of the distribution, [....]
>
> Done!. Just pushed it to github. I made a histogram too!!
> (man, the gaussian curve is everywhere, it never ceases to
> perplex me). The histogram bins are the most significant digits
> (three "automatic" levels of precision, with rounding and
> casting tricks).
>
> But I think the most important change is that I'm now showing
> the 95% and 99% confidence intervals. (For the confidence intervals
> to mean anything, please everyone, remember to control
> your variables (don't defrag and benchmark :-) !!) so that apples
> are still apples and don't become oranges, and make sure N>30).
>
> More info on histogram and confidence intervals in the
> usage help.
>
>
> avgtime -q -h -r400 ls /etc
>
> ------------------------
> Total time (ms): 2751.96
> Repetitions : 400
> Sample mode : 6.9 (79 ocurrences)
> Median time : 6.945
> Avg time : 6.8799
> Std dev. : 0.93927
> Minimum : 3.7
> Maximum : 16.36
> 95% conf.int. : [6.78786, 6.97195] e = 0.0920468
> 99% conf.int. : [6.75893, 7.00087] e = 0.12097
> Histogram :
> msecs: count normalized bar
> 3.7: 2 #
> 3.8: 4 ##
> 3.9: 1
> 4.0: 1
> 4.2: 4 ##
> 4.3: 1
> 4.4: 1
> 4.5: 2 #
> 4.6: 3 #
> 4.7: 2 #
> 4.8: 3 #
> 4.9: 3 #
> 5.2: 1
> 5.3: 2 #
> 6.1: 1
> 6.2: 1
> 6.3: 4 ##
> 6.4: 6 ###
> 6.5: 14 #######
> 6.6: 21 ##########
> 6.7: 31 ###############
> 6.8: 50 #########################
> 6.9: 79 ########################################
> 7.0: 48 ########################
> 7.1: 29 ##############
> 7.2: 22 ###########
> 7.3: 13 ######
> 7.4: 8 ####
> 7.5: 7 ###
> 7.6: 12 ######
> 7.7: 6 ###
> 7.8: 6 ###
> 7.9: 2 #
> 8.0: 3 #
> 8.1: 1
> 8.2: 1
> 8.7: 1
> 8.8: 1
> 9.1: 1
> 11.5: 1
> 16.3: 1
>
>
Wow, that's just fantastic! Really, this should be a standard system tool.
I think this guy would be proud:
http://zedshaw.com/essays/programmer_stats.html
More information about the Digitalmars-d-announce
mailing list