Commit graph

401 commits

Author SHA1 Message Date
Daniel Bachhuber
d6f4fc28f2 Ensure tick_callback is nullified when ignoring a callback 2016-10-26 06:29:07 -07:00
Daniel Bachhuber
199b515b73 Ensure time is rounded when there's no name column present
Also drops the total footer when there's only one item displayed
2016-10-26 06:17:12 -07:00
Daniel Bachhuber
6beadf3aa9 Merge pull request #108 from runcommand/13-spotlight
Use `--spotlight` to filter zero-ish results from the set
2016-10-26 06:10:28 -07:00
Daniel Bachhuber
e65473afd7 Assert --spotlight as an available flag 2016-10-26 05:54:26 -07:00
Daniel Bachhuber
c95664f0b6 Use --spotlight to filter zero-ish results from the set 2016-10-26 05:40:34 -07:00
Daniel Bachhuber
8a096e82c4 Merge pull request #107 from runcommand/danielbachhuber-patch-1
Use "type": "wp-cli-package" to designate this as a WP-CLI package
2016-10-20 07:31:03 -07:00
Daniel Bachhuber
106696e83a Use "type": "wp-cli-package" to designate this as a WP-CLI package 2016-10-20 06:41:39 -07:00
Daniel Bachhuber
52097094d1 Merge pull request #106 from runcommand/15-disable-opcode-cach
Disable opcode cache when using `register_tick_function()`
2016-10-19 19:11:15 -07:00
Daniel Bachhuber
85d1c1debf Disable opcode cache when using register_tick_function() 2016-10-19 18:14:28 -07:00
Daniel Bachhuber
8ac705fc1c Merge pull request #104 from runcommand/clarify-fiels
Clarify the `--fields` argument
2016-10-19 05:49:37 -07:00
Daniel Bachhuber
35e0c8f9eb Merge pull request #103 from runcommand/50-profile-mu-plugins
Start profiling right away when profiling `muplugins_loaded:before`
2016-10-19 05:29:14 -07:00
Daniel Bachhuber
20c3b66323 Clarify the --fields argument 2016-10-19 05:27:31 -07:00
Daniel Bachhuber
6a2052244a Start profiling right away when profiling muplugins_loaded:before 2016-10-19 04:56:53 -07:00
Daniel Bachhuber
b60edfa0d8 Failing test case for profiling muplugins_loaded:before 2016-10-19 04:54:58 -07:00
Daniel Bachhuber
16ddb3c3dc Merge pull request #102 from runcommand/mention-hook-execution
Mention that the hook needs to fire in order to profile it
2016-10-12 05:40:58 -07:00
Daniel Bachhuber
54ffc02ed5 Mention that the hook needs to fire in order to profile it 2016-10-12 05:01:32 -07:00
Daniel Bachhuber
0c3d0c0e1a Merge pull request #101 from runcommand/regenerate-readme
Regenerate readme from command docs
2016-10-10 15:53:36 -07:00
Daniel Bachhuber
68abb35768 Regenerate readme from command docs 2016-10-10 15:05:40 -07:00
Daniel Bachhuber
0a9d002afe Merge pull request #100 from runcommand/15-profile-intermediate
Support for profiling intermediate stages
2016-10-09 16:24:28 -07:00
Daniel Bachhuber
0989767e2e Shorten the code location at the point of rendering the loggers 2016-10-09 16:15:16 -07:00
Daniel Bachhuber
0a365862d3 Use more precise hooks for profiling intermediate stages 2016-10-09 15:43:02 -07:00
Daniel Bachhuber
e6a05be838 Reset tick callback after we've completed profiling 2016-10-09 10:45:38 -07:00
Daniel Bachhuber
7bb69131f2 First pass at profiling intermediate stages 2016-10-09 10:33:48 -07:00
Daniel Bachhuber
569e107293 Merge pull request #99 from runcommand/15-name-intermediate
Put names to the intermediate stages
2016-10-09 09:24:49 -07:00
Daniel Bachhuber
944696431a Put names to the intermediate stages
For the most part, it's `<hook>:before`, except when it's the last hook
in the sequence.
2016-10-09 09:05:27 -07:00
Daniel Bachhuber
0677fffbaf Merge pull request #98 from runcommand/23-all-flag
Use `--all` to profile callbacks on all hooks
2016-10-08 17:24:37 -07:00
Daniel Bachhuber
178e0454b6 Use --all to profile callbacks on all hooks 2016-10-08 16:18:48 -07:00
Daniel Bachhuber
53b8253b1f Merge pull request #97 from runcommand/23-precise-recursion
Keep track of recursion in a more precise manner
2016-10-08 16:10:40 -07:00
Daniel Bachhuber
5f2c0f52cc Keep track of recursion in a more precise manner 2016-10-08 16:02:46 -07:00
Daniel Bachhuber
fc99033798 Merge pull request #96 from runcommand/23-profile-all-hooks
Omit `<hook>` to profile all called hooks
2016-10-08 08:47:46 -07:00
Daniel Bachhuber
59a672b458 Update test for new accepted argument 2016-10-08 08:24:46 -07:00
Daniel Bachhuber
4e6cc627cf Omit <hook> to profile all called hooks 2016-10-08 07:27:46 -07:00
Daniel Bachhuber
5a42410687 Merge pull request #95 from runcommand/fix-abspath-relative
Fully resolve `ABSPATH`
2016-10-08 07:08:14 -07:00
Daniel Bachhuber
8af2db1892 Fully resolve ABSPATH 2016-10-08 07:00:05 -07:00
Daniel Bachhuber
dc970ab382 Merge pull request #94 from runcommand/abstract-profile-class
Abstract profiler to a dedicated class
2016-10-08 06:55:21 -07:00
Daniel Bachhuber
d15f6ac6c9 Abstract, to avoid direct manipulation of the global 2016-10-08 06:49:28 -07:00
Daniel Bachhuber
8969a5a859 Abstract profiler to a dedicated class 2016-10-08 06:37:41 -07:00
Daniel Bachhuber
d58d4b0b36 Merge pull request #93 from runcommand/23-callback-count
Indicate callback count when profiling a stage
2016-10-08 06:01:56 -07:00
Daniel Bachhuber
96a386def8 WordPress doesn't like this last hook added to shutdown 2016-10-08 05:56:25 -07:00
Daniel Bachhuber
69ad3a35cc Merge pull request #92 from runcommand/registered-commands
Ensure we only register specific methods as commands
2016-10-07 16:23:03 -07:00
Daniel Bachhuber
e403ef86e0 Indicate callback count when profiling a stage 2016-10-07 16:18:04 -07:00
Daniel Bachhuber
9a977569b1 Merge pull request #91 from runcommand/assert-stage-hooks
Assert hooks for each stage
2016-10-07 16:04:50 -07:00
Daniel Bachhuber
a2e8573328 Ensure we only register specific methods as commands 2016-10-07 16:02:26 -07:00
Daniel Bachhuber
a590f1be0d Assert hooks for each stage 2016-10-07 15:58:08 -07:00
Daniel Bachhuber
9dbc52727c Merge pull request #90 from runcommand/23-all-stages
Use --all flag to profile all stages
2016-10-07 15:50:35 -07:00
Daniel Bachhuber
c5c9179af5 Use --all flag to profile all stages 2016-10-07 15:45:48 -07:00
Daniel Bachhuber
d0879c6737 Merge pull request #89 from runcommand/hook-count
Hooks should only be called once
2016-10-07 15:33:49 -07:00
Daniel Bachhuber
f0ad855d0a Keep track of filter depth to appropriately handle recursion 2016-10-07 15:27:29 -07:00
Daniel Bachhuber
1162a866e4 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
6e4eecf85c Failing test cause for hooks being called twice 2016-10-07 14:45:13 -07:00