Merge branch 'master' of tea.maggioni.xyz:maggicl/bachelorThesis

This commit is contained in:
Claudio Maggioni 2021-04-18 19:58:36 +00:00
commit 13cb302119
7 changed files with 839 additions and 14 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:

322
figure_7/figure_7.ipynb Normal file

File diff suppressed because one or more lines are too long

View File

@ -99,7 +99,7 @@ def increment_reserv_bucket(bucket, taskid, value):
idx = 40 if value >= 1 else (int(value * 40) + 1)
if taskid not in bucket:
bucket[taskid] = [0] * (len(ceils) + 1)
bucket[taskid] = [0] * 41
bucket[taskid][idx] += 1
def bucket_sum_per_termination(bucket, last_term_by_id):
@ -119,7 +119,6 @@ def for_each_joined(x):
ts = sorted(ts, key=lambda x: x.time)
last_req_by_id = {} # map taskid -> last known req [cpu, ram] (data removed when task terminates)
reserv_ceils = [0]
cpu_reservs_by_id = {}
ram_reservs_by_id = {}

510
figure_8/figure_8.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.