Skip to content

Commit a4b4d07

Browse files
committed
Benchmark time spent solving each perturbation mode
1 parent f9eb943 commit a4b4d07

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/src/benchmarks.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,15 @@ for (i, k) in enumerate(ks)
178178
end
179179
p
180180
```
181+
182+
## Perturbations time per mode
183+
184+
```@example bench
185+
ptprob0, ptprobgen = SymBoltz.setuppt(prob.pt, bgsol, prob.bgspline)
186+
solvemode(k) = solve(ptprobgen(ptprob0, k); alg = SymBoltz.DEFAULT_PTALG, reltol = 1e-8, abstol = 1e-8)
187+
188+
ks = 10 .^ range(-2, 5, length = 100)
189+
times = [minimum(@elapsed solvemode(k) for i in 1:10) for k in ks]
190+
191+
plot(log10.(ks), times .* 1000; xlabel = "lg(k)", ylabel = "time / ms", xticks = range(log10(ks[begin]), log10(ks[end]), step=1), marker = :circle, label = nothing)
192+
```

0 commit comments

Comments
 (0)