From b68b7146789642ffc9319be229899db7ce1a59c9 Mon Sep 17 00:00:00 2001 From: Jose Varghese <34977009+josevarghese@users.noreply.github.com> Date: Tue, 11 Jun 2024 01:16:02 +0530 Subject: [PATCH 1/5] Example for the profile command updated and a small typo correction --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7cd58ef7..2313694f 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Quick links: [Overview](#overview) | [Using](#using) | [Installing](#installing) `wp profile` monitors key performance indicators of the WordPress execution process to help you quickly identify points of slowness. -Save hours diagnosing slow WordPress sites. Because you can easily run it on any server that supports WP-CLI, `wp profile` compliments Xdebug and New Relic by pointing you in the right direction for further debugging. Because it runs on the command line, using `wp profile` means you don't have to install a plugin and deal with the painful dashboard of a slow WordPress site. And, because it's a WP-CLI command, `wp profile` makes it easy to perfom hard tasks (e.g. [profiling a WP REST API response](https://danielbachhuber.com/tip/profile-wp-rest-api/)). +Save hours diagnosing slow WordPress sites. Because you can easily run it on any server that supports WP-CLI, `wp profile` compliments Xdebug and New Relic by pointing you in the right direction for further debugging. Because it runs on the command line, using `wp profile` means you don't have to install a plugin and deal with the painful dashboard of a slow WordPress site. And, because it's a WP-CLI command, `wp profile` makes it easy to perform hard tasks (e.g. [profiling a WP REST API response](https://danielbachhuber.com/tip/profile-wp-rest-api/)). [Identify why WordPress is slow in just a few steps](https://danielbachhuber.com/tip/identify-wordpress-slowness/) with `wp profile`. @@ -97,15 +97,16 @@ render based on the main query, and renders it. +--------------------------+---------+-------------+ | hook | time | cache_ratio | +--------------------------+---------+-------------+ - | muplugins_loaded:before | 0.2335s | 40% | - | muplugins_loaded | 0.0007s | 50% | - | plugins_loaded:before | 0.2792s | 77.63% | - | plugins_loaded | 0.1502s | 100% | - | after_setup_theme:before | 0.068s | 100% | - | init | 0.2643s | 96.88% | - | wp_loaded:after | 0.0377s | | + | muplugins_loaded:before | 0.1767s | 33.33% | + | plugins_loaded:before | 0.103s | 78.13% | + | plugins_loaded | 0.0194s | 19.32% | + | setup_theme | 0.0018s | 75% | + | after_setup_theme:before | 0.0116s | 95.45% | + | after_setup_theme | 0.0049s | 96% | + | init | 0.1428s | 76.74% | + | wp_loaded:after | 0.0236s | | +--------------------------+---------+-------------+ - | total (7) | 1.0335s | 77.42% | + | total (8) | 0.4837s | 67.71% | +--------------------------+---------+-------------+ From 8e8c805c350104d0001ed8ec4125ada6d031fcfe Mon Sep 17 00:00:00 2001 From: Jose Varghese <34977009+josevarghese@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:45:48 +0530 Subject: [PATCH 2/5] Updated Command.php example for the wp profile stage bootstrap --- src/Command.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Command.php b/src/Command.php index 978dcb27..b3d6936d 100644 --- a/src/Command.php +++ b/src/Command.php @@ -27,15 +27,16 @@ * +--------------------------+---------+-------------+ * | hook | time | cache_ratio | * +--------------------------+---------+-------------+ - * | muplugins_loaded:before | 0.2335s | 40% | - * | muplugins_loaded | 0.0007s | 50% | - * | plugins_loaded:before | 0.2792s | 77.63% | - * | plugins_loaded | 0.1502s | 100% | - * | after_setup_theme:before | 0.068s | 100% | - * | init | 0.2643s | 96.88% | - * | wp_loaded:after | 0.0377s | | + * | muplugins_loaded:before | 0.1767s | 33.33% | + * | plugins_loaded:before | 0.103s | 78.13% | + * | plugins_loaded | 0.0194s | 19.32% | + * | setup_theme | 0.0018s | 75% | + * | after_setup_theme:before | 0.0116s | 95.45% | + * | after_setup_theme | 0.0049s | 96% | + * | init | 0.1428s | 76.74% | + * | wp_loaded:after | 0.0236s | | * +--------------------------+---------+-------------+ - * | total (7) | 1.0335s | 77.42% | + * | total (8) | 0.4837s | 67.71% | * +--------------------------+---------+-------------+ * * @package wp-cli From a55498e90c1c7c017e9b9ab2425d4e1916ae8404 Mon Sep 17 00:00:00 2001 From: josevarghese Date: Thu, 13 Jun 2024 19:53:14 +0530 Subject: [PATCH 3/5] added to command.php --- src/Command.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Command.php b/src/Command.php index b3d6936d..ea2e98d6 100644 --- a/src/Command.php +++ b/src/Command.php @@ -27,6 +27,8 @@ * +--------------------------+---------+-------------+ * | hook | time | cache_ratio | * +--------------------------+---------+-------------+ + * | hook | time | cache_ratio | + * +--------------------------+---------+-------------+ * | muplugins_loaded:before | 0.1767s | 33.33% | * | plugins_loaded:before | 0.103s | 78.13% | * | plugins_loaded | 0.0194s | 19.32% | From 2acd5e2033887be6f9c8c2febc003c29d68d9bf6 Mon Sep 17 00:00:00 2001 From: josevarghese Date: Thu, 13 Jun 2024 19:56:11 +0530 Subject: [PATCH 4/5] revert a mistake happened while committing --- src/Command.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Command.php b/src/Command.php index ea2e98d6..b3d6936d 100644 --- a/src/Command.php +++ b/src/Command.php @@ -27,8 +27,6 @@ * +--------------------------+---------+-------------+ * | hook | time | cache_ratio | * +--------------------------+---------+-------------+ - * | hook | time | cache_ratio | - * +--------------------------+---------+-------------+ * | muplugins_loaded:before | 0.1767s | 33.33% | * | plugins_loaded:before | 0.103s | 78.13% | * | plugins_loaded | 0.0194s | 19.32% | From 0120d7ea3fd02128e476253413b3305500b8d86b Mon Sep 17 00:00:00 2001 From: josevarghese Date: Thu, 13 Jun 2024 21:00:53 +0530 Subject: [PATCH 5/5] corrected typo for the word 'perform' --- bin/readme/overview-body.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/readme/overview-body.md b/bin/readme/overview-body.md index 115fff0a..e410d5a8 100644 --- a/bin/readme/overview-body.md +++ b/bin/readme/overview-body.md @@ -1,5 +1,5 @@ `wp profile` monitors key performance indicators of the WordPress execution process to help you quickly identify points of slowness. -Save hours diagnosing slow WordPress sites. Because you can easily run it on any server that supports WP-CLI, `wp profile` compliments Xdebug and New Relic by pointing you in the right direction for further debugging. Because it runs on the command line, using `wp profile` means you don't have to install a plugin and deal with the painful dashboard of a slow WordPress site. And, because it's a WP-CLI command, `wp profile` makes it easy to perfom hard tasks (e.g. [profiling a WP REST API response](https://danielbachhuber.com/tip/profile-wp-rest-api/)). +Save hours diagnosing slow WordPress sites. Because you can easily run it on any server that supports WP-CLI, `wp profile` compliments Xdebug and New Relic by pointing you in the right direction for further debugging. Because it runs on the command line, using `wp profile` means you don't have to install a plugin and deal with the painful dashboard of a slow WordPress site. And, because it's a WP-CLI command, `wp profile` makes it easy to perform hard tasks (e.g. [profiling a WP REST API response](https://danielbachhuber.com/tip/profile-wp-rest-api/)). [Identify why WordPress is slow in just a few steps](https://danielbachhuber.com/tip/identify-wordpress-slowness/) with `wp profile`.