Skip to content

Commit

Permalink
Empty array check in JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhatvineeth committed Jun 11, 2020
1 parent f6bd43b commit 0b38b8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions SchedulingSimulator/Main/edf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def earliestDeadlineFirstAlgorithm(tasks):
if u > 1:
print("The tasks are not feasible", file=logFile)
print("Processes are not schedulable")
print("\n-------------------------------------------------\n")
return [];

else:
Expand Down
1 change: 1 addition & 0 deletions SchedulingSimulator/Main/fcfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def findavgTime(processes, n, bt, at):
resultArray.append(resultTasks)
print("Average waiting time = %.5f " % (total_wt / n))
print("Average turn around time = ", total_tat / n)
print("\n-------------------------------------------------\n")
return resultArray


Expand Down
3 changes: 3 additions & 0 deletions SchedulingSimulator/Main/static/js/bar-graph-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ var colors = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6',
];

function createGraph(canvasID, title, schedulingArray, inputArray) {
if(schedulingArray.length == 0 ){
return;
}
var labels = [];
var data = generateGraph(schedulingArray);
var dataSet = [];
Expand Down

0 comments on commit 0b38b8c

Please sign in to comment.