当前位置: 首页>>代码示例>>PHP>>正文


PHP Build::withRunAndMode方法代码示例

本文整理汇总了PHP中Build::withRunAndMode方法的典型用法代码示例。如果您正苦于以下问题:PHP Build::withRunAndMode方法的具体用法?PHP Build::withRunAndMode怎么用?PHP Build::withRunAndMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Build的用法示例。


在下文中一共展示了Build::withRunAndMode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: findSortOrder

 private static function findSortOrder($run, $mode_id, $revision)
 {
     $version_control = VersionControl::forMode($mode_id);
     $j = 0;
     while (True) {
         if ($j++ > 30) {
             throw new Exception("There shouldn't be too many runs in between");
         }
         if (!$run->isBuildInfoComplete()) {
             throw new Exception("Encountered an incomplete run.");
         }
         $build = Build::withRunAndMode($run->id, $mode_id);
         // We can safely ignore runs that have no results with the requested mode_id
         if (!$build) {
             $run = $run->next();
             continue;
         }
         // We skip to the next run, if revisions are the same.
         // To make sure that new runs are shown after existing ones.
         if ($version_control->equal($build->revision(), $revision)) {
             $run = $run->next();
             continue;
         }
         // Using version control take a peek if the revision
         // is later/earlier than this one.
         if ($version_control->isAfter($build->revision(), $revision)) {
             return $run->sort_order();
         }
         $run = $run->next();
     }
 }
开发者ID:stoklund,项目名称:arewefastyet,代码行数:31,代码来源:RunReporter.php

示例2: inbetweenBuilds

 static function inbetweenBuilds($regression)
 {
     $build = $regression->build();
     $run = $build->run();
     $mode_id = $build->mode_id();
     $machine_id = $run->machine_id();
     $sortOrder = $run->sort_order();
     $prevSortOrder = $regression->prev_build()->run()->sort_order();
     $builds = array();
     for ($i = $prevSortOrder + 1; $i < $sortOrder; $i++) {
         $run_i = Run::withMachineAndSortOrder($machine_id, $i);
         if (!$run_i->isFinished()) {
             continue;
         }
         $build = Build::withRunAndMode($run_i->id, $mode_id);
         if (!$build) {
             continue;
         }
         if (count($build->scores()) == 0) {
             continue;
         }
         $builds[] = $build;
     }
     return $builds;
 }
开发者ID:stoklund,项目名称:arewefastyet,代码行数:25,代码来源:RegressionTools.php

示例3: GET_string

    }
    $error = GET_string('error');
    $run->finish($status, $error);
    die;
}
if (GET_string("run") == 'addEngine') {
    $run = new Run(GET_int('runid'));
    $revision = GET_string('cset');
    $mode = Mode::FromMode(GET_string('name'));
    if ($run->isFinished() || $run->hasError()) {
        throw new Exception("Run was already finished or error'ed");
    }
    if ($run->isOutOfOrder()) {
        // out of order builds cannot add extra modes. The available
        // mode have already been added.
        if (!Build::withRunAndMode($run->id, $mode->id)) {
            $run->finish(0, "Tried to add extra modes to out of order run.");
        }
        die;
    }
    Build::insert($run, $mode->id, $revision);
    die;
}
// Report that a slave is still awake when there are no benchmarks results
// to send.
if (GET_string('awake') == 'yes') {
    $MACHINE = GET_int('MACHINE');
    mysql_query("UPDATE awfy_machine\n                 SET last_checked = UNIX_TIMESTAMP()\n                 WHERE id = {$MACHINE}") or die("ERROR: " . mysql_error());
    die;
}
// Report score of a benchmark total or subtest.
开发者ID:stoklund,项目名称:arewefastyet,代码行数:31,代码来源:UPDATE.php


注:本文中的Build::withRunAndMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。