diff --git a/checkin_notes b/checkin_notes index 951299f21d..58673fad46 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4102,3 +4102,14 @@ David 13 July 2011 clientgui/ DltItemProperties.cpp + +David 13 July 2011 + - admin web: improve the FLOPs estimation tool so that + it works for GPU versions too + + html/ + ops/ + job_times.php + app_details.php + inc/ + util_ops.php diff --git a/html/inc/util_ops.inc b/html/inc/util_ops.inc index 81f23302f9..6a2ac65062 100644 --- a/html/inc/util_ops.inc +++ b/html/inc/util_ops.inc @@ -212,6 +212,25 @@ function admin_error_page($msg) { exit; } +// given a list of app versions, +// return a list of the current, non-deprecated ones +// +function current_versions($avs) { + foreach($avs as $av) { + foreach ($avs as $av2) { + if ($av->id == $av2->id) continue; + if ($av->platformid == $av2->platformid && $av->plan_class == $av2->plan_class && $av->version_num > $av2->version_num) { + $av2->deprecated = 1; + } + } + } + $x = array(); + foreach($avs as $av) { + if (!$av->deprecated) $x[] = $av; + } + return $x; +} + if (isset($cli_only)) { if (array_key_exists("SERVER_PORT", $_SERVER)) { die("This script is intended to be run from the command line, diff --git a/html/ops/app_details.php b/html/ops/app_details.php index 1593b27011..13fbc4a480 100644 --- a/html/ops/app_details.php +++ b/html/ops/app_details.php @@ -22,22 +22,6 @@ require_once('../inc/util_ops.inc'); $appid = get_int("appid"); -function remove_old($avs) { - foreach($avs as $av) { - foreach ($avs as $av2) { - if ($av->id == $av2->id) continue; - if ($av->platformid == $av2->platformid && $av->plan_class == $av2->plan_class && $av->version_num > $av2->version_num) { - $av2->deprecated = 1; - } - } - } - $x = array(); - foreach($avs as $av) { - if (!$av->deprecated) $x[] = $av; - } - return $x; -} - $app = BoincApp::lookup_id($appid); if (!$app) admin_error_page("no such app"); admin_page_head("Details for $app->name ($app->user_friendly_name)"); @@ -50,12 +34,15 @@ echo " If values are far outside this range, you may have bad FLOPs estimates. In this case, you may want to - reset credit statistics for this application. +
"; end_table(); echo "Apps:";
- $r = mysql_query("select * from app");
- while ($p = mysql_fetch_object($r)) {
- echo "
$p->id $p->user_friendly_name\n";
- }
-}
-
-function show_platforms() {
- echo "
Platforms:
-
0 All
-
1 Windows only
-
2 Darwin only
-
3 Linux only
+function version_select($appid) {
+ $x = "\n";
+ return $x;
}
-function analyze($appid, $platformid, $nresults) {
+function analyze($appid, $app_version_id, $nresults) {
global $hist;
- $clause = "";
- switch ($platformid) {
- case 0: $clause = ""; break;
- case 1: $clause = " and locate('Windows', os_name)"; break;
- case 2: $clause = " and locate('Darwin', os_name)"; break;
- case 3: $clause = " and locate('Linux', os_name)"; break;
- }
+ $clause = $app_version_id?" and app_version_id = $app_version_id ":"";
- $query = "select server_state, outcome, cpu_time, p_fpops from result, host where server_state=5 and appid=$appid and host.id = result.hostid and outcome=1 and validate_state=1 $clause limit $nresults";
- echo $query;
+ $query = "select id, server_state, outcome, elapsed_time, flops_estimate from result where server_state=5 and appid=$appid and outcome=1 and validate_state=1 $clause order by id desc limit $nresults";
$r = mysql_query($query);
$n = 0;
@@ -183,39 +176,54 @@ function analyze($appid, $platformid, $nresults) {
show_as_xml();
}
-function show_form() {
+function show_app_select() {
+ admin_page_head("Show FLOPS distribution");
+ echo "Select an application:
+