-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump Mojolicious version requirement to 8.00, add nonblocking example to ExampleApp, document caveats with using async code with profiling note the change of the post_hook to after_dispatch in the ExampleApp, which is the reversion of 5ec7b18 (only for the example, not in the actual plugin config itself) to get the async code covered by the profiler in this example: [2019-06-28 09:05:54.12481] [71327] [debug] GET "/nonblock" (91158226) [2019-06-28 09:05:54.12496] [71327] [debug] starting NYTProf [2019-06-28 09:05:54.12589] [71327] [debug] Routing to controller "ExampleApp::ExampleController" and action "nonblock" [2019-06-28 09:05:54.12603] [71327] [info] starting request, first sleep [2019-06-28 09:05:55.13080] [71327] [info] about to wait [2019-06-28 09:05:55.13093] [71327] [info] returning from controller [2019-06-28 09:05:55.13123] [71327] [debug] Template "example_controller/nonblock.html.ep" not found [2019-06-28 09:05:55.13138] [71327] [debug] Nothing has been rendered, expecting delayed response [2019-06-28 09:05:55.13157] [71327] [info] in first callback [2019-06-28 09:05:56.13444] [71327] [info] in second callback [2019-06-28 09:05:57.13883] [71327] [debug] 200 OK (3.01398s, 0.332/s) [2019-06-28 09:05:57.13964] [71327] [debug] finished NYTProf clicking through i see all the async code in ExampleController.pm is covered. in "real world" examples the after_dispatch hook can fire out of order as per the aforementioned commit so it's "not that simple" the only other option i can think here is to tweak the way the plugin runs to add routes that allow manual switching on/off of the profiling as required and not trying to do this through the mojo hooks: /nytprof/start - start the profiler /nytprof/stop - stop the profiler not sure how well that would work, and could lead to large profiles, so i'm going to mark that as a TODO
- Loading branch information
Showing
6 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, I think I sent you a hard tab character on that line, sorry about that!