diff --git a/ReferenceTests/src/database.jl b/ReferenceTests/src/database.jl index 7db2c8eafb7..6a8480d2f88 100644 --- a/ReferenceTests/src/database.jl +++ b/ReferenceTests/src/database.jl @@ -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 @@ -46,6 +47,11 @@ macro reference_test(name, code) push!($REGISTERED_TESTS, $title) end end + elapsed = round(time() - t1; digits=3) + total = Sys.total_memory() + mem = round((total - Sys.free_memory()) / 10^9; digits=3) + # TODO, write to file and create an overview in the end, similar to the benchmark results! + println("Used $(mem)gb of $(round(total / 10^9; digits=3))gb RAM, time: $(elapsed)s") end end diff --git a/WGLMakie/test/runtests.jl b/WGLMakie/test/runtests.jl index 3d13c3cb842..32360727453 100644 --- a/WGLMakie/test/runtests.jl +++ b/WGLMakie/test/runtests.jl @@ -62,4 +62,10 @@ Makie.inline!(Makie.automatic) recorded_files, recording_dir = @include_reference_tests "refimages.jl" missing_images, scores = ReferenceTests.record_comparison(recording_dir) ReferenceTests.test_comparison(scores; threshold = 0.032) + +end + +@testset "memory leaks" begin + GC.gc(true) + @test Base.summarysize(WGLMakie.TEXTURE_ATLAS) / 10^6 < 9 end