Jira (PUP-10531) Document report metrics

14 views
Skip to first unread message

Josh Cooper (Jira)

unread,
May 22, 2020, 1:37:04 PM5/22/20
to puppe...@googlegroups.com
Josh Cooper created an issue
 
Puppet / Task PUP-10531
Document report metrics
Issue Type: Task Task
Assignee: Unassigned
Components: Docs
Created: 2020/05/22 10:36 AM
Priority: Normal Normal
Reporter: Josh Cooper

The agent calculates 3 types of metrics and submits them in the report. One of types is "Time" and it captures how long different parts of the agent run take, for example, how long pluginsync took, how long each resource type took to apply, etc. This can be seen using puppet agent -t --summarize:

Time:
         Schedule: 0.00
           Notify: 0.00
             File: 0.01
   Config retrieval: 0.32
   Node retrieval: 0.34
   Convert catalog: 0.36
      Plugin sync: 0.56
     Startup time: 0.96
   Transaction evaluation: 1.97
   Catalog application: 1.98
         Last run: 1590168479
   Fact generation: 2.57
       Filebucket: 0.00
        Pe anchor: 0.00
            Total: 7.11

I think the only place we document this is in the report code: https://github.com/puppetlabs/puppet/blob/58c02cceda56025623ad5bc227579a9aaeddfc80/lib/puppet/transaction/report.rb#L16-L24

It would be good to document what the different phases are and how they relate. For example, the "Total" time includes "Node retrieval", "Plugin sync", etc.

We also added more time metrics but didn't update the report description. The current list of time metrics is:

lib/puppet/configurer.rb:    options[:report].add_times(:convert_catalog, catalog_conversion_time) if options[:report]
lib/puppet/configurer.rb:      options[:report].add_times(:plugin_sync, plugin_sync_time) if options[:report]
lib/puppet/configurer.rb:      options[:report].add_times(:fact_generation, facter_time) if options[:report]
lib/puppet/configurer.rb:      options[:report].add_times(:catalog_application, apply_catalog_time)
lib/puppet/configurer.rb:      report.add_times(:startup_time, startup_time)
lib/puppet/configurer.rb:          options[:report].add_times(:node_retrieval, node_retr_time)
lib/puppet/configurer.rb:      report.add_times(:resubmit_facts, resubmit_facts_time)
lib/puppet/configurer.rb:    report.add_times(:total, Time.now - report.time)
lib/puppet/resource/catalog.rb:        transaction.report.add_times(:transaction_evaluation, transaction_evaluate_time)
lib/puppet/transaction.rb:    @report.add_times(:config_retrieval, @catalog.retrieval_duration || 0)

Plus there are times for each type of resource, e.g. File is the time to apply all file resources.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
May 22, 2020, 1:38:04 PM5/22/20
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-10531
 
Re: Document report metrics

Claire Cadman I filed this as a PUP ticket since there will be puppet code changes and also we need to research/document how the metrics nest.

Josh Cooper (Jira)

unread,
Dec 6, 2021, 6:26:01 PM12/6/21
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: tbd
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Josh Cooper (Jira)

unread,
Jul 26, 2022, 5:02:02 PM7/26/22
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Phoenix
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages