mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 19:27:19 +00:00
refactor: display verbose output for benchmark comparison (#1054)
* refactor: display verbose output for benchmark comparison * refactor: use unique machine name for ci benchmarks
This commit is contained in:
parent
ab75cfdb8f
commit
390211b86e
1 changed files with 11 additions and 7 deletions
18
.github/workflows/pr-benchmark-generate.yml
vendored
18
.github/workflows/pr-benchmark-generate.yml
vendored
|
@ -71,7 +71,8 @@ jobs:
|
|||
# We assume that the CI machine has a name that is unique and stable.
|
||||
# See https://github.com/airspeed-velocity/asv/issues/796#issuecomment-1188431794
|
||||
echo "Preparing benchmarks profile..."
|
||||
asv machine --yes
|
||||
MACHINE="ci_benchmark_${{ github.event.pull_request.number }}"
|
||||
asv machine --yes -v --machine ${MACHINE}
|
||||
echo "Benchmarks profile DONE."
|
||||
|
||||
# Generate benchmark data
|
||||
|
@ -83,20 +84,23 @@ jobs:
|
|||
# TO the start of the branch history.
|
||||
# With it, we run benchmarks ONLY FOR the latest commit.
|
||||
echo "Running benchmarks for upstream/master..."
|
||||
DJC_BENCHMARK_QUICK=1 asv run upstream/master^! -v
|
||||
DJC_BENCHMARK_QUICK=1 asv run upstream/master^! -v --machine ${MACHINE}
|
||||
echo "Benchmarks for upstream/master DONE."
|
||||
echo "Running benchmarks for HEAD..."
|
||||
DJC_BENCHMARK_QUICK=1 asv run HEAD^! -v
|
||||
DJC_BENCHMARK_QUICK=1 asv run HEAD^! -v --machine ${MACHINE}
|
||||
echo "Benchmarks for HEAD DONE."
|
||||
|
||||
# Compare against master
|
||||
echo "Comparing benchmarks..."
|
||||
echo "Creating pr directory..."
|
||||
mkdir -p pr
|
||||
asv compare upstream/master HEAD --factor 1.1 --split > ./pr/benchmark_results.md
|
||||
|
||||
# Save the PR number to a file, so that it can be used by the next step.
|
||||
echo "${{ github.event.pull_request.number }}" > ./pr/pr_number.txt
|
||||
|
||||
# Compare against master
|
||||
# NOTE: The command is run twice, once so we can see the debug output, and once to save the results.
|
||||
echo "Comparing benchmarks... (debug)"
|
||||
asv compare upstream/master HEAD --factor 1.1 --split --machine ${MACHINE} --verbose
|
||||
echo "Comparing benchmarks... (saving results)"
|
||||
asv compare upstream/master HEAD --factor 1.1 --split --machine ${MACHINE} > ./pr/benchmark_results.md
|
||||
echo "Benchmarks comparison DONE."
|
||||
|
||||
- name: Save benchmark results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue