Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -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: 60
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
42 changes: 42 additions & 0 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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)
Loading