| 127 | } |
| 128 | |
| 129 | void CostAnalyzer::SortOpsByTime(std::map<string, OpPerfSummary> ops) { |
| 130 | for (const auto& op : ops) { |
| 131 | ops_.push_back(op.second); |
| 132 | } |
| 133 | struct CompareByTime { |
| 134 | bool operator()(const OpPerfSummary& a, const OpPerfSummary& b) const { |
| 135 | return a.time > b.time; |
| 136 | } |
| 137 | }; |
| 138 | std::stable_sort(ops_.begin(), ops_.end(), CompareByTime()); |
| 139 | } |
| 140 | |
| 141 | void CostAnalyzer::AnalyzeCosts() { |
| 142 | std::map<string, OpPerfSummary> ops; |
nothing calls this directly
no test coverage detected