Skip to content

Commit e3beec3

Browse files
committed
Improve printing
1 parent 23ed362 commit e3beec3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

examples/batch_pilot.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ let
287287
nothing, nothing, nothing, nothing, nothing, nothing, nothing,
288288
0.0, 0, 0, false)
289289
app.max_time = app.set.sim_time
290-
@printf("init parameters: delta=%.6f, stiffness_factor=%.3f\n", app.set.delta, app.set.stiffness_factor)
290+
@printf("\nInit parameters: delta=%.6f, stiffness_factor=%.3f\n", app.set.delta, app.set.stiffness_factor)
291291

292292
init(app)
293293
if TIMESTAMPS
@@ -300,11 +300,14 @@ let
300300
output_path = joinpath(dirname(@__DIR__), "output")
301301

302302
steps, error = simulate(app)
303+
sim_time = steps * app.dt
304+
wall_time_sim = (time_ns() - wall_start_ns) / 1e9
303305
push!(results, (project, error))
304306
if error.code != NoError
305307
println("\nSimulation error ($(error.code)): $(error.message)")
306308
else
307-
println("\nSimulation completed successfully (project = $project, steps = $steps)")
309+
@printf("\nSimulation completed successfully (project = %s, sim_time = %.2f s, wall_time = %.2f s)\n",
310+
project, sim_time, wall_time_sim)
308311
end
309312
if SAVELOG
310313
println("\nSaving log to output/$(output_name).arrow ($(app.logger.index) entries) ...")

0 commit comments

Comments
 (0)