Skip to content

Tags: payprop/mojolicious-plugin-nytprof

Tags

v0.23

Toggle v0.23's commit message
document use of ENV variables for non-broken report links

you should start your app with the env variables:

    PERL5OPT='-d:NYTProf'
    NYTPROF=start=no

without this, things go a bit haywire (most obviously manifested as
broken links in the report) because otherwise any code compiled before
the `plugin` call cannot be covered, as described in the docs[1]

bump VERSION and Changes for CPAN release

[1] https://metacpan.org/pod/Devel::NYTProf#RUN-TIME-CONTROL-OF-PROFILING

v0.22

Toggle v0.22's commit message
some nonblocking examples/testing

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

v0.21

Toggle v0.21's commit message
bump Devel::NYTProf version requirement to 6.06

for recent fixes and features, fixes which will hopefully solve some
cpantesters failures and features that are nice to have

v0.19

Toggle v0.19's commit message
remove URL query params from output profiles

stops confusion when trying to get to the profile from the list of
files under /nytprof (as the original query params would otherwise
have to be URL encoded, possibly twice to keep them). it's easiest
to just get rid of them instead of adding lots of escaping hackery
to the code

v0.17

Toggle v0.17's commit message
move github repo to G3S org

v0.16

Toggle v0.16's commit message
resolve #9 - fix Win32 filename test to not hand

seems that setting $^O too early interferes with the testing fork
handling (or something) on some platforms, so do this in a hook to
work around this

v0.15

Toggle v0.15's commit message
resolve #6 - fixes for : and = on Win32 platforms

escape the chars so this doesn't break due to Win32 platforms using
: and = chars in different ways to Unix like platforms

Squashed commit of the following:

commit fc467d7
Author: Nicolas GEORGES <nicolas54.georges@gmail.com>
Date:   Mon Aug 3 15:16:06 2015 +0200

    refs #6 - fix unit tests on mswin32 plateforms

v0.14

Toggle v0.14's commit message
README update for VERSION

v0.13

Toggle v0.13's commit message
bump VERSION and Changes for release to CPAN

v0.12

Toggle v0.12's commit message
tweak ordering of default paths for nytprofhtml

cpantesters is showing failures of the form:

  Profile data created by incompatible perl config (NV size 16 but ours is 8)
  at /usr/lib/x86_64-linux-gnu/perl5/5.20/Devel/NYTProf/Data.pm line 87.

if you look at the path it is actually using a different path to the
perl running the tests:

  /home/sand/src/perl/repoperls/installed-perls/perl/v5.18.4/127e/bin/perl

so calling File::Which::which is giving us the *system* perl's
nytprofhtml path. switch the ordering of defaults to first use the
nytprofhtml that will be in the same path as the perl running the
tests/code so we don't end up getting a potentially incompatible
system perl

bump version to 0.12