Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
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
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
sepia-pub
mael
batmen
Commits
23fa7d85
Commit
23fa7d85
authored
3 years ago
by
Mael Madon
Browse files
Options
Downloads
Patches
Plain Diff
start implementing speedup
parent
0b24a98f
Branches
speedup
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/broker/user.cpp
+19
-4
19 additions, 4 deletions
src/broker/user.cpp
src/broker/user.hpp
+2
-1
2 additions, 1 deletion
src/broker/user.hpp
src/broker/user_description_file_template.json
+9
-1
9 additions, 1 deletion
src/broker/user_description_file_template.json
with
30 additions
and
6 deletions
src/broker/user.cpp
+
19
−
4
View file @
23fa7d85
...
...
@@ -331,6 +331,20 @@ ReplayUserReconfig::ReplayUserReconfig(
"Invalid user_description file for user %s: the sum of "
"'big_medium_little' should be 1.0."
,
name
.
c_str
());
if
(
param
.
HasMember
(
"speedup"
))
{
if
(
param
[
"speedup"
].
IsArray
()
&&
param
[
"speedup"
].
GetArray
().
Size
()
==
2
)
{
speedup_big
=
param
[
"speedup"
].
GetArray
()[
0
].
GetDouble
();
speedup_medium
=
param
[
"speedup"
].
GetArray
()[
0
].
GetDouble
();
}
else
PPK_ASSERT_ERROR
(
false
,
"Invalid user_description file for user %s: speedup must me an array of two doubles."
,
name
.
c_str
());
}
/* Initialize random generator with seed for reproductible experiments */
random_gen
=
std
::
mt19937
(
random_seed
);
...
...
@@ -423,12 +437,13 @@ Profile *ReplayUserReconfig::build_profile(
if
(
nb_core
==
1
)
profile
->
name
=
"1_"
+
duration
;
else
else
profile
->
name
=
flavor
+
"_"
+
duration
;
double
compute_load
=
std
::
stod
(
duration
)
*
nb_core
*
platform_computing_speed
;
profile
->
description
=
"{
\"
com
\"
: 0.0,
\"
cpu
\"
: "
+
std
::
to_string
(
compute_load
)
double
compute_load
=
std
::
stod
(
duration
)
*
nb_core
*
platform_computing_speed
;
profile
->
description
=
"{
\"
com
\"
: 0.0,
\"
cpu
\"
: "
+
std
::
to_string
(
compute_load
)
+
",
\"
type
\"
:
\"
parallel_homogeneous_total
\"
}"
;
return
profile
;
...
...
This diff is collapsed.
Click to expand it.
src/broker/user.hpp
+
2
−
1
View file @
23fa7d85
...
...
@@ -158,7 +158,8 @@ public:
private:
std
::
string
input_json
;
Queue
*
original_trace
;
double
big
,
medium
,
little
;
double
big
,
medium
,
little
;
double
speedup_big
=
4.0
,
speedup_medium
=
2.0
;
std
::
mt19937
random_gen
;
std
::
uniform_real_distribution
<
double
>
distribution
=
std
::
uniform_real_distribution
<
double
>
(
0.0
,
1.0
);
...
...
This diff is collapsed.
Click to expand it.
src/broker/user_description_file_template.json
+
9
−
1
View file @
23fa7d85
...
...
@@ -32,7 +32,15 @@
"category"
:
"replay_user_reconfig"
,
"param"
:
{
"input_json"
:
"donella.json"
,
"big_medium_little"
:
[
0.4
,
0.4
,
0.2
]
"big_medium_little"
:
[
0.4
,
0.4
,
0.2
],
"speedup"
:
[
3.18
,
2.0
]
//
optional
}
}
]
...
...
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