trynthink / scout

A tool for estimating the future energy use, carbon emissions, and capital and operating cost impacts of energy efficiency and demand flexibility technologies in the U.S. residential and commercial building sectors.
https://scout.energy.gov
Other
58 stars 22 forks source link

Profiler #303

Closed aspeake closed 8 months ago

aspeake commented 1 year ago

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:

New behavior on CI:

Bugfixes on CI:

aspeake commented 10 months ago

To-Do:

trynthink commented 8 months ago

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)?

aspeake commented 8 months ago

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.