Skip to content

Commit

Permalink
Merge pull request #265 from ReactiveBayes/improve-benchmark-filestru…
Browse files Browse the repository at this point in the history
…cture

improve benchmark infrastructure
  • Loading branch information
wouterwln authored Jan 7, 2025
2 parents 6f99b13 + c227bc6 commit 0a2aa29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Coverage.ipynb

benchmark/tune.json
benchmark_*md
**/benchmark_logs

examples/*Compiled
statprof
Expand Down
1 change: 1 addition & 0 deletions scripts/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
BitSetTuples = "0f2f92aa-23a3-4d05-b791-88071d064721"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
15 changes: 10 additions & 5 deletions scripts/bench.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using GraphPPL
using BenchmarkTools
using PkgBenchmark
using Dates

result, name = if ARGS == []
PkgBenchmark.benchmarkpkg(GraphPPL), "current"
mkpath("./benchmark_logs")

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

export_markdown("benchmark_vs_$(name)_result.md", result)

0 comments on commit 0a2aa29

Please sign in to comment.