puppetlabs/puppet — pull request #2768 by cprice404 (2014-06-13 15:25:49+00:00)
Title: (PUP-2750) Add hierarchical metric ids to profiler

This commit modifies the signature of the
`Puppet::Util::Profiler.profile` method to accept a new argument,
which is basically a "metric id". The argument takes the form
of an array of strings/symbols, allowing us to group specific sets of
profiling data into hierarchies and report aggregate profiling
statistics at any level of the hierarchy.

It also adds a new profiler, `Aggregate`, which extends the
existing `WallClock` profiler. The new profiler tracks the
aggregate timing data based on the metric id hierarchy,
and logs a message containing the aggregate data
at the end of the run.