Skip to content

Commit

Permalink
bouncer values is still incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
gckopper committed Apr 1, 2024
1 parent 9634537 commit 646c219
Show file tree
Hide file tree
Showing 8 changed files with 106,177 additions and 75,821 deletions.
16 changes: 12 additions & 4 deletions graphs/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@

rans = ["OAI", "srsRAN"]

cores = [
"OAI CN",
"Open5Gs",
"Free5Gc",
]

def conv(x):
return float(x[:-1])

Expand All @@ -50,15 +56,17 @@ def readfile(file: str, skip: int):
colors = ["#7EA16B", "#C3D898"]
fig, axes = plt.subplots(1, 3, layout='constrained')

for tests, offsets, ax in zip(files, skip, axes):
for tests, offsets, ax, core in zip(files, skip, axes, cores):
ax.set_ylim(0, 12)
for ran, color, test, offset in zip(rans, colors, tests, offsets):
data = readfile(test, offset)
rects = ax.plot(x, data, label=ran, color=color)
ax.set_xlabel(core, fontsize=12)

# Add some text for labels, title and custom x-axis tick labels, etc.
axes[0].set_ylabel('Consumo de CPU (%)', fontsize=14)
axes[len(axes)//2].set_xlabel("Tempo (s)", fontsize=14)
ax.legend(loc='upper right', ncols=2, fontsize=12)
fig.supylabel('Consumo de CPU (%)', fontsize=14)
#axes[len(axes)//2].set_xlabel("Tempo (s)", fontsize=14)
axes[-1].legend(loc='upper right', ncols=2, fontsize=12)
fig.supxlabel("Tempo (s)", fontsize=14)

plt.show()
66 changes: 66 additions & 0 deletions graphs/ram-errorbar-core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from itertools import cycle
from matplotlib.patches import Polygon


mpl.use('QtAgg')
files = [
"../logs/oai/oai/iperf/Memory Basic-data-as-joinbyfield-2024-03-05 15 53 24.csv", # core
"../logs/srsran/oai/iperf/core/Memory Basic-data-as-joinbyfield-2024-03-04 17 44 59.csv", # core
"../logs/oai/open5gs/iperf/Memory Basic-data-as-joinbyfield-2024-03-05 16 21 22.csv", # core
"../logs/srsran/open5gs/iperf/Memory Basic-data-as-joinbyfield-2024-03-20 17 22 53.csv", # core
"../logs/oai/free5gc/iperf/Memory Basic-data-as-joinbyfield-2024-03-04 18 44 19.csv", # core
"../logs/srsran/free5gc/iperf/Memory Basic-data-as-joinbyfield-2024-03-04 18 13 53.csv", # core
]
# how many samples to skip until the start of the experiment
skips = [
14,
9,
16,
16,
18,
16,
]
labels = [
"OAI CN",
"Open5Gs",
"Free5Gc",
]

rans = [
"OAI",
"srsRAN",
"_OAI",
"_srsRAN",
"_OAI",
"_srsRAN",
]

def conv(x):
return float(x[:-4])

def readfile(file: str, skip: int):
data = np.genfromtxt(file, delimiter=",", skip_header=skip, max_rows=40, usecols=[2], converters={2: conv})
return data


colors = ["#7EA16B", "#C3D898"]
fig, ax = plt.subplots(layout='constrained')

xaxis = np.arange(len(files))
for file, skip, x, color, ran in zip(files, skips, xaxis, cycle(colors), rans):
data = readfile(file, skip)
median = np.median(data)
stddev = np.std(data)
ax.errorbar(x, median, yerr=stddev, label=ran, color=color, capsize=3.0, linewidth=4.2, capthick=4.2)

# Add some text for labels, title and custom x-axis tick labels, etc.
ax.set_ylabel('Comsumo de memória no núcleo (GB)', fontsize=14)
x = np.arange(len(labels))*2 + 0.5
ax.set_xticks(x, labels, fontsize=12)
ax.set_ylim(1.1, 1.4)
ax.legend(loc='upper right', ncols=2, fontsize=12)

plt.show()
4 changes: 2 additions & 2 deletions graphs/retransmissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
rans = ["OAI", "srsRAN"]

def conv(x):
return x['end']['sum_sent']['retransmits']
return (x['end']['sum_sent']['retransmits'] * 1358) / x['end']['sum_sent']['bytes']

def readfile(file):
with open(file, "r") as file:
Expand All @@ -46,7 +46,7 @@ def readfile(file):
# Add some text for labels, title and custom x-axis tick labels, etc.
ax.set_ylabel('Número de pacotes retransmitidos', fontsize=14)
ax.set_xticks(x + width/2, labels, fontsize=12)
ax.set_ylim(0, 3500)
ax.set_ylim(0, 0.001)
ax.legend(loc='upper right', ncols=2, fontsize=12)

plt.show()
4 changes: 2 additions & 2 deletions graphs/ric.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

mpl.use('QtAgg')
files = [
"../logs/fake-oai-flexric.logs",
"../logs/oai-flexric-values-only.log",
"../logs/srsran-flexric.logs",
"../logs/bouncer-values-only.log",
"../logs/fake-oai-flexric.logs",
]
labels = [
"Flexric",
Expand Down
100 changes: 0 additions & 100 deletions logs/bouncer-values-only.log

This file was deleted.

Loading

0 comments on commit 646c219

Please sign in to comment.