propelorm/Propel2 — pull request #83 by fzaninotto (2011-12-06 23:17:40+00:00)
Title: Move Profiler logic to a dedicated service class

The profiling logic that used to be in `PropelPDO` could be reused elsewhere, and live independently of the actual connection class. In fact, the query logging and the profiling should be decoupled. That would remove a few `if`s from the `ConnectionWrapper` class. This was discussed in #68.

This refactoring PR introduces a new reusable `Profiler` service, adds to the `ServiceContainer` the ability to configure and create a profiler, adds related hooks in the `runtime-conf.xml`, and moves the profiling logic from `ConnectionWrapper` to a new class called `ProfilerConnectionWrapper` (and its counterpart for the `StatementWrapper` class).

As usual, unit tests and documentations are there.