void benchAnalyzingEdges(CallGraph& graph) { Infos infos; Analyzer analyzer(graph, infos); Timer timer; CallSiteIterator cit, cend; for (boost::tie(cit, cend) = graph.callSites(); cit != cend; ++cit) { analyzer.computeCallSiteTemperature(*cit); } analyzeEdges += timer.elapsed(); }
void benchForeachEdges(const CallGraph& graph) { double sum = 0; Timer timer; CallSiteIterator first, last; for (boost::tie(first, last) = graph.callSites(); first != last; ++first) { sum += graph[*first].temperature; } foreachEdges += timer.elapsed(); fakeSum += sum; }