Skip to content

Commit 2969db2

Browse files
committed
Test bench
1 parent 0cf9d5a commit 2969db2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Runtime/BlazeRuntime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct()
4545
*/
4646
public function ensureCompiled(string $path, string $compiledPath): void
4747
{
48-
if (isset($this->compiled[$path]) && file_exists($compiledPath)) {
48+
if (isset($this->compiled[$path])) {
4949
return;
5050
}
5151

workbench/app/Console/Commands/BenchmarkCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ protected function buildTable(array $results): array
240240
{
241241
$snapshot = $this->option('snapshot') ? null : $this->loadSnapshot();
242242

243-
$headers = ['Benchmark', 'Blade', 'Blaze', 'Improvement'];
243+
$headers = ['Blade', 'Blaze', 'Improvement'];
244244

245245
$rows = collect($results)->map(function ($result, $name) use ($snapshot) {
246246
$blade = $this->formatTime($result['blade_ms']);
@@ -253,7 +253,7 @@ protected function buildTable(array $results): array
253253
$improvement .= ' '.$this->formatImprovementChange($prev['improvement'], $this->improvement($result));
254254
}
255255

256-
return [$name, $blade, $blaze, $improvement];
256+
return [$blade, $blaze, $improvement];
257257
})->values()->all();
258258

259259
return [$headers, $rows, $snapshot];
@@ -470,7 +470,7 @@ protected function improvement(array $result): float
470470
: 0;
471471
}
472472

473-
protected function formatChange(float $old, float $new, float $threshold = 0.1): string
473+
protected function formatChange(float $old, float $new, float $threshold = 3): string
474474
{
475475
if ($old == 0) {
476476
return '(~)';
@@ -487,7 +487,7 @@ protected function formatChange(float $old, float $new, float $threshold = 0.1):
487487
return "({$sign}".round($change, 1).'%)';
488488
}
489489

490-
protected function formatImprovementChange(float $old, float $new, float $threshold = 0.1): string
490+
protected function formatImprovementChange(float $old, float $new, float $threshold = 0.2): string
491491
{
492492
$delta = round($new - $old, 1);
493493

0 commit comments

Comments
 (0)