I have attached a patch to stat.cpp and stat.hpp that: (1) Changes the type of M_counters to unsigned long long from unsigned long (2) Instead of tracking the count , average, and average of the squares in M_counters and the sum and sum of squares separately in individual instance variables just tracks the count, sum, and sum of squares in the M_counters array. (3) Creates a new function, computeMean that calculates the mean when required (i.e., when it is displayed) rather than on every single update.
This has a few advantages: (1) Because it uses unsigned long long exclusively there is no reason to worry about lost precision anywhere. (2) We only need to do the division for averages when it is needed, the rest of the time we can just add. Also, I couldn't locate where the periodic sums were reset; so either I missed that spot in the original code or there was a bug. I also have a few questions/notes that I want to get some opinions on: (1) The -trace_rtt option uses a different method of calculating the RTTs than the RTD partitions and averages, would it make sense to unify the two so that the observed and computed values are in sync? (2) The update_nb option seems to take great care to avoid calling getmilliseconds() on every loop. Is there a particular system that this call is very expensive on? (3) The -trace_rtt option provides sub millisecond resolution, would it make sense to provide that same resolution for the timing loop, and RTD counters? Charles -- Dr. Charles P. Wright Research Staff Member Network Server Systems Software IBM T.J. Watson Research Center
stdev.diff
Description: Binary data
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Sipp-users mailing list Sipp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sipp-users