From f7ac4efad6568df1d5e255e82c3c991eea88b653 Mon Sep 17 00:00:00 2001 From: Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr> Date: Sun, 28 Feb 2021 14:32:00 +0100 Subject: [PATCH] small rewrite of euclidean distance automata benchmarks --- bench/pkg/euclidean_distance_repressilator.jl | 10 ++++++++-- bench/pkg/euclidean_distance_sir.jl | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bench/pkg/euclidean_distance_repressilator.jl b/bench/pkg/euclidean_distance_repressilator.jl index 2dacfd7..5e55a9e 100644 --- a/bench/pkg/euclidean_distance_repressilator.jl +++ b/bench/pkg/euclidean_distance_repressilator.jl @@ -16,8 +16,14 @@ set_time_bound!(repressilator, tb) y_obs = vectorize(simulate(repressilator), :P1, tml_obs) println("Vectorize:") -b_vectorize = @benchmark (σ = simulate($(repressilator)); euclidean_distance(σ, :P1, tml_obs, y_obs)) -@btime (σ = simulate($(repressilator)); euclidean_distance(σ, :P1, tml_obs, y_obs)) +b_vectorize = @benchmark begin + σ = simulate($(repressilator)) + euclidean_distance(σ, :P1, tml_obs, y_obs) +end +@btime begin + σ = simulate($(repressilator)) + euclidean_distance(σ, :P1, tml_obs, y_obs) +end @show minimum(b_vectorize), mean(b_vectorize), maximum(b_vectorize) println("Automaton with 1 loc") diff --git a/bench/pkg/euclidean_distance_sir.jl b/bench/pkg/euclidean_distance_sir.jl index 4825092..3e07184 100644 --- a/bench/pkg/euclidean_distance_sir.jl +++ b/bench/pkg/euclidean_distance_sir.jl @@ -29,10 +29,11 @@ b_vol_sim_aut1 = @benchmark (σ = volatile_simulate($(sync1))) @btime (σ = volatile_simulate($(sync1))) @show minimum(b_vol_sim_aut1), mean(b_vol_sim_aut1), maximum(b_vol_sim_aut1) +#= println("Memory test") Profile.clear_malloc_data() σ = volatile_simulate(sync1) -exit() +=# println("Automaton with nbr_obs loc") aut2 = create_euclidean_distance_automaton_2(SIR, tml_obs, y_obs, :I) -- GitLab