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: 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
41 changes: 41 additions & 0 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using Pkg
# Monorepo: the libraries live in lib/ — develop them so we benchmark this
# checkout's code, not the registered versions.
for lib in (
"ODEProblemLibrary", "DAEProblemLibrary", "DDEProblemLibrary",
"SDEProblemLibrary", "JumpProblemLibrary", "BVProblemLibrary",
"NonlinearProblemLibrary",
)
Pkg.develop(path = joinpath(@__DIR__, "..", "lib", lib))
end

using ODEProblemLibrary, DAEProblemLibrary, NonlinearProblemLibrary
using BVProblemLibrary
using BenchmarkTools

const SUITE = BenchmarkGroup()

# =============================================================================
# Problem library loading (the package's job: constructing problems)
# =============================================================================

SUITE["ode"] = BenchmarkGroup()

SUITE["ode"]["vanderpol"] = @benchmarkable ODEProblemLibrary.prob_ode_vanderpol
SUITE["ode"]["lorenz"] = @benchmarkable ODEProblemLibrary.prob_ode_lorenz
SUITE["ode"]["rober"] = @benchmarkable ODEProblemLibrary.prob_ode_rober
SUITE["ode"]["brusselator_1d"] = @benchmarkable ODEProblemLibrary.prob_ode_brusselator_1d
SUITE["ode"]["pleiades"] = @benchmarkable ODEProblemLibrary.prob_ode_pleiades
SUITE["ode"]["hires"] = @benchmarkable ODEProblemLibrary.prob_ode_hires

SUITE["dae"] = BenchmarkGroup()

SUITE["dae"]["resrob"] = @benchmarkable DAEProblemLibrary.prob_dae_resrob

SUITE["nonlinear"] = BenchmarkGroup()

SUITE["nonlinear"]["testcase_lookup"] = @benchmarkable NonlinearProblemLibrary.nlprob_23_testcases["Generalized Rosenbrock function"]

SUITE["bvp"] = BenchmarkGroup()

SUITE["bvp"]["linear_1"] = @benchmarkable BVProblemLibrary.prob_bvp_linear_1
Loading