I've created a ticket to track this idea: http://projects.puppetlabs.com/issues/5691
On Sat, Dec 18, 2010 at 6:37 AM, Brice Figureau < [email protected]> wrote: > Hi, > > I'm presenting here what I proposed in a previous e-mail: > process name based instrumentation. > > This is an experimental patch whose purpose is to display what a given > puppet application is currently doing by changing its process name. > This requires adding some "instrument" blocks to some of the more time > consuming part of the puppet code base. > > This patch set covers: > * individual network requests > * transaction evaluation (up to the individual resources) > * the configurer > * the compiler > > To add a probe it's as easy as: > > class MyClass > include Puppet::Util::Instrumentation > ... > def long_running_method > instrument("I'm doing some long work") do > ... long work here ... > end > end > end > > Since most process tools (like ps or top) have a long refresh time, it > doesn't mean anything > to add "instrument" probes to short job (and it would certainly be a > performance hog). > > This is not a generic instrumentation system (which I hope I will be able > to > provide in the coming weeks as a base for instrumentation discussion). > > I hope this patch would be useful to diagnose "stuck" processes issues. > > Time for you to send comments and flames :) > > Brice > > Brice Figureau (2): > Process name instrumentation infrastructure > Some high-level process name probes > > lib/puppet/configurer.rb | 24 ++- > lib/puppet/network/http/handler.rb | 6 +- > lib/puppet/parser/compiler.rb | 6 +- > lib/puppet/transaction.rb | 9 +- > lib/puppet/util/instrumentation.rb | 12 ++ > lib/puppet/util/instrumentation/process_name.rb | 129 ++++++++++++ > .../unit/util/instrumentation/process_name_spec.rb | 207 > ++++++++++++++++++++ > 7 files changed, 383 insertions(+), 10 deletions(-) > create mode 100644 lib/puppet/util/instrumentation.rb > create mode 100644 lib/puppet/util/instrumentation/process_name.rb > create mode 100644 spec/unit/util/instrumentation/process_name_spec.rb > > -- > 1.7.2.1 > > -- > 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]<puppet-dev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > -- 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.
