Skip to content

Commit b98e12f

Browse files
ci: better handle compile time in benchmarks
1 parent 2c04b7b commit b98e12f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

benchmark/benchmarks.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,17 @@ end
4545

4646
@named model = DCMotor()
4747

48+
# first call
49+
mtkcompile(model)
4850
SUITE["mtkcompile"] = @benchmarkable mtkcompile($model)
4951

5052
model = mtkcompile(model)
5153
u0 = unknowns(model) .=> 0.0
5254
tspan = (0.0, 6.0)
53-
SUITE["ODEProblem"] = @benchmarkable ODEProblem($model, $u0, $tspan)
5455

5556
prob = ODEProblem(model, u0, tspan)
57+
SUITE["ODEProblem"] = @benchmarkable ODEProblem($model, $u0, $tspan)
58+
59+
# first call
60+
init(prob)
5661
SUITE["init"] = @benchmarkable init($prob)

0 commit comments

Comments
 (0)