From 4459dda8598e026cf9508c6b5ae70194b5c0ea76 Mon Sep 17 00:00:00 2001 From: Bernd Machenschalk Date: Tue, 13 Nov 2007 12:44:59 +0000 Subject: [PATCH] - added features to pass_percentage_per_platform: 1. distinguish between Darwin x86 and Darwin PPC 2. lists the "fail rates" for individual client states to allow to distinguish between download errors, computing errors and aborts 3. optionally list individual "unknown" OS by name 4. optionally list "unofficial" application versions 3. and 4. are probably rather confusing on open-source projects like SETI, but I found them helpful e.g. on Einstein svn path=/trunk/boinc/; revision=14169 --- checkin_notes | 15 ++ html/ops/pass_percentage_by_platform.php | 173 +++++++++++++++++------ 2 files changed, 142 insertions(+), 46 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1e85487ce1..421a6c1aa6 100644 --- a/checkin_notes +++ b/checkin_notes @@ -10830,3 +10830,18 @@ Bernd 13 Nov 2007 configure.ac + +Bernd 13 Nov 2007 + - added features to pass_percentage_per_platform: + + 1. distinguish between Darwin x86 and Darwin PPC + 2. lists the "fail rates" for individual client states to allow to + distinguish between download errors, computing errors and aborts + 3. optionally list individual "unknown" OS by name + 4. optionally list "unofficial" application versions + 3. and 4. are probably rather confusing on open-source projects like SETI, + but I found them helpful e.g. on Einstein + + html/ + inc/ + pass_percentage_per_platform.php diff --git a/html/ops/pass_percentage_by_platform.php b/html/ops/pass_percentage_by_platform.php index ffcc22e0db..a14ed4d30b 100644 --- a/html/ops/pass_percentage_by_platform.php +++ b/html/ops/pass_percentage_by_platform.php @@ -6,68 +6,113 @@ require_once("../inc/util_ops.inc"); db_init(); admin_page_head("Pass percentage by platform"); +/* + modified by Bernd Machenschalk 2007 + + 1. distinguish between Darwin x86 and Darwin PPC + 2. lists the "fail rates" for individual client states to allow for + distinguishing between download errors, computing errors and aborts + 3. optionally list individual "unknown" OS by name + 4. optionally list "unofficial" application versions + + 3. and 4. are probably rather confusing on open-source projects like SETI, + but I found them helpful e.g. on Einstein + +*/ + $query_appid = $_GET['appid']; -$query_received_time = time() - $_GET['nsecs']; +$query_nsecs = $_GET['nsecs']; +$query_received_time = time() - $query_nsecs; +$query_all_versions = $_GET['allversions']; +$query_all_platforms = $_GET['allplatforms']; -// First lets get the most recent version numbers per platform -$valid_app_versions = ""; - -$app_version_query = " -SELECT DISTINCT - platformid, - MAX(version_num) AS app_version_num -FROM app_version - left join platform on app_version.platformid = platform.id -WHERE - app_version.deprecated <> 1 and - appid = '$query_appid' -GROUP BY - platformid -"; - -$result = mysql_query($app_version_query); -while ($res = mysql_fetch_object($result)) { - if (strlen($valid_app_versions) == 0) { - $valid_app_versions = "$res->app_version_num"; - } else { - $valid_app_versions = "$valid_app_versions, $res->app_version_num"; - } +if ($query_all_platforms == "1") { + $unknown_platform = "host.os_name"; + $allplatforms = "checked"; +} else { + $unknown_platform = "'unknown'"; } -mysql_free_result($result); +if ($query_all_versions == "1") { + $limit_app_versions = ""; + $query_order = "platform"; + $allversions = "checked"; +} else { + // First lets get the most recent version numbers per platform + $valid_app_versions = ""; -// Now that we have a valid list of app_version_nums' lets -// construct the main query + $app_version_query = " + SELECT DISTINCT + platformid, + MAX(version_num) AS app_version_num + FROM app_version + left join platform on app_version.platformid = platform.id + WHERE + app_version.deprecated <> 1 and + appid = '$query_appid' + GROUP BY + platformid + "; + + $result = mysql_query($app_version_query); + while ($res = mysql_fetch_object($result)) { + if (strlen($valid_app_versions) == 0) { + $valid_app_versions = "$res->app_version_num"; + } else { + $valid_app_versions = "$valid_app_versions, $res->app_version_num"; + } + } + mysql_free_result($result); + $limit_app_versions = "app_version_num IN ( $valid_app_versions ) AND"; + $query_order = "version DESC"; +} + +// Now that we have a valid list of app_version_nums' +// let's construct the main query $main_query = " SELECT app_version_num AS version, - case - when INSTR(host.os_name, 'Darwin') then 'Darwin' - when INSTR(host.os_name, 'Linux') then 'Linux' + CASE + when INSTR(host.os_name, 'Darwin') then + (CASE WHEN INSTR(host.p_vendor, 'Power') THEN 'Darwin PPC' ELSE 'Darwin x86' END) + when INSTR(host.os_name, 'Linux') then 'Linux' when INSTR(host.os_name, 'Windows') then 'Windows' - when INSTR(host.os_name, 'SunOS') then 'SunOS' + when INSTR(host.os_name, 'SunOS') then 'SunOS' when INSTR(host.os_name, 'Solaris') then 'Solaris' - when INSTR(host.os_name, 'Mac') then 'Mac' - else 'Unknown' + when INSTR(host.os_name, 'Mac') then 'Mac' + else $unknown_platform end AS platform, COUNT(*) AS total_results, - ((SUM(case when server_state = '5' and outcome = '1' then 1 else 0 end) / COUNT(*)) * 100) AS pass_rate, - ((SUM(case when server_state = '5' and outcome = '3' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate + ((SUM(case when outcome = '1' then 1 else 0 end) / COUNT(*)) * 100) AS pass_rate, + ((SUM(case when outcome = '3' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate, + ((SUM(case when outcome = '3' and client_state = '1' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate1, + ((SUM(case when outcome = '3' and client_state = '2' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate2, + ((SUM(case when outcome = '3' and client_state = '3' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate3, + ((SUM(case when outcome = '3' and client_state = '4' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate4, + ((SUM(case when outcome = '3' and client_state = '5' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate5, + ((SUM(case when outcome = '3' and client_state = '6' then 1 else 0 end) / COUNT(*)) * 100) AS fail_rate6 FROM result left join host on result.hostid = host.id WHERE - appid = '$query_appid' and - server_state = '5' and - app_version_num IN ( $valid_app_versions ) and + appid = '$query_appid' AND + server_state = '5' AND + $limit_app_versions received_time > '$query_received_time' GROUP BY version DESC, platform +ORDER BY + $query_order "; + $result = mysql_query($main_query); -echo "\n"; -echo "\n"; +//echo "
VersionOSTotal ResultsPass RateFail Rate
\n"; +echo "
\n"; +echo ""; +echo ""; +echo ""; +echo "\n"; while ($res = mysql_fetch_object($result)) { @@ -82,17 +127,42 @@ while ($res = mysql_fetch_object($result)) { echo $res->platform; echo ""; - echo ""; + echo "  "; - echo ""; + echo "%  "; - echo ""; + echo "%  "; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + echo "\n"; @@ -101,6 +171,17 @@ mysql_free_result($result); echo "
ApplicationOSTotal
Results
Pass RateFail RateFailed
Downloading
Failed
Downloaded
Failed
Computing
Failed
Uploading
Failed
Uploaded
Aborted
"; + echo ""; echo $res->total_results; - echo ""; + echo ""; echo $res->pass_rate; - echo ""; + echo ""; echo $res->fail_rate; - echo ""; + echo $res->fail_rate1; + echo "%  "; + echo $res->fail_rate2; + echo "%  "; + echo $res->fail_rate3; + echo "%  "; + echo $res->fail_rate4; + echo "%  "; + echo $res->fail_rate5; + echo "%  "; + echo $res->fail_rate6; + echo "%  
\n"; +$page = $_SERVER["REQUEST_URI"]; +echo "
\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "list unofficial App versions  \n"; +echo "\n"; +echo "distinguish unknown platforms  \n"; +echo "\n"; +echo "
\n"; + admin_page_tail(); ?>