Closed aspeake closed 8 months ago
To-Do:
psrecord
on ecm_prep.py and run.py separately Should we prevent the profiler from running on commits that have changes only in directories or files that do not have an impact on runtime (e.g., .github/*
, docs/*
, .gitignore
)?
Should we prevent the profiler from running on commits that have changes only in directories or files that do not have an impact on runtime (e.g.,
.github/*
,docs/*
,.gitignore
)?
There are a couple of ways to do this, the best way I think would be to add to the if statement here: https://github.com/trynthink/scout/blob/profiler/.github/workflows/tests.yml#L72 to check for file changes. However, I think it would be smart to require a passing integration_tests run before merging, which would require us to at least start to run that workflow. I can add an if statement before every job in integration_tests.yml (workflow_call events don't have a built in filter for this). Its not the most flexible or clean approach but would probably work.
Adds an optional profiler to the
run_workflow.py
script to quantify CPU time and peak memory. This PR also uses this new feature as part of the CI build integration testing workflow, while making some edits to .github/workflows/tests.yml.New features to
run_workflow.py
:--with_profiler
--step
New behavior on CI:
master
, then integration tests will be run w/o profiler (same as before). Results will be uploaded as artifacts and, if there are changes, also committed to the repo.master
, then integration tests will be run with profilers. ecm_prep.py and run.py will be run as two separate commands so that distinct profile metrics can be output for each. Two files,profile_ecm_prep.csv
andprofile_run.csv
, will be saved as artifacts to report the function times and peak memories. No files will be committed from mastermaster
:Bugfixes on CI:
pull_request
event trigger to run when PRs are opened or changed from draft, previously, CI would always require a push