diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index b2c813a5..508e8594 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -1,27 +1,27 @@ using Pkg Pkg.activate(@__DIR__) -Pkg.develop(PackageSpec(path = dirname(@__DIR__))) using BenchmarkTools using DispersiveShallowWater const SUITE = BenchmarkGroup() -elixirs = [joinpath(examples_dir(), "bbm_1d", "bbm_1d_basic.jl")]#, - # joinpath(examples_dir(), "bbm_1d", "bbm_1d_fourier.jl"), - # joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_dg.jl"), - # joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_relaxation.jl"), - # joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_upwind_relaxation.jl"), - # joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_basic_reflecting.jl"), - # joinpath(examples_dir(), "hyperbolic_serre_green_naghdi_1d", - # "hyperbolic_serre_green_naghdi_dingemans.jl"), - # joinpath(examples_dir(), "serre_green_naghdi_1d", - # "serre_green_naghdi_well_balanced.jl"), - # joinpath(examples_dir(), "svaerd_kalisch_1d", - # "svaerd_kalisch_1d_dingemans_relaxation.jl")] +elixirs = [joinpath(examples_dir(), "bbm_1d", "bbm_1d_basic.jl"), + joinpath(examples_dir(), "bbm_1d", "bbm_1d_fourier.jl"), + joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_dg.jl"), + joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_relaxation.jl"), + joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_upwind_relaxation.jl"), + joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_basic_reflecting.jl"), + joinpath(examples_dir(), "hyperbolic_serre_green_naghdi_1d", + "hyperbolic_serre_green_naghdi_dingemans.jl"), + joinpath(examples_dir(), "serre_green_naghdi_1d", + "serre_green_naghdi_well_balanced.jl"), + joinpath(examples_dir(), "svaerd_kalisch_1d", + "svaerd_kalisch_1d_dingemans_relaxation.jl")] for elixir in elixirs benchname = joinpath(basename(dirname(elixir)), basename(elixir)) + # use include instead of trixi_include(elixir, tspan = (0.0, 1e-10)) because AirspeedVelocity.jl has namespace issues include(elixir) SUITE[benchname] = @benchmarkable DispersiveShallowWater.rhs!($(similar(sol.u[end])), $(copy(sol.u[end])), diff --git a/benchmark/run_benckmarks.jl b/benchmark/run_benckmarks.jl new file mode 100644 index 00000000..e9c6f699 --- /dev/null +++ b/benchmark/run_benckmarks.jl @@ -0,0 +1,6 @@ +using Pkg +Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + +include("benchmarks.jl") +tune!(SUITE) +result = run(SUITE)