mirror of
https://hk.gh-proxy.com/https://github.com/wp-cli/profile-command.git
synced 2025-08-18 06:11:20 +08:00
Initial commit
This commit is contained in:
commit
6cfb16f387
6 changed files with 120 additions and 0 deletions
21
.editorconfig
Normal file
21
.editorconfig
Normal file
|
@ -0,0 +1,21 @@
|
|||
# This file is for unifying the coding style for different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
# WordPress Coding Standards
|
||||
# https://make.wordpress.org/core/handbook/coding-standards/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = tab
|
||||
|
||||
[{.jshintrc,*.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{*.txt,wp-config-sample.php}]
|
||||
end_of_line = crlf
|
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
.DS_Store
|
||||
composer.lock
|
||||
wp-cli.local.yml
|
||||
node_modules/
|
||||
vendor/
|
53
README.md
Normal file
53
README.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
runcommand/profile
|
||||
==================
|
||||
|
||||
Profile the performance of a request to WordPress.
|
||||
|
||||
[](https://travis-ci.org/runcommand/profile)
|
||||
|
||||
Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing)
|
||||
|
||||
## Using
|
||||
|
||||
~~~
|
||||
wp profile
|
||||
~~~
|
||||
|
||||
## Installing
|
||||
|
||||
Installing this package requires WP-CLI v0.23.0 or greater. Update to the latest stable release with `wp cli update`.
|
||||
|
||||
Once you've done so, you can install this package with `wp package install runcommand/profile`.
|
||||
|
||||
## Contributing
|
||||
|
||||
We appreciate you taking the initiative to contribute to this project.
|
||||
|
||||
Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.
|
||||
|
||||
### Reporting a bug
|
||||
|
||||
Think you’ve found a bug? We’d love for you to help us get it fixed.
|
||||
|
||||
Before you create a new issue, you should [search existing issues](https://github.com/runcommand/profile/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.
|
||||
|
||||
Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/runcommand/profile/issues/new) with the following:
|
||||
|
||||
1. What you were doing (e.g. "When I run `wp post list`").
|
||||
2. What you saw (e.g. "I see a fatal about a class being undefined.").
|
||||
3. What you expected to see (e.g. "I expected to see the list of posts.")
|
||||
|
||||
Include as much detail as you can, and clear steps to reproduce if possible.
|
||||
|
||||
### Creating a pull request
|
||||
|
||||
Want to contribute a new feature? Please first [open a new issue](https://github.com/runcommand/profile/issues/new) to discuss whether the feature is a good fit for the project.
|
||||
|
||||
Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience:
|
||||
|
||||
1. Create a feature branch for each contribution.
|
||||
2. Submit your pull request early for feedback.
|
||||
3. Include functional tests with your changes. [Read the WP-CLI documentation](https://wp-cli.org/docs/pull-requests/#functional-tests) for an introduction.
|
||||
4. Follow the [WordPress Coding Standards](http://make.wordpress.org/core/handbook/coding-standards/).
|
||||
|
||||
*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*
|
22
composer.json
Normal file
22
composer.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "runcommand/profile",
|
||||
"description": "Profile the performance of a request to WordPress.",
|
||||
"homepage": "https://runcommand.io/wp/profile/",
|
||||
"license": "MIT",
|
||||
"authors": [],
|
||||
"minimum-stability": "dev",
|
||||
"autoload": {
|
||||
"files": [ "command.php" ]
|
||||
},
|
||||
"require": {
|
||||
"wp-cli/wp-cli": "~0.23.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"behat/behat": "~2.5"
|
||||
},
|
||||
"extras": {
|
||||
"commands": [
|
||||
"profile"
|
||||
]
|
||||
}
|
||||
}
|
17
inc/class-profile-command.php
Normal file
17
inc/class-profile-command.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Profile the performance of a request to WordPress.
|
||||
*/
|
||||
class Profile_Command {
|
||||
|
||||
/**
|
||||
* Profile the performance of a request to WordPress.
|
||||
*
|
||||
* @when before_wp_load
|
||||
*/
|
||||
public function __invoke() {
|
||||
|
||||
}
|
||||
|
||||
}
|
2
wp-cli.yml
Normal file
2
wp-cli.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
require:
|
||||
- command.php
|
Loading…
Add table
Add a link
Reference in a new issue