laravel / 10 / api / 10.x / illuminate / support / benchmark.html

Benchmark

class Benchmark (View source)

Methods

static array|float measure(Closure|array $benchmarkables, int $iterations = 1)

Measure a callable or array of callables over the given number of iterations.

static void dd(Closure|array $benchmarkables, int $iterations = 1)

Measure a callable or array of callables over the given number of iterations, then dump and die.

Details

static array|float measure(Closure|array $benchmarkables, int $iterations = 1)

Measure a callable or array of callables over the given number of iterations.

Parameters

Closure|array $benchmarkables
int $iterations

Return Value

array|float

static void dd(Closure|array $benchmarkables, int $iterations = 1)

Measure a callable or array of callables over the given number of iterations, then dump and die.

Parameters

Closure|array $benchmarkables
int $iterations

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Support/Benchmark.html