puppet-profile-parser icon indicating copy to clipboard operation
puppet-profile-parser copied to clipboard

Adding a profile summary task

Open timidri opened this issue 6 years ago • 5 comments

Added a task to easily show the summary of the profiling log with Bolt or PE.

For now, the task only supports human-readable output.

The task accepts 1 optional parameter called logs which is a space-separated string listing log files to be analyzed. The default value is /var/log/puppetlabs/puppetserver/puppetserver.log.

Note: for the task to work, it needs to be put in the Puppetfile as follows (replacing hyphens in the name by underscores):

mod 'puppet_profile_parser',
    git: 'https://github.com/timidri/puppet-profile-parser.git',
    branch: 'add-profile-task'

image

image

timidri avatar Oct 21 '19 10:10 timidri

We may want a separate Puppet module to house tasks like this. This repo isn't a valid Puppet module by itself, I don't think.

reidmv avatar Oct 21 '19 15:10 reidmv

We may want a separate Puppet module to house tasks like this. This repo isn't a valid Puppet module by itself, I don't think.

@reidmv I wanted an easy approach without dependencies. It works even though the repo isn't a valid module - but we can make it a valid module anytime. Would you still prefer a separate module depending on this non-legal module?

timidri avatar Oct 21 '19 15:10 timidri

Up to @Sharpie. As you said, "we can make it a valid module anytime". I'm perfectly happy letting task/plan content sit here as its developed and not worry about it unless or until it becomes so polished and compelling that we want to make it available on the Forge. Can reconsider then.

reidmv avatar Oct 21 '19 16:10 reidmv

@Sharpie any thoughts?

timidri avatar Oct 23 '19 14:10 timidri

Now that tasks are widely available, it does seem like a good idea to re-factor this script into a module.

One thing that does give me pause is that the script can produce a lot of output if run against a large infrastructure where lots of profiling activity is happening. My gut feel is that Orchestrator and Bolt will work best when script output size is "reasonable" and this could push over into "ridiculous".

The solution there may be to caution against large output, add a throttle that prevents more than N profiles from being returned, and later add the ability to select Zipkin output and ship it somewhere that can handle bulk data.

Sharpie avatar Oct 23 '19 15:10 Sharpie