Somewhat related when trying to improve performance is doing debugging of
how long operations take.

Puppet already makes some use of this, but it's worth noting that for a
given section of code, you can use the existing Benchmark code to do this.

ie you can surround a code block with something like:

seconds = Benchmark.realtime {
  # existing puppet code
}
Puppet.notice("Operation foo took: %0.2f seconds" % seconds)



On Mon, Sep 8, 2008 at 9:39 AM, Andrew Shafer <[EMAIL PROTECTED]>wrote:

>
> I've been using a combination of GDB, DTrace, puts caller and puts 'WTF'
>
> GDB can be like staring into the abyss.
>
> DTrace seems the most powerful and promising, but a bit of a learning
> curve.
>
> puts is primitive, but it works.
>
> Would love to swap tips and tricks with anyone debugging Ruby in general
> and Puppet in specific.
>
>
>
>
> On Mon, Sep 8, 2008 at 8:51 AM, Nigel Kersten <[EMAIL PROTECTED]> wrote:
>
>> so I've found myself with a few reasons to need to debug
>> puppetd/puppetmasterd lately since we upgraded to 0.24.5
>>
>> I've been doing this by basically throwing Puppet.notice/warning
>> statements into the code, which feels rather primitive...
>>
>> How are people doing debugging? I've poked around a bit and looked at some
>> options for Ruby debugging, but was wondering what other people are using
>> ....
>>
>>
>> --
>> Nigel Kersten
>> Systems Administrator
>> Tech Lead - MacOps
>>
>>
>>
>
> >
>


-- 
Nigel Kersten
Systems Administrator
Tech Lead - MacOps

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

Reply via email to