Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/callbacks/info.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,6 @@ function print_summary(integrator)
# Print timer
TimerOutputs.complement!(timer())
print_timer(timer(), title="TrixiParticles.jl",
allocations=true, linechars=:unicode, compact=false)
allocations=true, linechars=:unicode, compact=false, bars=false)
println()
end
18 changes: 8 additions & 10 deletions test/callbacks/info.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,16 @@
TrixiParticles.isfinished(::NamedTuple) = true
TrixiParticles.derivative_discontinuity!(::NamedTuple, _) = nothing

# Reset the timer to make the timer table independent of previous tests
TrixiParticles.reset_timer!(TrixiParticles.timer())

expected = """
────────────────────────────────────────────────────────────────────────────────────────────────────
Trixi simulation finished.
Final time: 23.0
Time steps: 453 (accepted) 472 (total)
────────────────────────────────────────────────────────────────────────────────────────────────────

TrixiParticles.jl
────────────────────────────────────────────────────────────
Time Allocations
───────────────── ──────────────────"""
"""

# Redirect `stdout` to a string
pipe = Pipe()
Expand All @@ -171,6 +170,9 @@
@test startswith(output, expected)
# TimerOutputs controls the table layout, which differs between versions.
@test occursin(r"TrixiParticles\.jl[\s─]*Time\s+Allocations", output)
# With `bars=true`, there would be extra spacing between "avg" and "alloc".
@test occursin("\n Section ncalls time %tot avg alloc %tot avg\n",
output)
end

@testset verbose=true "affect! finished with split integration" begin
Expand Down Expand Up @@ -200,11 +202,7 @@
Time steps: 123 (accepted) 150 (total)
Split integration time steps: 938 (accepted) 1023 (total)
────────────────────────────────────────────────────────────────────────────────────────────────────

TrixiParticles.jl
────────────────────────────────────────────────────────────
Time Allocations
───────────────── ──────────────────"""
"""

# Redirect `stdout` to a string
pipe = Pipe()
Expand Down
Loading