From 681d0e9a1fa5f75b21edd5ea522cc2da8978a8ed Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 22 Jun 2015 00:53:49 -0700 Subject: [PATCH] Manager: show progress rate in task properties. E.g. show that task is progressing at 5% per hour. Use the largest time scale (hour, min, sec) for which the rate is < 100%. This can be used, e.g. to compare the speed of different GPUs or app versions for similar jobs. --- clientgui/DlgItemProperties.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/clientgui/DlgItemProperties.cpp b/clientgui/DlgItemProperties.cpp index e5508ddbda..efbea6fb3e 100644 --- a/clientgui/DlgItemProperties.cpp +++ b/clientgui/DlgItemProperties.cpp @@ -392,6 +392,17 @@ void CDlgItemProperties::renderInfos(RESULT* result) { if (result->pid) { addProperty(_("Process ID"), wxString::Format(wxT("%d"), result->pid)); } + if (result->progress_rate) { + // express rate in the largest time unit (hr/min/sec) for which rate < 100% + // + if (result->progress_rate*3600 < 1) { + addProperty("Progress rate", wxString::Format(wxT("%f %% per hour"), 100*3600*result->progress_rate)); + } else if (result->progress_rate*60 < 1) { + addProperty("Progress rate", wxString::Format(wxT("%f %% per minute"), 100*60*result->progress_rate)); + } else { + addProperty("Progress rate", wxString::Format(wxT("%f %% per second"), 100*result->progress_rate)); + } + } } else if (result->state >= RESULT_COMPUTE_ERROR) { addProperty(_("CPU time"), FormatTime(result->final_cpu_time)); addProperty(_("Elapsed time"), FormatTime(result->final_elapsed_time));