Skip to content

Commit

Permalink
print message for jobs which took 1 mis more than the ref time
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Feb 23, 2018
1 parent 72680d2 commit 46963d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jobs/jobscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def checkJobs(thrds, resources):
job["end_time"]=gettime(0 if not simulation else job["time2finish"])
job["state"]="Done"
job["exec_time"]=job["end_time"]-job["start_time"]
if not simulation:
dtime = job["exec_time"]-job["origtime"]
if dtime > 60:
print "===> SLOW JOB:",job["exec_time"],"secs vs ",job["origtime"],"secs. Diff:",dtime
resources["done_jobs"]=resources["done_jobs"]+1
for pram in ["rss", "cpu"]: resources["available"][pram]=resources["available"][pram]+job[pram]
if not simulation:
Expand All @@ -111,9 +115,8 @@ def initJobs(jobs, resources, otype):
for i in reversed(range(cmd_count)):
total_jobs+=1
job = group["commands"][i]
if simulation:
job["time2finish"] = job["time"]
job["origtime"] = job["time"]
job["origtime"] = job["time"]
if simulation: job["time2finish"] = job["time"]
job_time += job["time"]
job["time"] = job_time
for x in ["rss","cpu"]:
Expand Down

0 comments on commit 46963d3

Please sign in to comment.