MCPcopy Create free account
hub / github.com/eth-easl/dirigent / getResult

Function getResult

scripts/plotting/common.py:49–144  ·  view source on GitHub ↗
(load, rootPath)

Source from the content-addressed store, hash-verified

47
48
49def getResult(load, rootPath):
50 result = []
51 groupedResults = []
52
53 for l in load:
54 cpTrace, proxyTrace = getTraces(l, rootPath)
55
56 # filter first 10 minutes
57 minimalTimestamp = proxyTrace['time'].min() # nanoseconds
58 #minimalTimestamp += 60 * 10e9 # 10 minutes
59
60 # proxyTrace = proxyTrace[proxyTrace['time'] >= minimalTimestamp]
61
62 print(f"Number of sandboxes created over time: {proxyTrace['container_id'].nunique()}")
63
64 data = pd.merge(proxyTrace, cpTrace, on=['container_id', 'service_name'], how='inner')
65 data = data[data['success'] == True] # keep only successful invocations
66 data = data[data['image_fetch'] < 1_000]
67
68 data = data.drop(columns=['time_x', 'time_y', 'success', 'service_name', 'container_id'])
69
70 data['control_plane_other'] = data['cold_start'] - \
71 (data['image_fetch'] + data['sandbox_create'] + data['sandbox_start'] +
72 data['network_setup'] + data['iptables'] + data['readiness_probe'] +
73 data['snapshot_creation'] + data['configure_monitoring'] +
74 data['find_snapshot'] + data['other_worker_node'])
75
76 # make control plane overhead for non-cold starts be zero
77 data.loc[data['cold_start'] == 0, "control_plane_other"] = 0
78 data = data[data['control_plane_other'] >= 0]
79
80 # drop column that was broken down
81 data = data.drop(columns=['cold_start'])
82
83 p50 = data.quantile(0.50)
84 p95 = data.quantile(0.95)
85 p99 = data.quantile(0.99)
86
87 dataToPlot = processQuantile(p50, 0.5)
88 #dataToPlot = pd.concat([dataToPlot, processQuantile(p95, 0.95)])
89 #dataToPlot = pd.concat([dataToPlot, processQuantile(p99, 0.99)])
90 dataToPlot = dataToPlot / 1000 # μs -> ms
91
92 # drop queueing and user code execution
93 dataToPlot = dataToPlot.drop(columns=['proxying'])
94
95 cm = dataToPlot['data_plane_propagation'] + \
96 dataToPlot['control_plane_other'] + \
97 dataToPlot['get_metadata'] + \
98 dataToPlot['add_deployment'] + \
99 dataToPlot['load_balancing'] + \
100 dataToPlot['cc_throttling'] + \
101 dataToPlot['other']
102
103 worker_node = dataToPlot['sandbox_create'] + \
104 dataToPlot['sandbox_start'] + \
105 dataToPlot['network_setup'] + \
106 dataToPlot['iptables'] + \

Callers 4

plot.pyFile · 0.85

Calls 2

getTracesFunction · 0.85
processQuantileFunction · 0.85

Tested by

no test coverage detected