예제 #1
0
static void display_statistics(
    std::ostream& out,
    datalog::context& ctx,
    datalog::rule_set& orig_rules,
    datalog::instruction_block& code,
    datalog::execution_context& ex_ctx,
    bool verbose
    ) 
{
    g_piece_timer.stop();
    unsigned t_other = static_cast<int>(g_piece_timer.get_seconds()*1000);
    g_overall_time.stop();

    code.process_all_costs();
    {
        params_ref p;
        p.set_bool("output_profile", true);
        p.set_uint("profile_milliseconds_threshold", 100);
        ctx.updt_params(p);

        out << "--------------\n";
        out << "original rules\n";
        orig_rules.display(out);

        out << "---------------\n";
        out << "generated rules\n";
        ctx.display_rules(out);

        out << "--------------\n";
        out << "instructions  \n";
        code.display(*ctx.get_rel_context(), out);

        out << "--------------\n";
        out << "big relations \n";
        ex_ctx.report_big_relations(1000, out);
    }
    out << "--------------\n";
    out << "relation sizes\n";
    ctx.get_rel_context()->get_rmanager().display_relation_sizes(out);

    if (verbose) {
        out << "--------------\n";
        out << "rules\n";
        ctx.display_rules(out);
    }

    out << "Time: " << static_cast<int>(g_overall_time.get_seconds()*1000) << "ms\n";
    out << "Parsing: " << t_parsing << "ms, other: " << t_other << "ms\n";
}
예제 #2
0
 ~imp() {
     m_watch.stop();
     double end_memory = static_cast<double>(memory::get_allocation_size())/static_cast<double>(1024*1024);
     m_out << "(" << m_msg << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds() 
           << " :before-memory " << std::fixed << std::setprecision(2) << m_start_memory 
           << " :after-memory " << std::fixed << std::setprecision(2) << end_memory << ")" 
           << std::endl;
 }
예제 #3
0
 ~imp() {
     m_watch.stop();
     double end_memory = static_cast<double>(memory::get_allocation_size())/static_cast<double>(1024*1024);
     verbose_stream() << "(" << m_id
                      << " :num-exprs " << m_goal.num_exprs()
                      << " :num-asts " << m_goal.m().get_num_asts()
                      << " :time " << std::fixed << std::setprecision(2) << m_watch.get_seconds()
                      << " :before-memory " << std::fixed << std::setprecision(2) << m_start_memory
                      << " :after-memory " << std::fixed << std::setprecision(2) << end_memory
                      << ")" << std::endl;
 }