Commit 95ec1331 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

Job updated so that it outputs its completion time in the results. Results of tests also updated

parent 84e21419
......@@ -54,6 +54,14 @@ class Job(Entity): # inherits from the Entity c
json['_class'] = 'Dream.Job';
json['id'] = str(self.id)
json['results'] = {}
#if the Job has reached an exit, input completion time in the results
if self.schedule[-1][0].type=='Exit':
json['results']['completionTime']=self.schedule[-1][1]
#else input "still in progress"
else:
json['results']['completionTime']="still in progress"
json['results']['schedule']={}
i=0
for record in self.schedule:
......
......@@ -13,6 +13,7 @@
"_class": "Dream.Job",
"id": "J1",
"results": {
"completionTime": 6.0,
"schedule": {
"1": {
"entranceTime": 0,
......
......@@ -13,6 +13,7 @@
"_class": "Dream.Job",
"id": "J1",
"results": {
"completionTime": 6.0,
"schedule": {
"1": {
"entranceTime": 0,
......@@ -49,6 +50,7 @@
"_class": "Dream.Job",
"id": "J2",
"results": {
"completionTime": 13.0,
"schedule": {
"1": {
"entranceTime": 0,
......
......@@ -13,6 +13,7 @@
"_class": "Dream.Job",
"id": "J1",
"results": {
"completionTime": 23.0,
"schedule": {
"1": {
"entranceTime": 0,
......@@ -49,6 +50,7 @@
"_class": "Dream.Job",
"id": "J2",
"results": {
"completionTime": 19.0,
"schedule": {
"1": {
"entranceTime": 2.0,
......@@ -85,6 +87,7 @@
"_class": "Dream.Job",
"id": "J3",
"results": {
"completionTime": 5.0,
"schedule": {
"1": {
"entranceTime": 0,
......@@ -113,6 +116,7 @@
"_class": "Dream.Job",
"id": "J4",
"results": {
"completionTime": 12.0,
"schedule": {
"1": {
"entranceTime": 5.0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment