Notebook for figure 7

This commit is contained in:
Claudio Maggioni (maggicl) 2021-04-17 11:37:58 +02:00
parent 7cd3915dd0
commit 3fea98866d
5 changed files with 300 additions and 12 deletions

View file

@ -1,6 +0,0 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}

View file

@ -80,13 +80,13 @@ def sumid(sr):
def for_each_task(ts):
global non
ts = sorted(ts, key=lambda x: x["time"])
in_exec = False
exec_start = None
exec_tot = 0
priority = 0
priority = -1
l = len(ts)
last_term = -1
@ -101,10 +101,10 @@ def for_each_task(ts):
if (not in_exec) and (t["type"] == 3):
exec_start = t["time"]
in_exec = True
return sumrow(last_term, priority, exec_tot, l)
def cleanup(x):
return {
"time": int(x.time),
@ -132,6 +132,6 @@ df2 = df.rdd \
.mapValues(sum_rows) \
.map(lambda x: str(x[0][0]) + "," + str(x[0][1]) + "," + str(x[0][2]) + "," + str(x[1])) \
.coalesce(1) \
.saveAsTextFile(cluster + "_priority_exectime")
.saveAsTextFile(cluster + "_priority_exectime_correct")
# vim: set ts=4 sw=4 et tw=80:

294
figure_7/figure_7.ipynb Normal file

File diff suppressed because one or more lines are too long

View file

@ -420,7 +420,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
"version": "3.9.3"
}
},
"nbformat": 4,

Binary file not shown.