diff --git a/checkin_notes b/checkin_notes index 59e47eaf75..fb2e323c60 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1377,3 +1377,12 @@ David 4 Mar 2011 client/ cs_notice.cpp + +David 6 Mar 2011 + - client: print smoothed as well as instantaneous WSS + - manager: make RPC reason strings translatable + + client/ + app.cpp + clientgui/ + ViewProjects.cpp diff --git a/client/app.cpp b/client/app.cpp index 6efad6e77b..4b7b4146e7 100644 --- a/client/app.cpp +++ b/client/app.cpp @@ -321,9 +321,11 @@ void ACTIVE_TASK_SET::get_memory_usage() { pi.page_fault_rate = pf/diff; if (log_flags.mem_usage_debug) { msg_printf(atp->result->project, MSG_INFO, - "[mem_usage] %s: RAM %.2fMB, page %.2fMB, %.2f page faults/sec, user CPU %.3f, kernel CPU %.3f", + "[mem_usage] %s: WS %.2fMB, smoothed %.2fMB page %.2fMB, %.2f page faults/sec, user CPU %.3f, kernel CPU %.3f", atp->result->name, - pi.working_set_size/MEGA, pi.swap_size/MEGA, + pi.working_set_size/MEGA, + pi.working_set_size_smoothed/MEGA, + pi.swap_size/MEGA, pi.page_fault_rate, pi.user_time, pi.kernel_time ); diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index 45bf786d52..251ff7d256 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -1043,6 +1043,18 @@ wxInt32 CViewProjects::FormatResourceShare(float fBuffer, float fBufferPercent, return 0; } +wxString rpc_reason_string_translated(int reason) { + switch (reason) { + case RPC_REASON_USER_REQ: return _("Requested by user"); + case RPC_REASON_NEED_WORK: return _("To fetch work"); + case RPC_REASON_RESULTS_DUE: return _("To report completed tasks"); + case RPC_REASON_TRICKLE_UP: return _("To send trickle-up message"); + case RPC_REASON_ACCT_MGR_REQ: return _("Requested by account manager"); + case RPC_REASON_INIT: return _("Project initialization"); + case RPC_REASON_PROJECT_REQ: return _("Requested by project"); + default: return _("Unknown reason"); + } +} void CViewProjects::GetDocStatus(wxInt32 item, wxString& strBuffer) const { PROJECT* project = NULL; @@ -1067,7 +1079,9 @@ void CViewProjects::GetDocStatus(wxInt32 item, wxString& strBuffer) const { } if (project->sched_rpc_pending) { append_to_status(strBuffer, _("Scheduler request pending")); - append_to_status(strBuffer, wxString(rpc_reason_string(project->sched_rpc_pending), wxConvUTF8)); + append_to_status(strBuffer, + rpc_reason_string_translated(project->sched_rpc_pending) + ); } if (project->scheduler_rpc_in_progress) { append_to_status(strBuffer, _("Scheduler request in progress"));