*** empty log message ***

svn path=/trunk/boinc/; revision=10383
This commit is contained in:
David Anderson 2006-06-17 04:55:28 +00:00
parent 01d5c14d3e
commit ae85e72e24
1 changed files with 9 additions and 0 deletions

View File

@ -38,6 +38,7 @@
#include "client_msgs.h" #include "client_msgs.h"
#include "client_state.h" #include "client_state.h"
#include "network.h" #include "network.h"
#include "log_flags.h"
#include "time_stats.h" #include "time_stats.h"
@ -113,6 +114,7 @@ void TIME_STATS::update(bool is_active) {
} }
void TIME_STATS::update_cpu_efficiency(double cpu_wall_time, double cpu_time) { void TIME_STATS::update_cpu_efficiency(double cpu_wall_time, double cpu_time) {
double old_cpu_efficiency = cpu_efficiency;
if (cpu_wall_time < .01) return; if (cpu_wall_time < .01) return;
double w = exp(-cpu_wall_time/SECONDS_PER_DAY); double w = exp(-cpu_wall_time/SECONDS_PER_DAY);
double e = cpu_time/cpu_wall_time; double e = cpu_time/cpu_wall_time;
@ -120,6 +122,13 @@ void TIME_STATS::update_cpu_efficiency(double cpu_wall_time, double cpu_time) {
return; return;
} }
cpu_efficiency = w*cpu_efficiency + (1-w)*e; cpu_efficiency = w*cpu_efficiency + (1-w)*e;
if (log_flags.cpu_sched_detail){
msg_printf(0, MSG_INFO,
"CPU efficiency old %f new %f wall %f CPU %f w %f e %f",
old_cpu_efficiency, cpu_efficiency, cpu_wall_time,
cpu_time, w, e
);
}
} }
// Write XML based time statistics // Write XML based time statistics