diff --git a/html/inc/db_ops.inc b/html/inc/db_ops.inc
index f36aa083bc..64bd85a4b6 100644
--- a/html/inc/db_ops.inc
+++ b/html/inc/db_ops.inc
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
+// functions to query various entities, and display them,
+// in admin web pages
// TODO: most of this code shouldn't exist; use the standard code instead
error_reporting(E_ALL);
@@ -408,8 +410,7 @@ function stderr_error_string($stderr_out){
}
}
-function show_result_summary() {
-
+function admin_show_result_summary() {
$ntotal =0; // TODO: how to count $result?
$nvalid = 0; // for SUCCESS results
$ninvalid = 0;
@@ -737,7 +738,7 @@ function table_title($table) {
}
}
-function show_platform($platform) {
+function admin_show_platform($platform) {
start_table();
row("ID", $platform->id);
row("Created", time_str($platform->create_time));
@@ -747,7 +748,7 @@ function show_platform($platform) {
end_table();
}
-function show_app($app) {
+function admin_show_app($app) {
start_table();
row("ID", $app->id);
row("Created", time_str($app->create_time));
@@ -760,7 +761,7 @@ function show_app($app) {
end_table();
}
-function show_app_version($app_version) {
+function admin_show_app_version($app_version) {
start_table();
row("ID", $app_version->id);
row("Created", time_str($app_version->create_time));
@@ -788,7 +789,7 @@ function app_version_short_header() {
";
}
-function show_app_version_short($app_version) {
+function admin_show_app_version_short($app_version) {
$x = app_name_by_id($app_version->appid);
$y = platform_name_by_id($app_version->platformid);
echo "
@@ -816,7 +817,7 @@ function host_short_header() {
";
}
-function show_host_short($host) {
+function admin_show_host_short($host) {
echo "
id\">$host->id |
@@ -868,7 +869,7 @@ function hav_app_version_string($avid) {
";
}
-function show_host_app_versions($hostid) {
+function admin_show_host_app_versions($hostid) {
start_table();
table_header("app version", "PFC", "Elapsed", "Turnaround");
$havs = BoincHostAppVersion::enum("host_id=$hostid");
@@ -883,7 +884,7 @@ function show_host_app_versions($hostid) {
end_table();
}
-function show_host($host) {
+function admin_show_host($host) {
start_table();
row("ID", $host->id);
@@ -939,12 +940,12 @@ function show_host($host) {
row("# of results today", $host->nresults_today);
row("Results", "id&sort_by=sent_time\">click here");
end_table();
- show_host_app_versions($host->id);
+ admin_show_host_app_versions($host->id);
}
-function show_workunit($wu) {
+function admin_show_workunit($wu) {
$_GET = array('workunitid' => $wu->id);
- show_result_summary();
+ admin_show_result_summary();
start_table();
row("Created", time_str($wu->create_time));
@@ -1003,7 +1004,7 @@ function workunit_short_header() {
";
}
-function show_workunit_short($wu) {
+function admin_show_workunit_short($wu) {
if ($wu->canonical_resultid) {
$cr = sprintf('%d',
$wu->canonical_resultid,
@@ -1074,7 +1075,7 @@ function credit_str($c) {
}
}
-function show_result_ops($result) {
+function admin_show_result($result) {
$wu_name = wu_name_by_id($result->workunitid);
start_table();
@@ -1154,7 +1155,7 @@ function result_short_header() {
";
}
-function show_result_short($result) {
+function admin_show_result_short($result) {
$ss = result_server_state_string($result)." [$result->server_state]";
$oc = result_outcome_string($result)." [$result->outcome]";
$vs = validate_state_str($result)." [$result->validate_state]";
@@ -1207,7 +1208,7 @@ function show_result_short($result) {
";
}
-function show_user($user) {
+function admin_show_user($user) {
start_table();
row("ID", $user->id);
row("Created", time_str($user->create_time));
@@ -1232,7 +1233,7 @@ function show_user($user) {
end_table();
}
-function show_user_summary($maxuser) {
+function admin_show_user_summary($maxuser) {
$top_country = array();
$top_language = array();
$db = BoincDb::get(true);
@@ -1312,7 +1313,7 @@ function team_type_string($s) {
}
}
-function show_team($team) {
+function admin_show_team($team) {
start_table();
row("ID", $team->id);
row("Team Founder", "userid\">" . user_name_by_id($team->userid) . "");
diff --git a/html/inc/util_ops.inc b/html/inc/util_ops.inc
index 0787f98bd2..7e166e02f3 100644
--- a/html/inc/util_ops.inc
+++ b/html/inc/util_ops.inc
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
+// utility functions for admin web pages
+
error_reporting(E_ALL);
ini_set('display_errors', true);
ini_set('display_startup_errors', true);
diff --git a/html/ops/db_action.php b/html/ops/db_action.php
index 393df68185..76136258a1 100644
--- a/html/ops/db_action.php
+++ b/html/ops/db_action.php
@@ -178,43 +178,43 @@ if ($result) {
if ($detail == "low") {
switch ($table) {
case "result":
- show_result_short($res);
+ admin_show_result_short($res);
break;
case "host":
- show_host_short($res);
+ admin_show_host_short($res);
break;
case "app_version":
- show_app_version_short($res);
+ admin_show_app_version_short($res);
break;
case "workunit":
- show_workunit_short($res);
+ admin_show_workunit_short($res);
break;
}
} else {
switch ($table) {
case "platform":
- show_platform($res);
+ admin_show_platform($res);
break;
case "app":
- show_app($res);
+ admin_show_app($res);
break;
case "app_version":
- show_app_version($res);
+ admin_show_app_version($res);
break;
case "host":
- show_host($res);
+ admin_show_host($res);
break;
case "workunit":
- show_workunit($res);
+ admin_show_workunit($res);
break;
case "result":
- show_result_ops($res);
+ admin_show_result($res);
break;
case "team":
- show_team($res);
+ admin_show_team($res);
break;
case "user":
- show_user($res);
+ admin_show_user($res);
break;
}
}
diff --git a/html/ops/result_summary.php b/html/ops/result_summary.php
index ceb783a769..ff47b9b65e 100644
--- a/html/ops/result_summary.php
+++ b/html/ops/result_summary.php
@@ -23,7 +23,7 @@ require_once("../inc/util_ops.inc");
db_init();
admin_page_head("Result summary");
-show_result_summary();
+admin_show_result_summary();
admin_page_tail();
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
diff --git a/sched/credit.cpp b/sched/credit.cpp
index 5b02b9a8b7..8ae4ba20d7 100644
--- a/sched/credit.cpp
+++ b/sched/credit.cpp
@@ -660,12 +660,13 @@ int get_pfc(
double tmp_scale = (avp && avp->pfc_scale) ? (avp->pfc_scale) : 1.0;
if (raw_pfc*tmp_scale > wu.rsc_fpops_bound) {
- // This sanity check should be unnecessary becuase we have a maximum
- // credit grant limit. With anonymous GPU apps the sanity check often fails
- // because anonymous GPU scales are often of order 0.01. That prevents
- // PFC averages from being updated. So I've removed the return
- // statement.
- //char query[256], clause[256];
+ // This sanity check should be unnecessary because we have a maximum
+ // credit grant limit.
+ // With anonymous GPU apps the sanity check often fails
+ // because anonymous GPU scales are often of order 0.01.
+ // That prevents PFC averages from being updated.
+ // So I've removed the return statement.
+ //
pfc = wu_estimated_pfc(wu, app);
if (config.debug_credit) {
log_messages.printf(MSG_NORMAL,