StopwatchMiddleware

in package
Implements Middleware

Interfaces, Classes & Used Traits

Middleware

Properties

private$memory  : int                

private$stopwatch  : \Symfony\Component\Stopwatch\Stopwatch                

private$logger  : \Psr\Log\LoggerInterface                

Methods

public__construct(Stopwatch $stopwatch, LoggerInterface $logger) : mixed

Parameters

$stopwatch : Stopwatch
$logger : LoggerInterface

Returns

mixed

Executes this middleware class.

publicexecute(Command $command, callable $next) : object

Parameters

$command : Command
$next : callable

Returns

object

Dispatches a logging request.

privatelog(string $message[, string $priority = LogLevel::INFO ][, array $parameters = [] ]) : void

Parameters

$message : string
$priority : string = LogLevel::INFO
$parameters : array = []

privateformatMemoryInMegabytes(int $memory) : string

Parameters

$memory : int

Returns

string

privateformatMemoryInKilobytes(int $memory) : string

Parameters

$memory : int

Returns

string