Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test stat printing more coherent #4106

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ function print_stats(io::IO, stats_dict::Dict; fmt=PrettyTables.tf_unicode, max=
println(io, "### Stats per file")
println(io)
table = hcat(first.(sorted), permutedims(reduce(hcat, collect.(values.(last.(sorted))))))
formatters = nothing
if haskey(first(values(stats_dict)), :ctime)
header=[:Filename, Symbol("Runtime in s"), Symbol("+ Compilation"), Symbol("+ Recompilation"), Symbol("Allocations in MB")]
#formatters = PrettyTables.ft_printf("%.2f%%", [3,4])
formatters = (ft_printf("%.2f", [2,3,4]), ft_printf("%.1f", [5]))
else
header=[:Filename, Symbol("Time in s"), Symbol("Allocations in MB")]
formatters = (ft_printf("%.2f", [2]), ft_printf("%.1f", [3]))
lgoettgens marked this conversation as resolved.
Show resolved Hide resolved
end
PrettyTables.pretty_table(io, table; tf=fmt, max_num_of_rows=max, header=header, formatters=formatters)
end
Expand Down
Loading