| 25 | } |
| 26 | |
| 27 | std::string LatencyTestSessionResult::toString() |
| 28 | { |
| 29 | std::ostringstream result; |
| 30 | result.imbue(std::locale(result.getloc(), new Tests::HumanNumberFacet())); |
| 31 | |
| 32 | if (m_exception) |
| 33 | result << "Run: FAILED: " << m_exception.get().what(); |
| 34 | else |
| 35 | { |
| 36 | auto humanDuration = Tests::DurationHumanizer::deduceHumanDuration(duration()); |
| 37 | |
| 38 | result << "Run: " |
| 39 | << "Duration (" << humanDuration.shortUnitName << "): " << std::setprecision(3) << humanDuration.value |
| 40 | << ", Latency: "; |
| 41 | m_latencyRecorder->writeReport(result); |
| 42 | } |
| 43 | |
| 44 | return result.str(); |
| 45 | } |
| 46 | |
| 47 | ClockConfig::Duration LatencyTestSessionResult::duration() const |
| 48 | { |