Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

[WIP] Finishing the planned functionality. #30

Closed
wants to merge 3 commits into from
Closed

[WIP] Finishing the planned functionality. #30

wants to merge 3 commits into from

Conversation

coss
Copy link
Contributor

@coss coss commented Sep 7, 2012

  • The profiler and related parts are now located under the Profiler namespace.
  • Its uses the event manager to decouple functionality like the collecting
    process from the profiler.
    • New profiler events: bootstrap, collect, access, finish
    • The bootstrap event allows modules to do things only if the profiler is
      enabled. The matcher will listen to this event, with a higher priority, and
      stops further propagation if the defined pattern does not match.
    • The collect event is used to start the collecting process. It will also
      be used flush the reponse early, if possible.
    • The access event only occurs when any profiled data should be send or was
      requested from the browser, like the toolbar. It will be triggered in the
      GuardListener or during the controller dispatch (see ZendDeveloperTools'
      AbstractActionController). If the access was denied (
      ProfilerEvent::denyAccess), the rendering will be interrupted or in the
      controller case, it will return a 404 response. This is done to prevent
      the module from exposing itself.
    • The finish event is used to send the toolbar/FirePHP console output or
      save the collected data.
  • The toolbar will support ajax based application, which is currently not the
    case, but the initial toolbar loading will still happen without JavaScript.
  • Simplified the CollectorInterface. A collector can now implement additional
    features such as TemplateProviderInterface.
  • It is now possible to let the matcher run later if desired, controlled by the
    options. Running the matcher later may introduce some additional overhead,
    depending on what modules do during the boostrap event. Doing the matching
    later allows more possible matchers. If a matcher only supports late
    matching, the matcher should implement LateMatchingInterface which will be
    recognized during the matching process and the matcher will throw a
    MatcherException exception.

- Cleaned up the collector interface. A collector can now implement additional features such as template or priority provider.
- The profiler and everything profiler related, e.g. the report, is now located under the Profiler namespace.
- The profiler no longer uses the event manager provided by the application, but instead registers its own event manager, which is used to decouple functionality such as the collector and the matcher.
- A new guard listener was added that allows access controll to the profiled data thru the browser. This is done by triggering a new event called 'access' which allows event listeners to disable the access to report.
- Added IP- and route name matcher.
- Added the ability to define in the option whether or not the matcher should run early or late.
- Added some docblock comments.
@Freeaqingme
Copy link
Member

@coss Can you please rebase?

@Freeaqingme
Copy link
Member

@coss The title mentions it's a WIP. Can you update on the status?

@pietervogelaar
Copy link

"The toolbar will support ajax based application, which is currently not the case, but the initial toolbar loading will still happen without JavaScript."

Any update on this? I would really like it if the toolbar could collect Doctrine queries from AJAX requests.

@Ocramius
Copy link
Member

I'm closing this since it won't be continued by the original author for now.

Will re-plan once I've extracted functionality from what @coss has already done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants