Skip to content

Commit

Permalink
print error for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingru923 committed Sep 12, 2024
1 parent 0c67a3d commit 9126d85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/integration_test/hws_integration_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@
@testset "Results values" begin
@test basin.node_id == basin_bench.node_id
@test all(q -> abs(q) < 0.01, basin.level - basin_bench.level)
all(q -> (println(q); abs(q) > 0.01), basin.level - basin_bench.level)
end

timed = @timed Ribasim.run(toml_path)

# current benchmark is 600s
benchmark_runtime = 600
performance_diff =
round(abs(timed.time - benchmark_runtime) / benchmark_runtime * 100; digits = 2)
round((timed.time - benchmark_runtime) / benchmark_runtime * 100; digits = 2)
if performance_diff < 0.0
performance_diff = abs(performance_diff)
@info "Runtime is $(timed.time) and it is $performance_diff % faster than benchmark"
elseif performance_diff > 0.0 && performance_diff < 0.2
@info "Runtime is $(timed.time) and it is $performance_diff % slower than benchmark"
Expand Down

0 comments on commit 9126d85

Please sign in to comment.