1+
2+ using BenchmarkTools
3+
4+ using IncrementalInference
5+ using RoME
6+
7+ # #
8+
9+ # Define a parent BenchmarkGroup to contain our SUITE
10+ const SUITE = BenchmarkGroup ()
11+
12+ # Add some child groups to our benchmark SUITE.
13+ SUITE[" parametric" ] = BenchmarkGroup (
14+ " 1-init" => BenchmarkGroup ([1 , " par" ]),
15+ " 2-solve" => BenchmarkGroup ([2 , " par" ]),
16+ " 3-grow" => BenchmarkGroup ([3 , " par" ]),
17+ )
18+ # SUITE["non-parametric"] = BenchmarkGroup(["2-solve"])
19+ # SUITE["construct"] = BenchmarkGroup()
20+
21+ SUITE[" parametric" ][" 1-init" ][" hex" ] = @benchmarkable (
22+ IIF. autoinitParametric! (fg);
23+ samples = 2 ,
24+ seconds = 90 ,
25+ setup= (println (" 1-init fg" ); fg= generateGraph_Hexagonal (;graphinit= false , landmark= false ))
26+ )
27+
28+ SUITE[" parametric" ][" 2-solve" ][" hex" ] = @benchmarkable (
29+ IIF. solveGraphParametric! (fg; init= false );
30+ samples = 2 ,
31+ seconds = 90 ,
32+ setup= (println (" 2-fg-1 solve" ); fg= generateGraph_Hexagonal (;graphinit= false , landmark= false ))
33+ )
34+
35+ SUITE[" parametric" ][" 3-grow" ][" hex" ] = @benchmarkable (
36+ IIF. solveGraphParametric! (fg; init= false );
37+ samples = 2 ,
38+ seconds = 90 ,
39+ setup= (println (" 3-fg-2 solve" ); fg= generateGraph_Hexagonal (;graphinit= false , landmark= true ))
40+ )
41+
42+ SUITE[" mmisam" ] = BenchmarkGroup (
43+ " 1-init" => BenchmarkGroup ([1 , " non-par" ]),
44+ " 2-solve" => BenchmarkGroup ([2 , " non-par" ]),
45+ " 3-grow" => BenchmarkGroup ([3 , " non-par" ]),
46+ )
47+
48+ SUITE[" mmisam" ][" 2-solve" ][" hex" ] = @benchmarkable (
49+ solveGraph! (fg);
50+ samples = 2 ,
51+ seconds = 90 ,
52+ setup= (println (" fg-1 solve" ); fg= generateGraph_Hexagonal (;graphinit= true , landmark= false ))
53+ )
54+
55+ SUITE[" mmisam" ][" 3-grow" ][" hex" ] = @benchmarkable (
56+ solveGraph! (fg);
57+ samples = 2 ,
58+ seconds = 90 ,
59+ setup= (println (" fg-2 solve" ); fg= generateGraph_Hexagonal (;graphinit= true , landmark= true ))
60+ )
61+
62+ # TODO maintain order (numbered for now), it's a Dict so not guarantied
63+ leaves (SUITE)
64+
65+ # # If a cache of tuned parameters already exists, use it, otherwise, tune and cache
66+ # # the benchmark parameters. Reusing cached parameters is faster and more reliable
67+ # # than re-tuning `SUITE` every time the file is included.
68+ # paramspath = joinpath(dirname(@__FILE__), "params.json")
69+
70+ # if isfile(paramspath)
71+ # loadparams!(SUITE, BenchmarkTools.load(paramspath)[1], :evals);
72+ # else
73+ # tune!(SUITE)
74+ # BenchmarkTools.save(paramspath, BenchmarkTools.params(SUITE));
75+ # end
0 commit comments