Recommendation for CI benchmark to catch regression

It’s pretty common for Julia package developers to want to monitor key usage latency / performance to avoid regression in PRs. Julia itself has nanosoldier, and some big package such as Makie has their own bot: Hardcode paths for default fonts to avoid search latency by jkrumbiegel · Pull Request #2531 · MakieOrg/Makie.jl · GitHub

Is there a semi-canned solution or workflow people would recommend? I have seen past effort such as: GitHub - maxbennedich/julia-regression-analysis: Regression Analysis for Julia but didn’t seem to be widely used. Maybe it’s just not worth the effort given stability and cost, I think even very popular packages such as DataFrames.jl don’t have automated performance/latency in CI

1 Like

Maybe benchmark.yml and benchmark-comment.yml would be useful here? E.g. in JET: providing comments like OptAnalyzer: ignore reports from const-prop when concrete-evaled already by aviatesk · Pull Request #561 · aviatesk/JET.jl · GitHub

These track performance regressions but not latency regressions.

For latency regressions a good proxy might be invalidation tracking:

Maybe someone can volunteer to add these to the various template package generators…


this is actually super complicated, it needs two CI yaml to do the dance :frowning:

meanwhile, Makie.jl does the whole GitHub API related thing form inside Julia:

1 Like

btw, there is also Github-action-benchmark with Julia support and [ANN] AirspeedVelocity.jl - easily benchmark Julia packages over their lifetime

Looks unmaintained / experimental but still useful. I think that’s the package used in the workflows linked by Krastanov. But AirspeedVelocity looks better more current.

1 Like

For the sake of completeness, the comment from Krastanov before actually mentioned BenchmarkCI.jl . i.e. JET uses BenchmarkCI.jl
I cannot disagree that it looks unmaintained and experimental, but it works. Moreover, I always found @tkf 's packages very well designed and speak to my personal preference.


This is what AirspeedVelocity.jl looks like on a typical PR: Create `AutoFloat` type for units by MilesCranmer · Pull Request #66 · SymbolicML/DynamicQuantities.jl · GitHub

It’s extremely useful for catching regressions:

It’s saved me multiple times from introducing performance regression due to some type instability I didn’t notice. Also very useful for monitoring time-to-load. Basically just copy this file into a workflow: and make sure you have a file benchmark/benchmarks.jl which uses BenchmarkTools to define const SUITE = BenchmarkGroup()

So far it’s used in my repos, and also SymbolicUtils.jl. (Maybe others too that I’m not aware of.)

Compared with BenchmarkCI.jl/PkgBenchmark.jl it’s not as extensive, so probably good to check out both. AirspeedVelocity.jl is basically a re-built version (also uses BenchmarkTools) with a significant emphasis on the command line (because it makes it easier to interface with git, especially if you just want to quickly check for regressions against master or something).