mirror of https://github.com/BOINC/boinc.git
- client emulator: show jobs in summary file
This commit is contained in:
parent
ecfd6d8a63
commit
735e2ef394
|
@ -1078,15 +1078,24 @@ void simulate() {
|
||||||
" Scheduling period %f\n"
|
" Scheduling period %f\n"
|
||||||
"Scheduling policies\n"
|
"Scheduling policies\n"
|
||||||
" Round-robin only: %s\n"
|
" Round-robin only: %s\n"
|
||||||
" Scheduler EDF simulation: %s\n",
|
" Scheduler EDF simulation: %s\n"
|
||||||
|
" REC half-life: %f\n",
|
||||||
gstate.work_buf_min(), gstate.work_buf_total(),
|
gstate.work_buf_min(), gstate.work_buf_total(),
|
||||||
gstate.global_prefs.cpu_scheduling_period(),
|
gstate.global_prefs.cpu_scheduling_period(),
|
||||||
cpu_sched_rr_only?"yes":"no",
|
cpu_sched_rr_only?"yes":"no",
|
||||||
server_uses_workload?"yes":"no"
|
server_uses_workload?"yes":"no",
|
||||||
|
config.rec_half_life
|
||||||
);
|
);
|
||||||
|
fprintf(summary_file, "Jobs\n");
|
||||||
|
for (int i=0; i<gstate.results.size(); i++) {
|
||||||
|
RESULT* rp = gstate.results[i];
|
||||||
fprintf(summary_file,
|
fprintf(summary_file,
|
||||||
" REC half-life: %f\n", config.rec_half_life
|
" %s time left %s deadline %s\n",
|
||||||
|
rp->name,
|
||||||
|
timediff_format(rp->sim_flops_left/rp->avp->flops).c_str(),
|
||||||
|
timediff_format(rp->report_deadline - START_TIME).c_str()
|
||||||
);
|
);
|
||||||
|
}
|
||||||
fprintf(summary_file,
|
fprintf(summary_file,
|
||||||
"Simulation parameters\n"
|
"Simulation parameters\n"
|
||||||
" time step %f, duration %f\n"
|
" time step %f, duration %f\n"
|
||||||
|
|
|
@ -362,33 +362,27 @@ string timediff_format(double diff) {
|
||||||
int sex = tdiff % 60;
|
int sex = tdiff % 60;
|
||||||
tdiff /= 60;
|
tdiff /= 60;
|
||||||
if (!tdiff) {
|
if (!tdiff) {
|
||||||
sprintf(buf, "%d sec", sex);
|
sprintf(buf, "00:00:%02d", sex);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
int min = tdiff % 60;
|
int min = tdiff % 60;
|
||||||
tdiff /= 60;
|
tdiff /= 60;
|
||||||
if (!tdiff) {
|
if (!tdiff) {
|
||||||
sprintf(buf, "%d min %d sec", min, sex);
|
sprintf(buf, "00:%02d:%02d", min, sex);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
int hours = tdiff % 24;
|
int hours = tdiff % 24;
|
||||||
tdiff /= 24;
|
tdiff /= 24;
|
||||||
if (!tdiff) {
|
if (!tdiff) {
|
||||||
sprintf(buf, "%d hr %d min %d sec", hours, min, sex);
|
sprintf(buf, "%02d:%02d:%02d", hours, min, sex);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
int days = tdiff % 7;
|
sprintf(buf, "%d days %02d:%02d:%02d", tdiff, hours, min, sex);
|
||||||
tdiff /= 7;
|
|
||||||
if (!tdiff) {
|
|
||||||
sprintf(buf, "%d days %d hr %d min %d sec", days, hours, min, sex);
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
|
||||||
|
|
||||||
sprintf(buf, "%d weeks %d days %d hrs %d min %d sec", (int)tdiff, days, hours, min, sex);
|
|
||||||
return buf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mysql_timestamp(double dt, char* p) {
|
void mysql_timestamp(double dt, char* p) {
|
||||||
|
|
Loading…
Reference in New Issue