Skip to content

Commit

Permalink
Merge pull request #221 from ReactiveBayes/benchmark-infrastructure
Browse files Browse the repository at this point in the history
Update benchmark infrastructure to allow judge
  • Loading branch information
bvdmitri authored Jan 7, 2025
2 parents 088da16 + 60917e0 commit 09a57f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ format: scripts_init ## Code formating run
julia --startup-file=no --project=scripts/ scripts/format.jl --overwrite

benchmark: scripts_init ## Code formating run
julia --startup-file=no --project=scripts/ scripts/benchmark.jl
julia --startup-file=no --project=scripts/ scripts/benchmark.jl $(branch)

.PHONY: docs

Expand Down
1 change: 1 addition & 0 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using BenchmarkTools
using ExponentialFamily, Distributions, Random
using ExponentialFamily.BayesBase

const SUITE = BenchmarkGroup()

Expand Down
15 changes: 10 additions & 5 deletions scripts/benchmark.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
using PkgBenchmark, Dates
using PkgBenchmark, BenchmarkTools, Dates

import ExponentialFamily

results = benchmarkpkg(ExponentialFamily)

mkpath("./benchmark_logs")

export_markdown("./benchmark_logs/benchmark_$(now()).md", results)
export_markdown("./benchmark_logs/last.md", results)
if isempty(ARGS)
result = PkgBenchmark.benchmarkpkg(ExponentialFamily)
export_markdown("./benchmark_logs/benchmark_$(now()).md", result)
export_markdown("./benchmark_logs/last.md", result)
else
name = first(ARGS)
BenchmarkTools.judge(ExponentialFamily, name; judgekwargs = Dict(:time_tolerance => 0.1, :memory_tolerance => 0.05))
export_markdown("benchmark_vs_$(name)_result.md", result)
end

0 comments on commit 09a57f6

Please sign in to comment.