mirror of https://github.com/BOINC/boinc.git
- 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
This commit is contained in:
parent
cd91702f47
commit
4459dda859
|
@ -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
|
||||
|
|
|
@ -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 "<table>\n";
|
||||
echo "<tr><th>Version</th><th>OS</th><th>Total Results</th><th>Pass Rate</th><th>Fail Rate</th></tr>\n";
|
||||
//echo "<table border=\"0\">\n";
|
||||
echo "<table cellspacing=\"10\">\n";
|
||||
echo "<tr>";
|
||||
echo "<th>Application</th><th>OS</th><th>Total<br>Results</th><th>Pass Rate</th><th>Fail Rate</th>";
|
||||
echo "<th>Failed<br>Downloading</th><th>Failed<br>Downloaded</th><th>Failed<br>Computing</th><th>Failed<br>Uploading</th><th>Failed<br>Uploaded</th><th>Aborted</th>";
|
||||
echo "</tr>\n";
|
||||
|
||||
while ($res = mysql_fetch_object($result)) {
|
||||
|
||||
|
@ -82,17 +127,42 @@ while ($res = mysql_fetch_object($result)) {
|
|||
echo $res->platform;
|
||||
echo "</td>";
|
||||
|
||||
echo "<td align=\"left\" valign=\"top\">";
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->total_results;
|
||||
echo "</td>";
|
||||
echo " </td>";
|
||||
|
||||
echo "<td align=\"left\" valign=\"top\">";
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->pass_rate;
|
||||
echo "</td>";
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"left\" valign=\"top\">";
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate;
|
||||
echo "</td>";
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate1;
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate2;
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate3;
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate4;
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate5;
|
||||
echo "% </td>";
|
||||
|
||||
echo "<td align=\"right\" valign=\"top\">";
|
||||
echo $res->fail_rate6;
|
||||
echo "% </td>";
|
||||
|
||||
|
||||
echo "</tr>\n";
|
||||
|
||||
|
@ -101,6 +171,17 @@ mysql_free_result($result);
|
|||
|
||||
echo "</table>\n";
|
||||
|
||||
$page = $_SERVER["REQUEST_URI"];
|
||||
echo "<form action=$page>\n";
|
||||
echo "<input type=\"hidden\" name=\"appid\" value=\"$query_appid\">\n";
|
||||
echo "<input type=\"hidden\" name=\"nsecs\" value=\"$query_nsecs\">\n";
|
||||
echo "<input type=\"checkbox\" name=\"allversions\" value=\"1\" $allversions>\n";
|
||||
echo "list unofficial App versions \n";
|
||||
echo "<input type=\"checkbox\" name=\"allplatforms\" value=\"1\" $allplatforms>\n";
|
||||
echo "distinguish unknown platforms \n";
|
||||
echo "<input type=\"submit\" value=\"show\">\n";
|
||||
echo "</form>\n";
|
||||
|
||||
admin_page_tail();
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue