Static class monitors performance of upgrade steps.
More...
|
static | get_elapsed () |
| Gets the time since the record_start function was called, rounded to 2 digits.
|
|
static | record_detail (string $detail, bool $showalways=false) |
| Records time taken by a detail of the install process.
|
|
static | record_end (bool $verbose=true) |
| Records the end of the current upgrade item.
|
|
static | record_savepoint ($version) |
| Records current time at the end of a given numbered step.
|
|
static | record_start (bool $installation=false) |
| Records current time at the start of the current upgrade item, e.g.
|
|
|
float const | THRESHOLD = 1.0 |
| For details, only show if they take longer than a second.
|
|
|
static float | $before |
| Time at start of current upgrade (plugin/system)
|
|
static bool | $installation = false |
| Flag indicates whether this is an installation (=no savepoints)
|
|
static bool | $isrecording = false |
| Flag to indicate whether we are recording timestamps or not.
|
|
static float | $lastdetail |
| Time at end of last recorded savepoint or detail.
|
|
Static class monitors performance of upgrade steps.
◆ get_elapsed()
static core_upgrade_time::get_elapsed |
( |
| ) |
|
|
static |
Gets the time since the record_start function was called, rounded to 2 digits.
- Return values
-
◆ record_detail()
static core_upgrade_time::record_detail |
( |
string | $detail, |
|
|
bool | $showalways = false ) |
|
static |
Records time taken by a detail of the install process.
Time is only displayed if longer than threshold, and if in developer debug mode.
- Parameters
-
string | $detail | Text e.g. file or function name |
bool | $showalways | If true, shows time even if quick |
◆ record_end()
static core_upgrade_time::record_end |
( |
bool | $verbose = true | ) |
|
|
static |
Records the end of the current upgrade item.
- Parameters
-
bool | $verbose | If true, displays output |
◆ record_savepoint()
static core_upgrade_time::record_savepoint |
( |
| $version | ) |
|
|
static |
Records current time at the end of a given numbered step.
- Parameters
-
float | $version | Version number (may have decimals, or not) |
◆ record_start()
static core_upgrade_time::record_start |
( |
bool | $installation = false | ) |
|
|
static |
Records current time at the start of the current upgrade item, e.g.
plugin.
- Parameters
-
bool | $installation | True if this is an installation (of this item) not upgrade |
The documentation for this class was generated from the following file: