Exemplo n.º 1
0
    void
    WriteResults (Results &results)
    {
        Results::Dictionary& results_dict = results.GetDictionary();
        
        m_time_set_bp_main.WriteAverageAndStandardDeviation(results);
        results_dict.Add ("memory-change-create-target",
                          "Memory increase that occurs due to creating the target.",
                          m_memory_change_create_target.GetDeltaValue().GetResult(NULL, NULL));
        
        results_dict.Add ("memory-change-break-main",
                          "Memory increase that occurs due to setting a breakpoint at main by name.",
                          m_memory_change_break_main.GetDeltaValue().GetResult(NULL, NULL));

        m_time_create_target.WriteAverageAndStandardDeviation(results);
        m_expr_first_evaluate.WriteAverageAndStandardDeviation(results);
        m_expr_frame_zero.WriteAverageAndStandardDeviation(results);
        m_expr_frame_non_zero.WriteAverageAndStandardDeviation(results);
        results_dict.Add ("memory-total-break-main",
                          "The total memory that the current process is using after setting the first breakpoint.",
                          m_memory_total.GetStopValue().GetResult(NULL, NULL));
        
        results_dict.AddDouble("time-launch-stop-main",
                               "The time it takes to launch the process and stop at main.",
                               m_time_launch_stop_main.GetDeltaValue());

        results_dict.AddDouble("time-total",
                               "The time it takes to create the target, set breakpoint at main, launch clang and hit the breakpoint at main.",
                               m_time_total.GetDeltaValue());
        results.Write(GetResultFilePath());
    }