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

updating oss-performance to work with recent changes to invariant sig… #78

Merged
merged 3 commits into from Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/BuildChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static function Check(
if ($skipKeys->contains($k)) {
continue;
}
invariant(is_array($v), $k.' is not an array');
invariant(is_array($v), '%s', $k.' is not an array');
$v = self::MakeCheckedValue($v);
if ($v['OK']) {
continue;
Expand Down
3 changes: 3 additions & 0 deletions base/PerfRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private static function RunWithOptionsAndEngine(
Process::sleepSeconds($options->delayPhpStartup);
invariant(
$php_engine->isRunning(),
'%s',
'Failed to start '.get_class($php_engine),
);

Expand Down Expand Up @@ -114,6 +115,7 @@ private static function RunWithOptionsAndEngine(
invariant(!$siege->isRunning(), 'Siege is still running :/');
invariant(
$php_engine->isRunning(),
'%s',
get_class($php_engine).' crashed',
);
} else {
Expand All @@ -130,6 +132,7 @@ private static function RunWithOptionsAndEngine(
invariant(!$siege->isRunning(), 'Siege is still running :/');
invariant(
$php_engine->isRunning(),
'%s',
get_class($php_engine).' crashed',
);
} else {
Expand Down
1 change: 1 addition & 0 deletions base/PerfTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final public function sanityCheck(): void {
$content = file_get_contents($url, /* include path = */ false, $ctx);
invariant(
strstr($content, $this->getSanityCheckString()) !== false,
'%s',
'Failed to find string "'.$this->getSanityCheckString().'" in '.$url,
);
}
Expand Down
2 changes: 1 addition & 1 deletion base/Siege.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected function getArguments(): Vector<string> {
return $arguments;
default:
invariant_violation(
'Unexpected request mode: '.(string) $this->mode,
'%s', 'Unexpected request mode: '.(string) $this->mode,
);
}
}
Expand Down
1 change: 1 addition & 0 deletions targets/wordpress/WordpressTarget.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ private function unfreezeRequest(PerfOptions $options): void {
$data = file_get_contents($url, /* include path = */ false, $ctx);
invariant(
$data !== false,
'%s',
'Failed to unfreeze '.
$url.
' after '.
Expand Down