Skip to content
Snippets Groups Projects
Commit 23fa7d85 authored by Mael Madon's avatar Mael Madon
Browse files

start implementing speedup

parent 0b24a98f
Branches speedup
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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);
......
......@@ -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
}
}
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment