Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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;
}