From cfe2e7efc5dd52d0d0f2253ee5c4cb37a0b3e29f Mon Sep 17 00:00:00 2001 From: s-weigand Date: Sat, 18 Sep 2021 17:22:10 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=87=20Use=20main=20as=20baseline?= =?UTF-8?q?=20for=20PR=20compare=20benchmarks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_benchmark.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_benchmark.yml b/.github/workflows/pr_benchmark.yml index e1b60598b..0ae1f53f8 100644 --- a/.github/workflows/pr_benchmark.yml +++ b/.github/workflows/pr_benchmark.yml @@ -48,7 +48,7 @@ jobs: git remote add upstream https://github.com/glotaran/pyglotaran git fetch upstream pushd benchmark - asv run v0.4.0^..v0.4.0 --machine gh_action + asv run upstream/main^..upstream/main --machine gh_action asv run HEAD^..HEAD --machine gh_action asv publish @@ -74,7 +74,7 @@ jobs: pr_nr = os.environ.get("PR_NR") diff_result = subprocess.run( - ["asv", "--config=benchmark/asv.conf.json", "compare", "v0.4.0", "HEAD"], + ["asv", "--config=benchmark/asv.conf.json", "compare", "upstream/main", "HEAD"], capture_output=True, ) comment = f"""\ From 5c5e7a29753dc2dbdd4edfe2a028009b32ec2a2d Mon Sep 17 00:00:00 2001 From: s-weigand Date: Sat, 18 Sep 2021 18:35:36 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=9A=87=20Added=20comparison=20of=20ma?= =?UTF-8?q?in=20against=20last=20realease=20Tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Requested by @jsnel --- .github/workflows/pr_benchmark.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_benchmark.yml b/.github/workflows/pr_benchmark.yml index 0ae1f53f8..fabd39d6d 100644 --- a/.github/workflows/pr_benchmark.yml +++ b/.github/workflows/pr_benchmark.yml @@ -44,13 +44,17 @@ jobs: machine_file.write_text(machine_file_content) - name: Run PR compare benchmarks + id: benchmark_run run: | git remote add upstream https://github.com/glotaran/pyglotaran git fetch upstream pushd benchmark + last_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) + asv run $last_tag^..$last_tag --machine gh_action asv run upstream/main^..upstream/main --machine gh_action asv run HEAD^..HEAD --machine gh_action asv publish + echo ::set-output name=last_tag::$last_tag - name: Checkout benchmark result repo uses: actions/checkout@v2 @@ -73,7 +77,11 @@ jobs: import subprocess pr_nr = os.environ.get("PR_NR") - diff_result = subprocess.run( + diff_release_main = subprocess.run( + ["asv", "--config=benchmark/asv.conf.json", "compare", "${{steps.benchmark_run.outputs.last_tag}}", "HEAD"], + capture_output=True, + ) + diff_main_PR = subprocess.run( ["asv", "--config=benchmark/asv.conf.json", "compare", "upstream/main", "HEAD"], capture_output=True, ) @@ -82,7 +90,22 @@ jobs: Benchmark differences below 5% might be due to CI noise.
- Benchmark diff + Benchmark diff ${{steps.benchmark_run.outputs.last_tag}} vs. main + + + Parametrized benchmark signatures: + ```python + BenchmarkOptimize.time_optimize(index_dependent, grouped, weight) + ``` + + ``` + {diff_release_main.stdout.decode()} + ``` +
+ +
+ + Benchmark diff main vs. PR Parametrized benchmark signatures: @@ -91,7 +114,7 @@ jobs: ``` ``` - {diff_result.stdout.decode()} + {diff_main_PR.stdout.decode()} ```
"""