On Feb 25, 2011, at 1:20 PM, Brice Figureau wrote:
>> [...]
>> I think this basic model is sound, and is roughly what I'd do.
>> 
>> You could also have a builtin system to allow classes to specify
>> which methods should normally be probed.  E.g., create a module that
>> essentially does this:
>> 
>> module Probable
>>  PROBABLE_CLASSES = []
>> 
>>  class Probe
>>    def initialize(method, klass, type)
>>    ...
>>    end
>>    def enable
>>      ...do the alias method switcheroo here
>>    end
>>  end
>>  def define_probe(name, type = :time)
>>    @probes << probe.new(name, self.class, type)
>>    PROBABLE_CLASSES << self.class
>>  end
>> 
>>  def self.enable_probes
>>    PROBABLE_CLASSES.each do |klass|
>>      klass.probes.each { |probe| probe.enable }
>>    end
>>  end
>> end
> 
> OK, I see.
> I was planning to insert some of the probe manually (one of the best
> target is the indirection various verbs) and allow any other to be
> dynamically set, but your scheme seems better.

Supporting both would be great, but I expect there are a lot of obvious probe 
points that should ship with the software.

>> Obviously not really a great design per se, but as a general idea, it
>> would allow any class to define what were most likely to be the
>> appropriate probes, so that turning probes on for the system should
>> result in the best data.  I like the idea of being able to manually
>> enable probes through your command-line interface ideas, too, but I
>> think the system should ship with a bunch of these out of the box.
> 
> The system currently designed is dual-fold: on one side you can enable
> probes, and on the other side there are probe listeners (which are
> loadable plugins). Those listeners can also be enabled on-demand and can
> be targeted to some 'events' (events are fired by the probes when they
> are reached).
> I hope to have the time to finish the patch this week-end :)

I look forward to it.

-- 
If a `religion' is defined to be a system of ideas that contains
unprovable statements, then Godel taught us that mathematics is not
only a religion, it is the only religion that can prove itself to be
one.                                    -- John Barrow
---------------------------------------------------------------------
Luke Kanies  -|-   http://puppetlabs.com   -|-   +1(615)594-8199




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to