Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7520

Puppet profiling timers do not use a monotonic clock

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 4.10.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Server
    • Method Found:
      Inspection
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet has support for timing and profiling execution through the Puppet::Util::Profiler::WallClock class, used for profiling Puppet Server operations, and the Puppet::Util.thinmark method, used for measuring things like resource application. Historically these methods have measured time by calling Time.now. However, this method returns a value from the OS REALTIME clock, which can be affected by events like NTP updates. Since the puppet agent often initiates a NTP update, these jumps can create confusing profile results.

      In 2.1.0, Ruby added methods to access a monotonic clock which isn't affected by things like NTP updates. We should prefer this clock for profiling timers when it is available:

      https://ruby-doc.org/core-2.1.0/Process.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chuck Charlie Sharpsteen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support