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

clean: remove potentially misleading job->unique_number field

parent 9036003a
No related branches found
No related tags found
No related merge requests found
Pipeline #5186 passed
...@@ -155,7 +155,6 @@ Job *Workload::job_from_json_object(const Value &object) ...@@ -155,7 +155,6 @@ Job *Workload::job_from_json_object(const Value &object)
j->walltime = -1; j->walltime = -1;
j->has_walltime = true; j->has_walltime = true;
j->nb_requested_resources = object["res"].GetInt(); j->nb_requested_resources = object["res"].GetInt();
j->unique_number = _job_number++;
j->profile = object["profile"].GetString(); j->profile = object["profile"].GetString();
if (object.HasMember("walltime")) if (object.HasMember("walltime"))
...@@ -405,7 +404,6 @@ Job *Parser::job_from_json_object(string user_name, const Value &object) ...@@ -405,7 +404,6 @@ Job *Parser::job_from_json_object(string user_name, const Value &object)
j->walltime = -1; j->walltime = -1;
j->has_walltime = true; j->has_walltime = true;
j->nb_requested_resources = object["res"].GetInt(); j->nb_requested_resources = object["res"].GetInt();
// j->unique_number = _job_number++;
j->profile = object["profile"].GetString(); j->profile = object["profile"].GetString();
if (object.HasMember("walltime")) if (object.HasMember("walltime"))
......
...@@ -29,7 +29,6 @@ enum JobStatus ...@@ -29,7 +29,6 @@ enum JobStatus
struct Job struct Job
{ {
std::string id; std::string id;
int unique_number;
int nb_requested_resources; int nb_requested_resources;
std::string profile; std::string profile;
Rational walltime; Rational walltime;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <boost/algorithm/string/join.hpp> #include <boost/algorithm/string/join.hpp>
#include <fstream> #include <fstream>
#include <stdio.h> #include <stdio.h>
#include <functional>
#include <loguru.hpp> #include <loguru.hpp>
...@@ -333,7 +334,6 @@ double Schedule::query_wait(int size, Rational time, ResourceSelector *selector) ...@@ -333,7 +334,6 @@ double Schedule::query_wait(int size, Rational time, ResourceSelector *selector)
Job fake_job; Job fake_job;
fake_job.id = "fake"; fake_job.id = "fake";
fake_job.unique_number = -1;
fake_job.nb_requested_resources = size; fake_job.nb_requested_resources = size;
fake_job.walltime = time; fake_job.walltime = time;
...@@ -837,7 +837,7 @@ string Schedule::to_svg() const ...@@ -837,7 +837,7 @@ string Schedule::to_svg() const
Rational rect_x0 = jobs_starting_times[job] * second_width - x0; Rational rect_x0 = jobs_starting_times[job] * second_width - x0;
Rational rect_x1 = slice.begin * second_width - x0; Rational rect_x1 = slice.begin * second_width - x0;
Rational rect_width = rect_x1 - rect_x0; Rational rect_width = rect_x1 - rect_x0;
string rect_color = _colors[job->unique_number % (int)_colors.size()]; string rect_color = _colors[stoi(job->id) % (int)_colors.size()];
// Let's find where the job has been allocated // Let's find where the job has been allocated
PPK_ASSERT_ERROR(slice_it != _profile.begin()); PPK_ASSERT_ERROR(slice_it != _profile.begin());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment