From 8740e9a2b5e5c05411ab14339275975ac9e04154 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 24 Apr 2013 19:15:06 -0700 Subject: [PATCH] - web: update text for finding data directory --- html/ops/size_census.php | 65 +++++++++++++++++++++ html/user/get_passwd.php | 2 +- sched/size_regulator.cpp | 121 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+), 1 deletion(-) create mode 100755 html/ops/size_census.php create mode 100644 sched/size_regulator.cpp diff --git a/html/ops/size_census.php b/html/ops/size_census.php new file mode 100755 index 0000000000..d44d7aafde --- /dev/null +++ b/html/ops/size_census.php @@ -0,0 +1,65 @@ +#! /usr/bin/env php +. + +// size_census +// for each multi-size app, +// find the N quantiles of its effective speed, +// and write them to a file. +// See http://boinc.berkeley.edu/trac/wiki/JobSizeMatching + +error_reporting(E_ALL); +ini_set('display_errors', true); +ini_set('display_startup_errors', true); + +require_once("../inc/boinc_db.inc"); + +function do_app($app) { + // enumerate the host_app_versions for this app, + // joined to the host + + $db = BoincDb::get(); + $dbn = $db->db_name; + $query = "select et_avg, host.on_frac, host.active_frac " . + " from $dbn.host_app_version, $dbn.host, $dbn.app_version " . + " where host_app_version.app_version_id = app_version.id " . + " and app_version.appid = 1 " . + " and et_n > 0 " . + " and host.id = host_app_version.host_id"; + $result = $db->do_query($query); + $a = array(); + while ($x = mysql_fetch_object($result)) { + $a[] = $x->et_avg * $x->on_frac * $x->active_frac; + } + mysql_free_result($result); + sort($a); + $n = count($a); + $f = fopen("../../size_census_".$app->name, "w"); + for ($i=1; $i<$app->n_size_classes; $i++) { + $k = (int)(($i*n)/$app->n_size_classes); + fprintf($f, "%f\n", $a[$k]); + } + fclose($f); +} + +$apps = BoincApp::enum("deprecated=0 and n_size_classes>1"); +foreach ($apps as $app) { + do_app($app); +} + +?> diff --git a/html/user/get_passwd.php b/html/user/get_passwd.php index a4b754888d..c0895e9d63 100644 --- a/html/user/get_passwd.php +++ b/html/user/get_passwd.php @@ -47,7 +47,7 @@ echo "

" .tra("If you have run BOINC under this account, you can still access it. Here's how:")."