dann/p5-plack-middleware-profiler-nytprof — pull request #1 by dpavlin (2012-06-01 11:55:59+00:00)
Title: $ENV{PROFILE_PER_PAGE} which reset profile counters on each page load

We are using plack to port CGI application (Koha library system) to plack, and noticed that NYTProf counters keep increasing with each page reload. While this might be useful if you want to profile multi-page application and get summary stats, it does not help when profiling single page since counters seem to grow forever.

Because of that, I introduced new environment variable which will reset counters on each page load.

I'm not sure which behavior should be default, but I'm somewhat biased towards reseting counters and leave current behavior as options. This patch, however, implements opposite solution which is backwards compatible.