From 7b10a4649a4b3c87c33926e860363a37623959ad Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 2 Mar 2009 00:12:50 +0000 Subject: [PATCH] - manager and GUI RPC: always show resource debt and backoff even if zero; also show backoff interval svn path=/trunk/boinc/; revision=17419 --- checkin_notes | 10 ++++++++++ clientgui/DlgItemProperties.cpp | 14 ++++++++++---- lib/gui_rpc_client.h | 5 ++++- lib/gui_rpc_client_ops.cpp | 8 ++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index 865c318a05..942a25e715 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2431,3 +2431,13 @@ David 1 Mar 2009 html/user/ edit_form_preferences_form.php + +David 1 Mar 2009 + - manager and GUI RPC: always show resource debt and backoff even if zero; + also show backoff interval + + clientgui/ + DlgItemProperties.cpp + lib/ + gui_rpc_client.h + gui_rpc_client_ops.cpp diff --git a/clientgui/DlgItemProperties.cpp b/clientgui/DlgItemProperties.cpp index 083d8754c8..c03809de5d 100755 --- a/clientgui/DlgItemProperties.cpp +++ b/clientgui/DlgItemProperties.cpp @@ -139,12 +139,18 @@ void CDlgItemProperties::renderInfos(PROJECT* project_in) { addProperty(_("CPU work fetch priority"),wxString::Format(wxT("%0.2f"), project->cpu_long_term_debt)); if (project->cpu_backoff_time > dtime()) { addProperty(_("CPU work fetch deferred for"), FormatTime(project->cpu_backoff_time - dtime())); + } else { + addProperty(_("CPU work fetch not deferred "), _("")); } - if (project->cuda_debt) { + addProperty(_("CPU work fetch deferral interval"), FormatTime(project->cpu_backoff_interval)); + if (pDoc->state.have_cuda) { addProperty(_("NVIDIA GPU work fetch priority"),wxString::Format(wxT("%0.2f"), project->cuda_debt)); - } - if (project->cuda_backoff_time > dtime()) { - addProperty(_("NVIDIA GPU work fetch deferred for"), FormatTime(project->cuda_backoff_time - dtime())); + if (project->cuda_backoff_time > dtime()) { + addProperty(_("NVIDIA GPU work fetch deferred for"), FormatTime(project->cuda_backoff_time - dtime())); + } else { + addProperty(_("NVIDIA GPU work fetch not deferred "), _("")); + } + addProperty(_("NVIDIA GPU work fetch deferral interval"), FormatTime(project->cuda_backoff_interval)); } addProperty(_("Duration correction factor"),wxString::Format(wxT("%0.4f"), project->duration_correction_factor)); m_gbSizer->Layout(); diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index 8b9affe333..ea89287211 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -109,9 +109,11 @@ public: double min_rpc_time; // earliest time to contact any server double short_term_debt; double cpu_long_term_debt; - double cuda_debt; double cpu_backoff_time; + double cpu_backoff_interval; + double cuda_debt; double cuda_backoff_time; + double cuda_backoff_interval; double duration_correction_factor; bool master_url_fetch_pending; // need to fetch and parse the master URL @@ -331,6 +333,7 @@ public: GLOBAL_PREFS global_prefs; // working prefs, i.e. network + override VERSION_INFO version_info; // populated only if talking to pre-5.6 CC bool executing_as_daemon; // true if Client is running as a service / daemon + bool have_cuda; CC_STATE(); ~CC_STATE(); diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp index 06fe2e0eef..8cab3f1095 100644 --- a/lib/gui_rpc_client_ops.cpp +++ b/lib/gui_rpc_client_ops.cpp @@ -198,8 +198,10 @@ int PROJECT::parse(MIOFILE& in) { if (parse_double(buf, "", short_term_debt)) continue; if (parse_double(buf, "", cpu_long_term_debt)) continue; if (parse_double(buf, "", cpu_backoff_time)) continue; + if (parse_double(buf, "", cpu_backoff_interval)) continue; if (parse_double(buf, "", cuda_debt)) continue; if (parse_double(buf, "", cuda_backoff_time)) continue; + if (parse_double(buf, "", cuda_backoff_interval)) continue; if (parse_double(buf, "", duration_correction_factor)) continue; if (parse_bool(buf, "master_url_fetch_pending", master_url_fetch_pending)) continue; if (parse_int(buf, "", sched_rpc_pending)) continue; @@ -246,7 +248,11 @@ void PROJECT::clear() { min_rpc_time = 0; short_term_debt = 0; cpu_long_term_debt = 0; + cpu_backoff_time = 0; + cpu_backoff_interval = 0; cuda_debt = 0; + cuda_backoff_time = 0; + cuda_backoff_interval = 0; duration_correction_factor = 0; master_url_fetch_pending = false; sched_rpc_pending = 0; @@ -621,6 +627,7 @@ void CC_STATE::clear() { results.clear(); platforms.clear(); executing_as_daemon = false; + have_cuda = false; } PROJECT* CC_STATE::lookup_project(string& str) { @@ -1085,6 +1092,7 @@ int RPC_CLIENT::get_state(CC_STATE& state) { if (parse_int(buf, "", state.version_info.minor)) continue; if (parse_int(buf, "", state.version_info.release)) continue; if (parse_bool(buf, "executing_as_daemon", state.executing_as_daemon)) continue; + if (parse_bool(buf, "have_cuda", state.have_cuda)) continue; if (match_tag(buf, "")) { project = new PROJECT(); project->parse(rpc.fin);