mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-20 06:30:55 +08:00
Fix location of --format=<format>
YAML docs
This commit is contained in:
parent
43353544a7
commit
0957d764ee
2 changed files with 84 additions and 39 deletions
56
README.md
56
README.md
|
@ -24,7 +24,7 @@ This package implements the following commands:
|
||||||
Profile each stage of the WordPress load process (bootstrap, main_query, template).
|
Profile each stage of the WordPress load process (bootstrap, main_query, template).
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
wp profile stage [<stage>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>]
|
wp profile stage [<stage>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
When WordPress handles a request from a browser, it’s essentially
|
When WordPress handles a request from a browser, it’s essentially
|
||||||
|
@ -96,6 +96,18 @@ $ wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight
|
||||||
- csv
|
- csv
|
||||||
---
|
---
|
||||||
|
|
||||||
|
[--order=<order>]
|
||||||
|
Ascending or Descending order.
|
||||||
|
---
|
||||||
|
default: ASC
|
||||||
|
options:
|
||||||
|
- ASC
|
||||||
|
- DESC
|
||||||
|
---
|
||||||
|
|
||||||
|
[--orderby=<orderby>]
|
||||||
|
Order by fields.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### wp profile hook
|
### wp profile hook
|
||||||
|
@ -103,7 +115,7 @@ $ wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight
|
||||||
Profile key metrics for WordPress hooks (actions and filters).
|
Profile key metrics for WordPress hooks (actions and filters).
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
wp profile hook [<hook>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>]
|
wp profile hook [<hook>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
In order to profile callbacks on a specific hook, the action or filter
|
In order to profile callbacks on a specific hook, the action or filter
|
||||||
|
@ -137,6 +149,18 @@ will need to execute during the course of the request.
|
||||||
- csv
|
- csv
|
||||||
---
|
---
|
||||||
|
|
||||||
|
[--order=<order>]
|
||||||
|
Ascending or Descending order.
|
||||||
|
---
|
||||||
|
default: ASC
|
||||||
|
options:
|
||||||
|
- ASC
|
||||||
|
- DESC
|
||||||
|
---
|
||||||
|
|
||||||
|
[--orderby=<orderby>]
|
||||||
|
Order by fields.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### wp profile eval
|
### wp profile eval
|
||||||
|
@ -144,7 +168,7 @@ will need to execute during the course of the request.
|
||||||
Profile arbitrary code execution.
|
Profile arbitrary code execution.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
wp profile eval <php-code> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>]
|
wp profile eval <php-code> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Code execution happens after WordPress has loaded entirely, which means
|
Code execution happens after WordPress has loaded entirely, which means
|
||||||
|
@ -173,6 +197,18 @@ current theme.
|
||||||
- csv
|
- csv
|
||||||
---
|
---
|
||||||
|
|
||||||
|
[--order=<order>]
|
||||||
|
Ascending or Descending order.
|
||||||
|
---
|
||||||
|
default: ASC
|
||||||
|
options:
|
||||||
|
- ASC
|
||||||
|
- DESC
|
||||||
|
---
|
||||||
|
|
||||||
|
[--orderby=<orderby>]
|
||||||
|
Order by fields.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### wp profile eval-file
|
### wp profile eval-file
|
||||||
|
@ -180,7 +216,7 @@ current theme.
|
||||||
Profile execution of an arbitrary file.
|
Profile execution of an arbitrary file.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
wp profile eval-file <file> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>]
|
wp profile eval-file <file> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
File execution happens after WordPress has loaded entirely, which means
|
File execution happens after WordPress has loaded entirely, which means
|
||||||
|
@ -209,6 +245,18 @@ current theme.
|
||||||
- csv
|
- csv
|
||||||
---
|
---
|
||||||
|
|
||||||
|
[--order=<order>]
|
||||||
|
Ascending or Descending order.
|
||||||
|
---
|
||||||
|
default: ASC
|
||||||
|
options:
|
||||||
|
- ASC
|
||||||
|
- DESC
|
||||||
|
---
|
||||||
|
|
||||||
|
[--orderby=<orderby>]
|
||||||
|
Order by fields.
|
||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
Installing this package requires WP-CLI's latest stable release. Update to the latest stable release with `wp cli update`.
|
Installing this package requires WP-CLI's latest stable release. Update to the latest stable release with `wp cli update`.
|
||||||
|
|
|
@ -70,6 +70,14 @@ class Command {
|
||||||
*
|
*
|
||||||
* [--format=<format>]
|
* [--format=<format>]
|
||||||
* : Render output in a particular format.
|
* : Render output in a particular format.
|
||||||
|
* ---
|
||||||
|
* default: table
|
||||||
|
* options:
|
||||||
|
* - table
|
||||||
|
* - json
|
||||||
|
* - yaml
|
||||||
|
* - csv
|
||||||
|
* ---
|
||||||
*
|
*
|
||||||
* [--order=<order>]
|
* [--order=<order>]
|
||||||
* : Ascending or Descending order.
|
* : Ascending or Descending order.
|
||||||
|
@ -83,15 +91,6 @@ class Command {
|
||||||
* [--orderby=<orderby>]
|
* [--orderby=<orderby>]
|
||||||
* : Order by fields.
|
* : Order by fields.
|
||||||
*
|
*
|
||||||
* ---
|
|
||||||
* default: table
|
|
||||||
* options:
|
|
||||||
* - table
|
|
||||||
* - json
|
|
||||||
* - yaml
|
|
||||||
* - csv
|
|
||||||
* ---
|
|
||||||
*
|
|
||||||
* @when before_wp_load
|
* @when before_wp_load
|
||||||
*/
|
*/
|
||||||
public function stage( $args, $assoc_args ) {
|
public function stage( $args, $assoc_args ) {
|
||||||
|
@ -177,6 +176,14 @@ class Command {
|
||||||
*
|
*
|
||||||
* [--format=<format>]
|
* [--format=<format>]
|
||||||
* : Render output in a particular format.
|
* : Render output in a particular format.
|
||||||
|
* ---
|
||||||
|
* default: table
|
||||||
|
* options:
|
||||||
|
* - table
|
||||||
|
* - json
|
||||||
|
* - yaml
|
||||||
|
* - csv
|
||||||
|
* ---
|
||||||
*
|
*
|
||||||
* [--order=<order>]
|
* [--order=<order>]
|
||||||
* : Ascending or Descending order.
|
* : Ascending or Descending order.
|
||||||
|
@ -190,14 +197,6 @@ class Command {
|
||||||
* [--orderby=<orderby>]
|
* [--orderby=<orderby>]
|
||||||
* : Order by fields.
|
* : Order by fields.
|
||||||
*
|
*
|
||||||
* default: table
|
|
||||||
* options:
|
|
||||||
* - table
|
|
||||||
* - json
|
|
||||||
* - yaml
|
|
||||||
* - csv
|
|
||||||
* ---
|
|
||||||
*
|
|
||||||
* @when before_wp_load
|
* @when before_wp_load
|
||||||
*/
|
*/
|
||||||
public function hook( $args, $assoc_args ) {
|
public function hook( $args, $assoc_args ) {
|
||||||
|
@ -261,6 +260,14 @@ class Command {
|
||||||
*
|
*
|
||||||
* [--format=<format>]
|
* [--format=<format>]
|
||||||
* : Render output in a particular format.
|
* : Render output in a particular format.
|
||||||
|
* ---
|
||||||
|
* default: table
|
||||||
|
* options:
|
||||||
|
* - table
|
||||||
|
* - json
|
||||||
|
* - yaml
|
||||||
|
* - csv
|
||||||
|
* ---
|
||||||
*
|
*
|
||||||
* [--order=<order>]
|
* [--order=<order>]
|
||||||
* : Ascending or Descending order.
|
* : Ascending or Descending order.
|
||||||
|
@ -274,15 +281,6 @@ class Command {
|
||||||
* [--orderby=<orderby>]
|
* [--orderby=<orderby>]
|
||||||
* : Order by fields.
|
* : Order by fields.
|
||||||
*
|
*
|
||||||
* ---
|
|
||||||
* default: table
|
|
||||||
* options:
|
|
||||||
* - table
|
|
||||||
* - json
|
|
||||||
* - yaml
|
|
||||||
* - csv
|
|
||||||
* ---
|
|
||||||
*
|
|
||||||
* @subcommand eval
|
* @subcommand eval
|
||||||
*/
|
*/
|
||||||
public function eval_( $args, $assoc_args ) {
|
public function eval_( $args, $assoc_args ) {
|
||||||
|
@ -316,6 +314,14 @@ class Command {
|
||||||
*
|
*
|
||||||
* [--format=<format>]
|
* [--format=<format>]
|
||||||
* : Render output in a particular format.
|
* : Render output in a particular format.
|
||||||
|
* ---
|
||||||
|
* default: table
|
||||||
|
* options:
|
||||||
|
* - table
|
||||||
|
* - json
|
||||||
|
* - yaml
|
||||||
|
* - csv
|
||||||
|
* ---
|
||||||
*
|
*
|
||||||
* [--order=<order>]
|
* [--order=<order>]
|
||||||
* : Ascending or Descending order.
|
* : Ascending or Descending order.
|
||||||
|
@ -329,15 +335,6 @@ class Command {
|
||||||
* [--orderby=<orderby>]
|
* [--orderby=<orderby>]
|
||||||
* : Order by fields.
|
* : Order by fields.
|
||||||
*
|
*
|
||||||
* ---
|
|
||||||
* default: table
|
|
||||||
* options:
|
|
||||||
* - table
|
|
||||||
* - json
|
|
||||||
* - yaml
|
|
||||||
* - csv
|
|
||||||
* ---
|
|
||||||
*
|
|
||||||
* @subcommand eval-file
|
* @subcommand eval-file
|
||||||
*/
|
*/
|
||||||
public function eval_file( $args, $assoc_args ) {
|
public function eval_file( $args, $assoc_args ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue