| 831 | } |
| 832 | |
| 833 | double CStat::computeRtdStdev(int which, int type) |
| 834 | { |
| 835 | unsigned long long count = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_COUNT]; |
| 836 | unsigned long long sum = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUM]; |
| 837 | unsigned long long sumsq = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUMSQ]; |
| 838 | |
| 839 | if (count <= 1) |
| 840 | return 0.0; |
| 841 | |
| 842 | double numerator = ((double)count * (double)sumsq) - (double)(sum * sum); |
| 843 | double denominator = (double)(count) * ((double)(count) - 1.0); |
| 844 | |
| 845 | return sqrt(numerator/denominator); |
| 846 | } |
| 847 | |
| 848 | void CStat::updateAverageCounter(E_CounterName P_SumCounter, |
| 849 | E_CounterName P_NbOfCallUsed, |
nothing calls this directly
no outgoing calls
no test coverage detected