Skip to content

Commit d203cd1

Browse files
committed
Move bench2 test to bench
1 parent c714cb3 commit d203cd1

File tree

2 files changed

+10
-55
lines changed

2 files changed

+10
-55
lines changed

test/bench.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,15 @@ using LinearAlgebra
194194
@info "Calculate Results Allocations: $(result.allocs) Memory: $(result.memory)"
195195
@test result.allocs 300
196196
end
197+
198+
@testset "Allocation Tests for solve() and solve!()" begin
199+
# Step 5: Solve using both methods
200+
result = @benchmark solve_base!($solver, $body_aero, nothing) samples=1 evals=1 # 51 allocations
201+
@test result.allocs <= 55
202+
# time Python: 32.0 ms Ryzen 7950x
203+
# time Julia: 0.45 ms Ryzen 7950x
204+
result = @benchmark sol = solve!($solver, $body_aero, nothing) samples=1 evals=1 # 85 allocations
205+
@test result.allocs <= 89
206+
end
197207
end
198208

test/bench2.jl

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)