This is the base of the instrumentation layer.
The idea is to allow instrumentation of code blocks.
Each time this code is executed an event is fired to some event
listeners that in turn can do whatever is needed to perform the instrumentation.
This patch adds:
* code instrumentation calls
* the
On Sun, 2011-02-27 at 14:07 -0800, Markus Roberts wrote:
> B -
>
> > + def self.listeners_of(label)
> > +synchronize {
> > + @listeners_of[label] ||= @listeners.select do |
> k,l|
> > +l.listen_to?(label)
> > +
B -
> + def self.listeners_of(label)
> > +synchronize {
> > + @listeners_of[label] ||= @listeners.select do |k,l|
> > +l.listen_to?(label)
> > + end
> > +}
> > + end
> >
> >
> > Does this (due to memoization) omit listeners who are added afte
On 27/02/11 20:44, Markus Roberts wrote:
> B --
>
>> + # Triggers an instrumentation
>
> + #
> + # Call this method around the instrumentation point
> + # Puppet::Util::Instrumentation.instrument(:my_long_computation) do
> + # ... a long computation
> + # end
>
B --
> + # Triggers an instrumentation
> + #
> + # Call this method around the instrumentation point
> + # Puppet::Util::Instrumentation.instrument(:my_long_computation) do
> + # ... a long computation
> + # end
> + #
> + # This will send an event to all the listeners of "my_long_
This is the base of the instrumentation layer.
The idea is to allow instrumentation of code blocks.
Each time this code is executed an event is fired to some event
listeners that in turn can do whatever is needed to perform the instrumentation.
This patch adds:
* code instrumentation calls
* the