Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #54 from andreeaflorescu/master
Browse files Browse the repository at this point in the history
Added paramter --wait-after-warmup
  • Loading branch information
fredemmott committed Nov 6, 2015
2 parents c791502 + 1d6662f commit 3e4e8bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/PerfOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ final class PerfOptions {
// Pause once benchmarking is complete to allow for manual inspection of the
// HHVM or PHP process.
public bool $waitAtEnd = false;
// Pause after the warmup is completed to get relevant data when profiling
public bool $waitAfterWarmup = false;

//
// HHVM specific options to enable RepoAuthoritative mode and the static
Expand Down Expand Up @@ -116,6 +118,7 @@ public function __construct(Vector<string> $argv) {
'siege:',
'nginx:',
'wait-at-end',
'wait-after-warmup',
'no-proxygen',
'no-repo-auth',
'no-file-cache',
Expand Down Expand Up @@ -216,6 +219,7 @@ public function __construct(Vector<string> $argv) {

$this->skipSanityCheck = $this->getBool('skip-sanity-check');
$this->skipWarmUp = $this->getBool('skip-warmup');
$this->waitAfterWarmup = $this->getBool('wait-after-warmup');
$this->skipVersionChecks = $this->getBool('skip-version-checks');
$this->skipDatabaseInstall = $this->getBool('skip-database-install');
$this->noTimeLimit = $this->getBool('no-time-limit');
Expand Down
5 changes: 5 additions & 0 deletions base/PerfRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ private static function RunWithOptionsAndEngine(
self::PrintProgress('Clearing nginx access.log');
$nginx->clearAccessLog();

if ($options->waitAfterWarmup) {
self::PrintProgress('Finished warmup. Press Enter to continue the benchmark');
fread(STDIN, 1);
}

self::PrintProgress('Starting Siege for benchmark');
$siege = new Siege($options, $target, RequestModes::BENCHMARK);
$siege->start();
Expand Down

0 comments on commit 3e4e8bf

Please sign in to comment.