Skip to content

Commit 0a2aa29

Browse files
authored
Merge pull request #265 from ReactiveBayes/improve-benchmark-filestructure
improve benchmark infrastructure
2 parents 6f99b13 + c227bc6 commit 0a2aa29

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Coverage.ipynb
4949

5050
benchmark/tune.json
5151
benchmark_*md
52+
**/benchmark_logs
5253

5354
examples/*Compiled
5455
statprof

scripts/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
33
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
44
BitSetTuples = "0f2f92aa-23a3-4d05-b791-88071d064721"
5+
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
56
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
67
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"

scripts/bench.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
using GraphPPL
22
using BenchmarkTools
33
using PkgBenchmark
4+
using Dates
45

5-
result, name = if ARGS == []
6-
PkgBenchmark.benchmarkpkg(GraphPPL), "current"
6+
mkpath("./benchmark_logs")
7+
8+
if isempty(ARGS)
9+
result = PkgBenchmark.benchmarkpkg(GraphPPL)
10+
export_markdown("./benchmark_logs/benchmark_$(now()).md", result)
11+
export_markdown("./benchmark_logs/last.md", result)
712
else
8-
BenchmarkTools.judge(GraphPPL, ARGS[1]; judgekwargs = Dict(:time_tolerance => 0.1, :memory_tolerance => 0.05)), ARGS[1]
13+
name = first(ARGS)
14+
BenchmarkTools.judge(GraphPPL, name; judgekwargs = Dict(:time_tolerance => 0.1, :memory_tolerance => 0.05))
15+
export_markdown("benchmark_vs_$(name)_result.md", result)
916
end
10-
11-
export_markdown("benchmark_vs_$(name)_result.md", result)

0 commit comments

Comments
 (0)