From c22f8f41b91532a83f4f55e8e8cb942c1bc2de69 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 17 Oct 2011 06:13:51 +0000 Subject: [PATCH] - client simulator: make the output more graphical svn path=/trunk/boinc/; revision=24406 --- checkin_notes | 9 +++++++ client/sim.cpp | 61 ++++++++++++++++++++++++++++++++------------- doc/sim/sim_web.php | 33 ++++++++++++++++++++---- html/inc/util.inc | 17 +++++++------ 4 files changed, 91 insertions(+), 29 deletions(-) diff --git a/checkin_notes b/checkin_notes index 0bcd20692b..1bdc59c34f 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7318,3 +7318,12 @@ David 14 Oct 2011 index.php inc/ db_ops.inc + +David 16 Oct 2011 + - client simulator: make the output more graphical + + html/ + inc/ + util.inc + client/ + sim.cpp diff --git a/client/sim.cpp b/client/sim.cpp index 9e4a25c75b..09cc49bdfe 100644 --- a/client/sim.cpp +++ b/client/sim.cpp @@ -784,18 +784,29 @@ const char* colors[] = { "#aa00aa", "#aaaa00", "#00aaaa", - "#0000cc", - "#00cc00", - "#cc0000", - "#cc00cc", - "#cccc00", - "#00cccc", + "#8800aa", + "#aa0088", + "#88aa00", + "#aa8800", + "#00aa88", + "#0088aa", }; -#define NCOLORS 12 +#define NCOLORS 18 #define WIDTH1 100 #define WIDTH2 400 +void show_project_colors() { + fprintf(html_out, "Projects:
\n"); + for (unsigned int i=0; i\n", + colors[p->index%NCOLORS], p->project_name + ); + } + fprintf(html_out, "
%s
\n"); +} void job_count(PROJECT* p, int rsc_type, int& in_progress, int& done) { in_progress = done = 0; @@ -833,7 +844,14 @@ void show_resource(int rsc_type) { } PROJECT* p = rp->project; - fprintf(html_out, "%.2f: %s%s: %.2fG%s
\n", + if (!found) { + found = true; + fprintf(html_out, + "\n" + "\n" + ); + } + fprintf(html_out, "\n", ninst, colors[p->index%NCOLORS], atp->result->rr_sim_misses_deadline?"*":"", @@ -841,24 +859,29 @@ void show_resource(int rsc_type) { atp->flops_left/1e9, buf ); - found = true; } - if (!found) fprintf(html_out, "IDLE"); - fprintf(html_out, "
Jobs"); + if (found) { + fprintf(html_out, "
#devsJob nameFLOPS left
%.2f%s%s%.0fG%s
\n"); + } else { + fprintf(html_out, "IDLE\n"); + } + fprintf(html_out, + "\n" + ); found = false; for (i=0; i%s: %d in prog, %d done\n", - p->project_name, in_progress, done + fprintf(html_out, "\n", + colors[p->index%NCOLORS], p->project_name, in_progress, done ); found = true; } } - if (!found) fprintf(html_out, " ---\n"); - fprintf(html_out, ""); + //if (!found) fprintf(html_out, " ---\n"); + fprintf(html_out, "
ProjectJobs in progressJobs done
%s%d%d
"); } int nproc_types = 1; @@ -874,12 +897,16 @@ void html_start() { } setbuf(html_out, 0); fprintf(index_file, "
Timeline\n", TIMELINE_FNAME); - fprintf(html_out, "

BOINC client simulator

\n"); + fprintf(html_out, + "\n" + "

BOINC client emulator results

\n" + ); + show_project_colors(); fprintf(html_out, "\n", WIDTH1 ); fprintf(html_out, - "", WIDTH2 + "", WIDTH2 ); if (coprocs.have_nvidia()) { fprintf(html_out, "", WIDTH2); diff --git a/doc/sim/sim_web.php b/doc/sim/sim_web.php index 8acca3173e..20a7dbf7ee 100644 --- a/doc/sim/sim_web.php +++ b/doc/sim/sim_web.php @@ -86,7 +86,7 @@ function show_scenarios() {

Scenarios

The inputs to BCE, called scenarios, describe a particular computer and the project to which it's attached. - A scenario consists of 4 files: + A scenario consists of:
TimeCPU
Job name and estimated time left
color denotes project
* means EDF mode
CPU
* means EDF mode
NVIDIA GPU