Skip to content

Commit 8352e45

Browse files
committed
Add measure alloc test
1 parent 0136adf commit 8352e45

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/alloctest.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ backend != "SIMD" && throw(ArgumentError("KernelAbstractions backend not allowed
3333
r = run(b)
3434
println("▶ Allocated "*@sprintf("%.0f", r.memory/1e3)*" KiB")
3535
@test r.memory < 50000 # less than 50 KiB allocated on the best mom_step! run (commit f721343 ≈ 8 KiB)
36+
37+
b = @benchmarkable measure!($sim) samples=100; tune!(b) # check 100 times
38+
r = run(b)
39+
println("▶ Allocated "*@sprintf("%.0f", r.memory/1e3)*" KiB")
40+
@test r.memory < 50000 # less than 50 KiB allocated on the best mom_step! run (commit f721343 ≈ 8 KiB)
3641
end

0 commit comments

Comments
 (0)