Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Static Protected Attributes | List of all members
core_upgrade_time Class Reference

Static class monitors performance of upgrade steps. More...

Static Public Member Functions

static get_elapsed ()
 Gets the time since the record_start function was called, rounded to 2 digits. More...
 
static record_savepoint ($version)
 Records current time at the end of a given numbered step. More...
 
static record_start ()
 Records current time at the start of the current upgrade item, e.g. More...
 

Static Protected Attributes

static float $before
 Time at start of current upgrade (plugin/system)
 
static bool $isrecording = false
 Flag to indicate whether we are recording timestamps or not.
 
static float $lastsavepoint
 Time at end of last savepoint.
 

Detailed Description

Static class monitors performance of upgrade steps.

Member Function Documentation

◆ 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
floatElapsed time

◆ record_savepoint()

static core_upgrade_time::record_savepoint (   $version)
static

Records current time at the end of a given numbered step.

Parameters
float$versionVersion number (may have decimals, or not)

◆ record_start()

static core_upgrade_time::record_start ( )
static

Records current time at the start of the current upgrade item, e.g.

plugin.


The documentation for this class was generated from the following file: