From a8784819a6960851046aa02382764ddce454f0cd Mon Sep 17 00:00:00 2001 From: Rui Sardinha Date: Fri, 26 Jul 2019 11:11:07 +0100 Subject: [PATCH] Fix using --format other than table As pointed out on issue #152 the `--format` option is not doing so well when using values other than `table`. Also on that issue, @swang-va commented (https://github.com/wp-cli/profile-command/issues/152#issuecomment-489212586) about a possible solution that seems to fix the issue. --- src/Logger.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Logger.php b/src/Logger.php index 6a8cb33..c201875 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -4,16 +4,17 @@ namespace WP_CLI\Profile; class Logger { - public $time = 0; - public $query_count = 0; - public $query_time = 0; - public $cache_hits = 0; - public $cache_misses = 0; - public $cache_ratio = null; - public $hook_count = 0; - public $hook_time = 0; - public $request_count = 0; - public $request_time = 0; + public $time = 0; + public $query_count = 0; + public $query_time = 0; + public $cache_hits = 0; + public $cache_misses = 0; + public $cache_ratio = null; + public $hook_count = 0; + public $hook_time = 0; + public $request_count = 0; + public $request_time = 0; + public $callback_count = 0; private $start_time = null; private $query_offset = null;