diff --git a/client/sim.cpp b/client/sim.cpp
index 607a9f9701..0542937312 100644
--- a/client/sim.cpp
+++ b/client/sim.cpp
@@ -864,7 +864,7 @@ void show_resource(int rsc_type) {
} else {
safe_strcpy(buf, "");
}
- fprintf(html_out, "
%.2f | %s%s | %.0f | %s
\n",
+ fprintf(html_out, "%.2f | %s%s | %.0f | %s
\n",
ninst,
colors[p->index%NCOLORS],
rp->edf_scheduled?"*":"",
@@ -914,11 +914,18 @@ void html_start() {
"BOINC client emulator results
\n"
);
show_project_colors();
+ fprintf(html_out, "\n");
fprintf(html_out,
- "Time | \n", WIDTH1
+ "\n"
);
+}
+
+void html_device_header() {
fprintf(html_out,
- "CPU | ", WIDTH2
+ ""
+ " %s | "
+ " CPU | ",
+ sim_time_string(gstate.now)
);
for (int i=1; i%s\n", WIDTH2, name);
-
+ fprintf(html_out, "%s | \n", name);
}
- fprintf(html_out, "
\n");
+ fprintf(html_out,
+ "
\n"
+ );
}
+void html_write_message() {
+ fprintf(html_out,
+ ""
+ " %s | "
+ " %s | "
+ "
\n",
+ sim_time_string(gstate.now),
+ html_msg.c_str()
+ );
+}
+
+// write the timeline row(s) for this time
+//
void html_rec() {
if (html_msg.size()) {
- fprintf(html_out,
- "%s | ",
- WIDTH1, sim_time_string(gstate.now)
- );
- fprintf(html_out,
- "%s |
\n",
- coprocs.n_rsc*WIDTH2,
- html_msg.c_str()
- );
+ html_write_message();
html_msg = "";
}
- fprintf(html_out, "%s | ", WIDTH1, sim_time_string(gstate.now));
- if (active) {
+ if (!active) {
+ fprintf(html_out,
+ "
"
+ " %s | "
+ " BOINC not running | "
+ "
",
+ sim_time_string(gstate.now)
+ );
+ } else {
+ html_device_header();
+ fprintf(html_out,
+ " | \n"
+ );
show_resource(0);
if (gpu_active) {
for (int i=1; iOFF", WIDTH2);
+ fprintf(html_out, "GPUs disabled | ");
}
}
- } else {
- fprintf(html_out, "OFF | ", WIDTH2);
- for (int i=1; iOFF", WIDTH2);
- }
+ fprintf(html_out,
+ "
\n"
+ );
}
-
- fprintf(html_out, "
\n");
}
void html_end() {
+ fprintf(html_out, "
\n");
fprintf(html_out, "\n");
sim_results.compute_figures_of_merit();
sim_results.print(html_out);
diff --git a/client/time_stats.cpp b/client/time_stats.cpp
index 738eda538f..e19b3ac335 100644
--- a/client/time_stats.cpp
+++ b/client/time_stats.cpp
@@ -364,6 +364,8 @@ int CLIENT_TIME_STATS::write(MIOFILE& out, bool to_remote) {
int CLIENT_TIME_STATS::parse(XML_PARSER& xp) {
double x;
#ifdef SIM
+ // mean unavailability is 1 hour
+ //
double on_lambda = 3600, connected_lambda = 3600;
double active_lambda = 3600, gpu_active_lambda = 3600;
#endif