Skip to content
Snippets Groups Projects
Commit ae65684d authored by Maël Madon's avatar Maël Madon
Browse files

refac: rename DMUSerDegrad -> DMUserDegradSpace

parent 464f8f06
Branches
Tags
1 merge request!21issue17,18,21_new
......@@ -130,7 +130,7 @@ Broker::Broker(rapidjson::Document *user_description_file)
/* DM user */
else if (category == "dm_user_reconfig"
|| category == "dm_user_degrad" || category == "dm_user_renonce"
|| category == "dm_user_degrad_space" || category == "dm_user_renonce"
|| category == "dm_user_delay")
{
PPK_ASSERT_ERROR(dm_window != nullptr,
......@@ -141,8 +141,8 @@ Broker::Broker(rapidjson::Document *user_description_file)
if (category == "dm_user_reconfig")
user = new DMUserReconfig(name, param, dm_window);
else if (category == "dm_user_degrad")
user = new DMUserDegrad(name, param, dm_window);
else if (category == "dm_user_degrad_space")
user = new DMUserDegradSpace(name, param, dm_window);
else if (category == "dm_user_renonce")
user = new DMUserRenonce(name, param, dm_window);
......
......@@ -47,7 +47,7 @@
},
{
"name": "francois",
"category": "dm_user_degrad",
"category": "dm_user_degrad_space",
"param": {
"input_json": "francois.json"
......
......@@ -179,15 +179,15 @@ void DMUserReconfig::jobs_to_submit(double date,
ReplayUser::jobs_to_submit(date, jobs, profiles);
}
/* DMUserDegrad */
DMUserDegrad::DMUserDegrad(
/* DMUserDegradSpace */
DMUserDegradSpace::DMUserDegradSpace(
std::string name, const rapidjson::Value &param, DMWindow *window)
{
dm_window = window;
init_ReplayUser(name, param);
}
DMUserDegrad::~DMUserDegrad()
DMUserDegradSpace::~DMUserDegradSpace()
{
if (original_trace)
{
......@@ -196,7 +196,7 @@ DMUserDegrad::~DMUserDegrad()
}
}
void DMUserDegrad::jobs_to_submit(double date, std::list<shared_ptr<Job>> &jobs,
void DMUserDegradSpace::jobs_to_submit(double date, std::list<shared_ptr<Job>> &jobs,
std::list<const Profile *> &profiles)
{
ReplayUser::jobs_to_submit(date, jobs, profiles);
......@@ -264,7 +264,7 @@ bool DMUserReconfig::handle_job(
return rigid_job(job, profile, this, -1.0);
}
bool DMUserDegrad::handle_job(
bool DMUserDegradSpace::handle_job(
double date, shared_ptr<Job> job, Profile *profile)
{
if (!dm_window->date_in_dm_window(date))
......
......@@ -106,18 +106,18 @@ protected:
/**
* @brief The user follows the input trace in a rigid fashion, except in the
* demand response window where she degrades the submitted jobs.
* @details The degradation consists in dividing the number of cores requested
* demand response window where she degrades spatially the submitted jobs.
* @details The spatial degradation consists in dividing the number of cores requested
* by two (rounded up), keeping the original submission time. Note: if the
* original number of cores requested was 1, degrad is equivalent to rigid, and
* will appear as such in the logs.
*/
class DMUserDegrad : virtual public ReplayUser
class DMUserDegradSpace : virtual public ReplayUser
{
public:
DMUserDegrad(
DMUserDegradSpace(
std::string name, const rapidjson::Value &param, DMWindow *dm_window);
~DMUserDegrad();
~DMUserDegradSpace();
long next_submission();
void jobs_to_submit(double date, std::list<shared_ptr<Job>> &jobs,
std::list<const Profile *> &profiles);
......
{
"dm_window": [200000, 300000],
"users": [
{
"name": "user14",
"category": "dm_user_degrad",
"param": {
"input_json": "test/workloads/dyn/user14.json"
}
},
{
"name": "user15",
"category": "dm_user_degrad",
"param": {
"input_json": "test/workloads/dyn/user15.json"
}
},
{
"name": "user16",
"category": "dm_user_degrad",
"param": {
"input_json": "test/workloads/dyn/user16.json"
}
},
{
"name": "user18",
"category": "dm_user_degrad",
"param": {
"input_json": "test/workloads/dyn/user18.json"
}
}
]
}
\ No newline at end of file
......@@ -8,7 +8,7 @@ two_machine_platform = Platform(name='two_machine_platform', filename='test/plat
users = [
"dm_user_reconfig",
"dm_user_degrad",
"dm_user_degrad_space",
"dm_user_renonce",
"dm_user_delay",
"dm_user_multi_behavior",
......@@ -32,9 +32,9 @@ def test_dm_user_reconfig(platform_multiC):
""" Test user_class dm_user_reconfig as described in the file schedconf/dm_user_reconfig"""
run_user("dm_user_reconfig", platform_multiC)
def test_dm_user_degrad(platform_multiC):
""" Test user_class dm_user_degrad as described in the file schedconf/dm_user_degrad"""
run_user("dm_user_degrad", platform_multiC)
def test_dm_user_degrad_space(platform_multiC):
""" Test user_class dm_user_degrad_space as described in the file schedconf/dm_user_degrad_space"""
run_user("dm_user_degrad_space", platform_multiC)
def test_speedup():
""" Test user_class dm_user_reconfig alpha speedup as described in the file schedconf/reconfig_alpha.json"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment