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

Puppet 4 --profile is not complete compared to 3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.2.2
    • Fix Version/s: PUP 4.3.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-12-02, Language 2015-12-16
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      A regression in the functionality of {{--profile}} has been fixed. This regression caused functions that were transitioned to the 4.x function API to not be included in the profiling information produced by {{--profile}}.

      Description

      Given sample code like:

      class profile_test {
        notice("hello from ${name}")
        notify{"inside ${name}": }
      }
       
      include profile_test
      

      Puppet 3 profiler were quite handy and complete:

      Debug: Runtime environment: run_mode=user, puppet_version=3.7.5, ruby_version=1.8.7
      Debug: PROFILE [apply] 1 Setup server facts for compiling: took 0.0001 seconds
      Debug: PROFILE [apply] 2.1 Compile: Set node parameters: took 0.0013 seconds
      Debug: PROFILE [apply] 2.2 Compile: Created settings scope: took 0.0305 seconds
      Notice: Scope(Class[Profile_test]): hello from profile_test
      Debug: PROFILE [apply] 2.3.1.1 Called notice: took 0.0002 seconds
      Debug: PROFILE [apply] 2.3.1 Called include: took 0.0061 seconds
      Debug: PROFILE [apply] 2.3 Compile: Evaluated main: took 0.0097 seconds
      Debug: PROFILE [apply] 2.4 Compile: Evaluated AST node: took 0.0000 seconds
      Debug: PROFILE [apply] 2.5 Compile: Evaluated node classes: took 0.0001 seconds
      Debug: PROFILE [apply] 2.6.1.1 Evaluated definitions: took 0.0000 seconds
      Debug: PROFILE [apply] 2.6.1 Iterated (1) on generators: took 0.0004 seconds
      Debug: PROFILE [apply] 2.6 Compile: Evaluated generators: took 0.0007 seconds
      Debug: PROFILE [apply] 2.7 Compile: Finished catalog: took 0.0005 seconds
      Debug: PROFILE [apply] 2 Compiled catalog for devco.net in environment production: took 0.0542 seconds
      .
      .
      .
      .
      Debug: functions: 0.006307 ms (2 calls)
      Debug: functions -> include: 0.006126 ms (1 calls)
      Debug: functions -> notice: 0.000181 ms (1 calls)
      

      In puppet4 there is no mention of the notice() and so the stats is even just wrong:

      Debug: functions: 0.004328061 s (1 calls)
      Debug: functions -> include: 0.004328061 s (1 calls)
      

      Not sure if this only affect a certain class of function - like legacy ones maybe vs ones of the new API, did not investigate that.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ripienaar R.I.Pienaar
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support