| 18 | } |
| 19 | |
| 20 | void Result::CalcMetrics() |
| 21 | { |
| 22 | if (!m_time.empty()) |
| 23 | { |
| 24 | sort(m_time.begin(), m_time.end()); |
| 25 | |
| 26 | m_max = m_time.back(); |
| 27 | m_med = m_time[m_time.size() / 2]; |
| 28 | m_all = accumulate(m_time.begin(), m_time.end(), 0.0); |
| 29 | m_avg = m_all / m_time.size(); |
| 30 | |
| 31 | m_time.clear(); |
| 32 | } |
| 33 | else |
| 34 | m_all = -1.0; |
| 35 | } |
| 36 | |
| 37 | void AllResult::Print() |
| 38 | { |