Skip to content

Conversation

sean-breen
Copy link
Contributor

@sean-breen sean-breen commented Aug 28, 2025

Proposed changes

Adds a new workflow Generate CPU Profile, which runs our load and watcher tests with the -cpuprofile flag enabled. This creates several output files with the .pprof extension which will be merged into a single default.pgo file which we can use on subsequent builds of Agent to make use of the optimisations.

On running this job, it will create a new branch with the altered default.pgo. It will also create a PR back into the original branch it was executed on.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@github-actions github-actions bot added the chore Pull requests for routine tasks label Aug 28, 2025
@sean-breen sean-breen marked this pull request as ready for review September 15, 2025 09:36
@sean-breen sean-breen requested a review from a team as a code owner September 15, 2025 09:36

# Run watcher tests with CPU profiling for each package
echo "Starting watcher tests with cpu profiling..."
packages=$(find internal/watcher -type f -name '*_test.go' -exec dirname {} \; | sort -u)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add a script? Could this be done in the make file ?

Copy link
Contributor Author

@sean-breen sean-breen Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably could but it's much nicer to do it in bash vs Makefile. If we expand our profiling later I don't want to bloat these Makefiles

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'm just not the biggest fan of adding scripts

@sean-breen sean-breen requested a review from aphralG September 30, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants