Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MarkovProcesses.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bentriou Mahmoud
MarkovProcesses.jl
Commits
9cbfdc4a
Commit
9cbfdc4a
authored
4 years ago
by
Bentriou Mahmoud
Browse files
Options
Downloads
Patches
Plain Diff
rewrite of some benchmark
parent
687595ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bench/pkg/euclidean_distance_repressilator.jl
+8
-12
8 additions, 12 deletions
bench/pkg/euclidean_distance_repressilator.jl
bench/pkg/sim_repressilator.jl
+17
-5
17 additions, 5 deletions
bench/pkg/sim_repressilator.jl
with
25 additions
and
17 deletions
bench/pkg/euclidean_distance_repressilator.jl
+
8
−
12
View file @
9cbfdc4a
...
...
@@ -21,37 +21,33 @@ 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"
)
aut1
=
create_euclidean_distance_automaton
(
repressilator
,
tml_obs
,
y_obs
,
:
P1
)
sync1
=
repressilator
*
aut1
b_sim_aut1
=
@benchmark
(
σ
=
simulate
(
$
(
sync1
)))
@btime
(
σ
=
simulate
(
$
(
sync1
)))
#
@btime (σ = simulate($(sync1)))
@show
minimum
(
b_sim_aut1
),
mean
(
b_sim_aut1
),
maximum
(
b_sim_aut1
)
b_vol_sim_aut1
=
@benchmark
(
σ
=
volatile_simulate
(
$
(
sync1
)))
@btime
(
σ
=
volatile_simulate
(
$
(
sync1
)))
#
@btime (σ = volatile_simulate($(sync1)))
@show
minimum
(
b_vol_sim_aut1
),
mean
(
b_vol_sim_aut1
),
maximum
(
b_vol_sim_aut1
)
println
(
"ABC reject automaton with 1 loc"
)
aut1_abc
=
create_abc_euclidean_distance_automaton
(
repressilator
,
tml_obs
,
y_obs
,
:
P1
)
aut1_abc
.
ϵ
=
Inf
sync1_abc
=
repressilator
*
aut1_abc
println
(
"After creating sync model"
)
@show
aut1_abc
.
ϵ
b_sim_aut1_abc
=
@benchmark
(
σ
=
simulate
(
$
(
sync1_abc
)))
@btime
(
σ
=
simulate
(
$
(
sync1_abc
)))
println
(
"After bench simulate sync model"
)
@show
aut1_abc
.
ϵ
#@btime (σ = simulate($(sync1_abc)))
@show
minimum
(
b_sim_aut1_abc
),
mean
(
b_sim_aut1_abc
),
maximum
(
b_sim_aut1_abc
)
b_vol_sim_aut1_abc
=
@benchmark
(
σ
=
volatile_simulate
(
$
(
sync1_abc
)))
@btime
(
σ
=
volatile_simulate
(
$
(
sync1_abc
)))
println
(
"After bench volatile_simulate sync model"
)
@show
aut1_abc
.
ϵ
#@btime (σ = volatile_simulate($(sync1_abc)))
@show
minimum
(
b_vol_sim_aut1_abc
),
mean
(
b_vol_sim_aut1_abc
),
maximum
(
b_vol_sim_aut1_abc
)
#=
...
...
@@ -65,9 +61,9 @@ println("Automaton with nbr_obs loc")
aut2
=
create_euclidean_distance_automaton_2
(
repressilator
,
tml_obs
,
y_obs
,
:
P1
)
sync2
=
repressilator
*
aut2
b_sim_aut2
=
@benchmark
(
σ
=
simulate
(
$
(
sync2
)))
@btime
(
σ
=
simulate
(
$
(
sync2
)))
#
@btime (σ = simulate($(sync2)))
@show
minimum
(
b_sim_aut2
),
mean
(
b_sim_aut2
),
maximum
(
b_sim_aut2
)
b_vol_sim_aut2
=
@benchmark
(
σ
=
volatile_simulate
(
$
(
sync2
)))
@btime
(
σ
=
volatile_simulate
(
$
(
sync2
)))
#
@btime (σ = volatile_simulate($(sync2)))
@show
minimum
(
b_vol_sim_aut2
),
mean
(
b_vol_sim_aut2
),
maximum
(
b_vol_sim_aut2
)
This diff is collapsed.
Click to expand it.
bench/pkg/sim_repressilator.jl
+
17
−
5
View file @
9cbfdc4a
...
...
@@ -5,14 +5,26 @@ using MarkovProcesses
import
LinearAlgebra
:
dot
import
Distributions
:
Uniform
load_automaton
(
"euclidean_distance_automaton"
)
load_model
(
"repressilator"
)
tb
=
210.0
tml_obs
=
0
:
10.0
:
21
0.0
observe_all!
(
repressilator
)
N_periods
,
ref_mean_tp
=
8
,
2
0.0
set_param!
(
repressilator
,
[
:
α
,
:
β
,
:
n
,
:
α0
],
[
200.0
,
2.0
,
2.0
,
0.0
])
set_time_bound!
(
repressilator
,
tb
)
set_time_bound!
(
repressilator
,
(
N_periods
)
*
ref_mean_tp
)
b_sim
=
@benchmark
σ
=
simulate
(
$
(
repressilator
))
@
btime
σ
=
simulate
(
$
(
repressilator
))
@
show
mean
(
b_sim
)
@show
mean
(
b_sim
)
.
time
,
mean
(
b_sim
)
.
memory
load_automaton
(
"period_automaton"
)
L
,
H
=
20.0
,
100.0
A_per
=
create_period_automaton
(
repressilator
,
L
,
H
,
N_periods
,
:
P1
;
ref_mean_tp
=
ref_mean_tp
,
error_func
=
:
max_mean_var_relative_error
)
sync_repressilator
=
repressilator
*
A_per
b_period
=
@benchmark
σ
=
simulate
(
$
(
sync_repressilator
))
@show
mean
(
b_period
)
@show
mean
(
b_period
)
.
time
,
mean
(
b_period
)
.
memory
b_vol_period
=
@benchmark
σ
=
volatile_simulate
(
$
(
sync_repressilator
))
@show
mean
(
b_vol_period
)
@show
mean
(
b_vol_period
)
.
time
,
mean
(
b_vol_period
)
.
memory
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment