Skip to content

Commit ccf320a

Browse files
authored
Clarify units for benchmark value for IDE accessibility (#55781)
1 parent d3376e1 commit ccf320a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Illuminate/Support/Benchmark.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function measure(Closure|array $benchmarkables, int $iterations =
2323

2424
$callback();
2525

26-
return (hrtime(true) - $start) / 1000000;
26+
return (hrtime(true) - $start) / 1_000_000;
2727
})->average();
2828
})->when(
2929
$benchmarkables instanceof Closure,
@@ -33,7 +33,7 @@ public static function measure(Closure|array $benchmarkables, int $iterations =
3333
}
3434

3535
/**
36-
* Measure a callable once and return the duration and result.
36+
* Measure a callable once and return the result and duration in milliseconds.
3737
*
3838
* @template TReturn of mixed
3939
*
@@ -48,7 +48,7 @@ public static function value(callable $callback): array
4848

4949
$result = $callback();
5050

51-
return [$result, (hrtime(true) - $start) / 1000000];
51+
return [$result, (hrtime(true) - $start) / 1_000_000];
5252
}
5353

5454
/**

0 commit comments

Comments
 (0)