mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-21 06:39:02 +08:00
Collapse the execution_time
heading
This commit is contained in:
parent
2536ff615f
commit
8399c7e693
3 changed files with 7 additions and 7 deletions
|
@ -4,7 +4,7 @@ namespace runcommand\Profile;
|
|||
|
||||
class Logger {
|
||||
|
||||
public $execution_time = 0;
|
||||
public $time = 0;
|
||||
public $queries = array(
|
||||
'count' => 0,
|
||||
'time' => 0,
|
||||
|
@ -58,7 +58,7 @@ class Logger {
|
|||
global $wpdb, $wp_object_cache;
|
||||
|
||||
if ( ! is_null( $this->start_time ) ) {
|
||||
$this->execution_time += microtime( true ) - $this->start_time;
|
||||
$this->time += microtime( true ) - $this->start_time;
|
||||
}
|
||||
if ( ! is_null( $this->query_offset ) ) {
|
||||
for ( $i = $this->query_offset; $i < count( $wpdb->queries ); $i++ ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue