MediaWiki fundraising/REL1_35
|
Records duration of various operations. More...
Public Member Functions | |
__construct (LoggerInterface $logger, $commLogger, $gatewayName) | |
DonationProfiler constructor. | |
getStopwatch ( $string, $reset=false) | |
getStopwatch keeps track of how long things take, for logging, output, determining if we should loop on some method again... whatever. | |
saveCommunicationStats ( $function='', $additional='', $vars='') | |
Protected Attributes | |
$commLogger | |
$gatewayName | |
$logger | |
Static Protected Attributes | |
static array | $start = [] |
The microtime at which each stopwatch was started. | |
Records duration of various operations.
Definition at line 9 of file DonationProfiler.php.
DonationProfiler::__construct | ( | LoggerInterface | $logger, |
$commLogger, | |||
$gatewayName ) |
DonationProfiler constructor.
LoggerInterface | $logger | Used to record time at each getStopwatch call |
LoggerInterface | null | $commLogger | If not null, used to record communications statistics |
string | $gatewayName | identifier |
Definition at line 25 of file DonationProfiler.php.
References $commLogger, $gatewayName, and $logger.
DonationProfiler::getStopwatch | ( | $string, | |
$reset = false ) |
getStopwatch keeps track of how long things take, for logging, output, determining if we should loop on some method again... whatever.
string | $string | Some identifier for each stopwatch value we want to keep. Each unique $string passed in will get its own value in $start. |
bool | $reset | If this is set to true, it will reset any $start value recorded for the $string identifier. |
Definition at line 41 of file DonationProfiler.php.
References $start.
Referenced by saveCommunicationStats().
DonationProfiler::saveCommunicationStats | ( | $function = '', | |
$additional = '', | |||
$vars = '' ) |
string | $function | This is the function name that identifies the stopwatch that should have already been started with the profiler. |
string | $additional | Additional information about the thing we're currently timing. Meant to be easily searchable. |
string | $vars | Intended to be particular values of any variables that might be of interest. |
Definition at line 60 of file DonationProfiler.php.
References $gatewayName, and getStopwatch().
|
protected |
Definition at line 11 of file DonationProfiler.php.
Referenced by __construct().
|
protected |
Definition at line 12 of file DonationProfiler.php.
Referenced by __construct(), and saveCommunicationStats().
|
protected |
Definition at line 10 of file DonationProfiler.php.
Referenced by __construct().
|
staticprotected |
The microtime at which each stopwatch was started.
Definition at line 17 of file DonationProfiler.php.
Referenced by getStopwatch().