From be386f8e56e3ba701cfb672e82153fb330e2ed67 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 12 Sep 2026 04:16:50 -0400 Subject: [PATCH 1/3] Add AirspeedVelocity benchmarking CI Adds a benchmark workflow (Julia 1 and lts) and a benchmark/benchmarks.jl suite covering representative workloads so PRs check for performance regressions. Co-Authored-By: Chris Rackauckas Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: devin 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local session transcript /home/crackauc/.local/share/devin/cli/summaries/history_ccb52064e6514b21.md --- .github/workflows/benchmark.yml | 29 +++++++++++++++++++++ benchmark/benchmarks.jl | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/benchmark.yml create mode 100644 benchmark/benchmarks.jl diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 000000000..750b9670c --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,29 @@ +name: Benchmark this PR + +on: + pull_request: + branches: [master] + paths-ignore: ['docs/**'] + +permissions: + pull-requests: write + contents: read + +jobs: + benchmark: + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + version: ["1", "lts"] + env: + # Force consistent Julia depot path for self-hosted runners + JULIA_DEPOT_PATH: ~/.julia + steps: + - uses: MilesCranmer/AirspeedVelocity.jl@action-v1 + with: + julia-version: ${{ matrix.version }} + script: "benchmark/benchmarks.jl" + extra-pkgs: "" + job-summary: true diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl new file mode 100644 index 000000000..177d06e1d --- /dev/null +++ b/benchmark/benchmarks.jl @@ -0,0 +1,45 @@ +using StructuralIdentifiability, BenchmarkTools + +const SUITE = BenchmarkGroup() + +# ============================================================================= +# Model construction — linear compartment models +# ============================================================================= + +SUITE["construction"] = BenchmarkGroup() + +graph3 = [[2], [1, 3], [1, 2]] +graph4 = [[2, 4], [1, 3], [2, 4], [1, 3]] + +SUITE["construction"]["lincomp_3"] = @benchmarkable linear_compartment_model( + $graph3; inputs = [1], outputs = [1], leaks = [] +) +SUITE["construction"]["lincomp_4"] = @benchmarkable linear_compartment_model( + $graph4; inputs = [2], outputs = [1], leaks = [2, 3] +) + +# ============================================================================= +# Identifiability assessment — the core workload: differential algebra + +# rational function field computation +# ============================================================================= + +SUITE["identifiability"] = BenchmarkGroup() + +ode3 = linear_compartment_model(graph3; inputs = [1], outputs = [1]) +ode4 = linear_compartment_model(graph4; inputs = [2], outputs = [1], leaks = [2, 3]) + +SUITE["identifiability"]["local_3"] = @benchmarkable assess_local_identifiability($ode3) +SUITE["identifiability"]["local_4"] = @benchmarkable assess_local_identifiability($ode4) +SUITE["identifiability"]["global_3"] = @benchmarkable assess_identifiability($ode3) seconds = 600 + +# ============================================================================= +# IO-equation derivation and identifiable function extraction +# ============================================================================= + +SUITE["ioequations"] = BenchmarkGroup() + +SUITE["ioequations"]["find_3"] = @benchmarkable find_ioequations($ode3) +SUITE["ioequations"]["find_4"] = @benchmarkable find_ioequations($ode4) +SUITE["ioequations"]["identifiable_funcs_3"] = @benchmarkable find_identifiable_functions( + $ode3 +) seconds = 600 From 3d4db6eedb95e9fa80c2826b5df3d5c410202e64 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 12 Sep 2026 05:14:41 -0400 Subject: [PATCH 2/3] Bump benchmark job timeout to 60 minutes The dep install + precompile plus benchmarking both the base and PR revs exceeds the 30 minute job timeout on this package's dependency tree. Co-Authored-By: Chris Rackauckas Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: devin 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local session transcript /home/crackauc/.local/share/devin/cli/summaries/history_5872b13ce3ce43b6.md --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 750b9670c..a7303b11a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -12,7 +12,7 @@ permissions: jobs: benchmark: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 60 strategy: fail-fast: false matrix: From db2a1534b9a0648c5d1d3abcb70712f93bd1b118 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 12 Sep 2026 06:23:11 -0400 Subject: [PATCH 3/3] Trim identifiability suite to fit the benchmark job window find_identifiable_functions on the 3-compartment model takes ~10 min per evaluation on current Julia; assess_identifiability already exercises the same differential-algebra path. Co-Authored-By: Chris Rackauckas Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: devin 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local session transcript /home/crackauc/.local/share/devin/cli/summaries/history_5872b13ce3ce43b6.md --- benchmark/benchmarks.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 177d06e1d..a9fd5eb02 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -40,6 +40,3 @@ SUITE["ioequations"] = BenchmarkGroup() SUITE["ioequations"]["find_3"] = @benchmarkable find_ioequations($ode3) SUITE["ioequations"]["find_4"] = @benchmarkable find_ioequations($ode4) -SUITE["ioequations"]["identifiable_funcs_3"] = @benchmarkable find_identifiable_functions( - $ode3 -) seconds = 600