Skip to content

Commit 0b38b8c

Browse files
committed
Empty array check in JS.
1 parent f6bd43b commit 0b38b8c

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

SchedulingSimulator/Main/edf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def earliestDeadlineFirstAlgorithm(tasks):
2323
if u > 1:
2424
print("The tasks are not feasible", file=logFile)
2525
print("Processes are not schedulable")
26+
print("\n-------------------------------------------------\n")
2627
return [];
2728

2829
else:

SchedulingSimulator/Main/fcfs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def findavgTime(processes, n, bt, at):
8787
resultArray.append(resultTasks)
8888
print("Average waiting time = %.5f " % (total_wt / n))
8989
print("Average turn around time = ", total_tat / n)
90+
print("\n-------------------------------------------------\n")
9091
return resultArray
9192

9293

SchedulingSimulator/Main/static/js/bar-graph-controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ var colors = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6',
1111
];
1212

1313
function createGraph(canvasID, title, schedulingArray, inputArray) {
14+
if(schedulingArray.length == 0 ){
15+
return;
16+
}
1417
var labels = [];
1518
var data = generateGraph(schedulingArray);
1619
var dataSet = [];

0 commit comments

Comments
 (0)