-
Notifications
You must be signed in to change notification settings - Fork 101
CPU Profiling #1242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
CPU Profiling #1242
Conversation
|
||
# 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) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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 singledefault.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.
CONTRIBUTING
documentmake install-tools
and have attached any dependency changes to this pull requestREADME.md
)