GUI RPC: add cpu_time (as well as elapsed_time) to OLD_RESULT

This commit is contained in:
David Anderson 2013-10-18 00:46:48 -07:00
parent fd743ee556
commit f3ffbf67f4
4 changed files with 6 additions and 0 deletions

View File

@ -613,6 +613,7 @@ void add_old_result(RESULT& r) {
strcpy(ores.result_name, r.name);
strcpy(ores.app_name, r.app->name);
ores.elapsed_time = r.final_elapsed_time;
ores.cpu_time = r.final_cpu_time;
ores.completed_time = r.completed_time;
ores.create_time = gstate.now;
ores.exit_status = r.exit_status;
@ -631,6 +632,7 @@ void print_old_results(MIOFILE& mf) {
" <app_name>%s</app_name>\n"
" <exit_status>%d</exit_status>\n"
" <elapsed_time>%f</elapsed_time>\n"
" <cpu_time>%f</cpu_time>\n"
" <completed_time>%f</completed_time>\n"
" <create_time>%f</create_time>\n"
" </old_result>\n",
@ -639,6 +641,7 @@ void print_old_results(MIOFILE& mf) {
ores.app_name,
ores.exit_status,
ores.elapsed_time,
ores.cpu_time,
ores.completed_time,
ores.create_time
);

View File

@ -204,6 +204,7 @@ struct OLD_RESULT {
char app_name[256];
int exit_status;
double elapsed_time;
double cpu_time;
double completed_time;
double create_time; // when this record was created
};

View File

@ -641,6 +641,7 @@ struct OLD_RESULT {
char app_name[256];
int exit_status;
double elapsed_time;
double cpu_time;
double completed_time;
double create_time;

View File

@ -90,6 +90,7 @@ int OLD_RESULT::parse(XML_PARSER& xp) {
if (xp.parse_str("app_name", app_name, sizeof(app_name))) continue;
if (xp.parse_int("exit_status", exit_status)) continue;
if (xp.parse_double("elapsed_time", elapsed_time)) continue;
if (xp.parse_double("cpu_time", cpu_time)) continue;
if (xp.parse_double("completed_time", completed_time)) continue;
if (xp.parse_double("create_time", create_time)) continue;
}