Benchmark
class Benchmark (View source)
Traits
Properties
static protected array | $macros | The registered string macros. |
from Macroable |
Methods
Mix another object into the class.
Dynamically handle calls to the class.
Dynamically handle calls to the class.
Measure a callable or array of callables over the given number of iterations.
No description
Measure a callable or array of callables over the given number of iterations, then dump and die.
Details
static void
macro(string $name, object|callable $macro)
Register a custom macro.
static void
mixin(object $mixin, bool $replace = true)
Mix another object into the class.
static bool
hasMacro(string $name)
Checks if macro is registered.
static void
flushMacros()
Flush the existing macros.
static mixed
__callStatic(string $method, array $parameters)
Dynamically handle calls to the class.
mixed
__call(string $method, array $parameters)
Dynamically handle calls to the class.
static array|float
measure(Closure|array $benchmarkables, int $iterations = 1)
Measure a callable or array of callables over the given number of iterations.
static array
value(callable $callback)
No description
static never
dd(Closure|array $benchmarkables, int $iterations = 1)
Measure a callable or array of callables over the given number of iterations, then dump and die.