Skip to content

Commit

Permalink
add timings + used memory to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Oct 10, 2023
1 parent ce5c214 commit 7752c34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ReferenceTests/src/database.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ macro reference_test(name, code)
funcs = used_functions(code)
skip = (title in SKIP_TITLES) || any(x-> x in funcs, SKIP_FUNCTIONS)
return quote
t1 = time()
@testset $(title) begin
if $skip
@test_broken false
Expand All @@ -46,6 +47,11 @@ macro reference_test(name, code)
push!($REGISTERED_TESTS, $title)
end
end
GC.gc(true)
elapsed = round(time() - t1; digits=3)
mem = (Sys.total_memory() - Sys.free_memory()) / 10^9
# TODO, write to file and create an overview in the end, similar to the benchmark results!
println("Used RAM: $(mem), time: $(elapsed)s")
end
end

Expand Down

0 comments on commit 7752c34

Please sign in to comment.