Daniel Bachhuber
75bb6f6c50
Clarify the --fields
argument
2016-10-19 05:27:31 -07:00
Daniel Bachhuber
d07b98046d
Mention that the hook needs to fire in order to profile it
2016-10-12 05:01:32 -07:00
Daniel Bachhuber
a553050462
Use --all
to profile callbacks on all hooks
2016-10-08 16:18:48 -07:00
Daniel Bachhuber
828f7d618e
Omit <hook>
to profile all called hooks
2016-10-08 07:27:46 -07:00
Daniel Bachhuber
2ea5138f08
Abstract profiler to a dedicated class
2016-10-08 06:37:41 -07:00
Daniel Bachhuber
ff802e8de9
WordPress doesn't like this last hook added to shutdown
2016-10-08 05:56:25 -07:00
Daniel Bachhuber
7be192206e
Indicate callback count when profiling a stage
2016-10-07 16:18:04 -07:00
Daniel Bachhuber
c24c302f4f
Use --all flag to profile all stages
2016-10-07 15:45:48 -07:00
Daniel Bachhuber
5d4d6450ce
Keep track of filter depth to appropriately handle recursion
2016-10-07 15:27:29 -07:00
Daniel Bachhuber
5a3cffcd79
Restore existing callbacks on the next hook
...
While this is less precise, doing so ensures our callbacks aren't called
twice (because they'll be called twice if they're restored to the
array).
2016-10-07 14:57:06 -07:00
Daniel Bachhuber
99914b71b2
Include callback definition source when profiling hooks
2016-10-07 14:20:08 -07:00
Daniel Bachhuber
6572e96664
Support profiling arbitrary file execution
2016-10-04 14:38:12 -07:00
Daniel Bachhuber
072d80e2d6
Support profiling the shutdown
hook
2016-10-04 14:10:27 -07:00
Daniel Bachhuber
3ff6ba0229
Use wp profile eval
to profile arbitrary code execution
2016-10-04 12:57:10 -07:00
Daniel Bachhuber
781db99ed7
Trailingslash provided URL to avoid canonical redirect
2016-10-04 07:18:01 -07:00
Daniel Bachhuber
767d9cb38c
Regenerate README for command split
2016-10-04 06:49:18 -07:00
Daniel Bachhuber
7e05977968
Split wp profile
into wp profile stage
and wp profile hook
2016-10-04 06:47:01 -07:00
Daniel Bachhuber
98c92bca7c
Ensure last callback is extremely late
2016-09-28 05:27:58 -07:00
Daniel Bachhuber
89ffa3a8cb
Fix incorrect variable
2016-09-28 05:12:54 -07:00
Daniel Bachhuber
f2960d7eab
Properly handle an unset $wp_filter
2016-09-27 08:10:41 -07:00
Daniel Bachhuber
024142a69a
Drop method that's no longer used
2016-09-27 08:01:12 -07:00
Daniel Bachhuber
f114b404e1
Take a more durable approach to timing callbacks by wrapping each
2016-09-27 07:58:36 -07:00
Daniel Bachhuber
b991373784
Fix profiling of early hooks
...
When we throw an Exception to bail out of the call, this means the rest
of the bootstrap code hasn't executed, and important things aren't set
up. Instead, we need to summarize early.
2016-09-23 06:33:30 -07:00
Daniel Bachhuber
033d53aaaf
Ensure the last step to a stage is logged appropriately
2016-09-08 17:42:58 -07:00
Daniel Bachhuber
c1d7639e9b
Catch hook Exceptions incrementally
...
This permits our output buffering to work as expected.
2016-09-08 06:02:48 -07:00
Daniel Bachhuber
f548144ab2
Bail early when there aren't any hook callbacks to run
2016-09-08 05:43:42 -07:00
Daniel Bachhuber
5a3748b62b
Register some basic hooks for the template stage
2016-08-30 06:57:55 -07:00
Daniel Bachhuber
7a00bd3938
Fix error notice when SAVEQUERIES
is already defined
...
If `SAVEQUERIES` is defined as false, then we need to bail, as query
profiling won't work.
2016-08-30 05:12:48 -07:00
Daniel Bachhuber
f34f47f4db
Add installing and support details to README
2016-08-29 07:20:58 -07:00
Daniel Bachhuber
e459117253
Add a description as to what this command is about
2016-08-29 06:51:40 -07:00
Daniel Bachhuber
42c17b03be
Rename scopes to stages
2016-08-27 07:05:35 -07:00
Daniel Bachhuber
80ccac7690
Display cache ratio first
2016-08-26 14:58:37 -07:00
Daniel Bachhuber
e8e12e89ee
Break apart logger headers
2016-08-26 13:19:09 -07:00
Daniel Bachhuber
8399c7e693
Collapse the execution_time
heading
2016-08-26 13:00:32 -07:00
Daniel Bachhuber
edfd132903
Convert hooks to use the logger
2016-08-26 09:57:28 -07:00
Daniel Bachhuber
08f9141fb9
Set some scope hooks for the main query
2016-08-26 09:41:12 -07:00
Daniel Bachhuber
a2335c2908
Make sure this logger is started
2016-08-26 09:37:41 -07:00
Daniel Bachhuber
072f698d02
Set up the pseudo hooks too
2016-08-26 09:32:14 -07:00
Daniel Bachhuber
8b3db40422
First pass at converting scopes to logger format
2016-08-26 09:20:19 -07:00
Daniel Bachhuber
707f2fb688
Capture cache hit / miss ratio
2016-08-26 09:00:11 -07:00
Daniel Bachhuber
d39fcd2f3c
Create a smaller chart by collapsing fields
2016-08-26 08:46:22 -07:00
Daniel Bachhuber
2b5a3c6097
Log request count and time
2016-08-26 08:26:42 -07:00
Daniel Bachhuber
db8021de21
Increment hook counter when timer starts
2016-08-26 07:43:04 -07:00
Daniel Bachhuber
0a80dec7da
Introduce a new Logger class for more sane logging
2016-08-26 07:42:05 -07:00
Daniel Bachhuber
231a52933d
Consolidate calls to the formatter
2016-08-26 07:05:20 -07:00
Daniel Bachhuber
0303ae9b0a
Use table footer for totals; pretty format seconds in the table
2016-08-26 06:57:19 -07:00
Daniel Bachhuber
a3e8fbc821
Introduce our own formatter, so we can implement custom tables
2016-08-26 06:39:30 -07:00
Daniel Bachhuber
a5552151ba
Namespace the command class
2016-08-26 06:13:19 -07:00