예제 #1
0
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
if (strpos($_SERVER['SCRIPT_FILENAME'], "UPDATE.php") !== false) {
    die("Please rename this file to something more unknown.");
}
require_once "internals.php";
init_database();
require_once "lib/DB/Run.php";
require_once "lib/DB/Build.php";
require_once "lib/DB/Mode.php";
require_once "lib/RunReporter.php";
// Start a full benchmark run. Request a token/number used to report/group
// benchmark scores.
if (GET_string("run") == 'yes') {
    $machine_id = GET_int('MACHINE');
    $run = RunReporter::createForMachine($machine_id);
    echo "id=" . $run->id;
    die;
}
// Start an out of order run. Retriggering a particular mode.
if (GET_string("run") == 'ooo') {
    $machine_id = GET_int('MACHINE');
    $mode = Mode::FromMode(GET_string('mode'));
    $revision = GET_string('revision');
    $run_before_id = GET_int('run_before_id');
    $run_after_id = GET_int('run_after_id');
    $run = RunReporter::createOutOfOrder($machine_id, $mode->id, $revision, $run_before_id, $run_after_id);
    echo "id=" . $run->id;
    die;
}
// Finish a full benchmark run. Scores will only become visible from now on