| 250 | } |
| 251 | |
| 252 | std::string StatsCalculator::GetOutputString() const { |
| 253 | std::stringstream stream; |
| 254 | if (options_.show_run_order) { |
| 255 | stream << GetStatsByMetric("Run Order", BY_RUN_ORDER, |
| 256 | options_.run_order_limit); |
| 257 | } |
| 258 | if (options_.show_time) { |
| 259 | stream << GetStatsByMetric("Top by Computation Time", BY_TIME, |
| 260 | options_.time_limit); |
| 261 | } |
| 262 | if (options_.show_memory) { |
| 263 | stream << GetStatsByMetric("Top by Memory Use", BY_MEMORY, |
| 264 | options_.memory_limit); |
| 265 | } |
| 266 | if (options_.show_type) { |
| 267 | stream << GetStatsByNodeType(); |
| 268 | } |
| 269 | if (options_.show_summary) { |
| 270 | stream << GetShortSummary() << std::endl; |
| 271 | } |
| 272 | return stream.str(); |
| 273 | } |
| 274 | |
| 275 | void StatsCalculator::AddNodeStats(const std::string& name, |
| 276 | const std::string& type, int64_t run_order, |
no outgoing calls