Latency distribution plots + raw for paper (#86)

This commit is contained in:
Alvaro Revuelta 2024-02-15 15:09:38 +01:00 committed by GitHub
parent e411aefe17
commit 870d8890fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 44185 additions and 4 deletions

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -0,0 +1,41 @@
import matplotlib.pyplot as plt
import scienceplots
import numpy as np
import pandas as pd
from analyze import load
latencies = pd.DataFrame({
"2kb": load("raw/paper_latency_2kb_v2.txt", "arrival_diff="),
"25kb": load("raw/paper_latency_25kb_v2.txt", "arrival_diff="),
"100kb": load("raw/paper_latency_100kb_v2.txt", "arrival_diff="),
"500kb": load("raw/paper_latency_500kb_v2.txt", "arrival_diff=")})
num_bins = 50
#fig, ax = plt.subplots(2, 2)
with plt.style.context(['science', 'ieee']):
fig, ax = plt.subplots(2, 2)
possitions = [
("2kb", ax[0][0]),
("25kb", ax[0][1]),
("100kb", ax[1][0]),
("500kb", ax[1][1])
]
for (size, pos) in possitions:
latencies.hist(size, bins=num_bins, ax=pos)
pos.grid(False)
text = r'$ \mu=$' + '{:.0f};'.format(latencies[size].mean(axis=0)) + r' $ p_{95}=$' + '{:.0f};'.format(
np.percentile(latencies[size], 95)) + ' max={:.0f}'.format(latencies[size].max())
pos.set_title(f"msgsize={size}; " + text, fontsize=6)
ax[0][0].set(ylabel='Amount samples')
ax[1][0].set(xlabel='Latency (ms)', ylabel='Amount samples')
ax[1][1].set(xlabel='Latency (ms)')
fig.set_size_inches(4, 3)
fig.savefig('paper_distribution.svg', dpi=600)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -14,13 +14,13 @@ network:
graph [
node [
id 0
host_bandwidth_up "38 Mbit"
host_bandwidth_down "83 Mbit"
host_bandwidth_up "100 Mbit"
host_bandwidth_down "100 Mbit"
]
edge [
source 0
target 0
latency "100 ms"
latency "150 ms"
packet_loss 0.0
]
]
@ -39,8 +39,9 @@ hosts:
--rln-relay-dynamic=false
--rln-relay-membership-index=0
--nat=extip:0.0.0.0
--max-msg-size=600KB
start_time: 5s
environment: {"PEERS": "1000", "CONNECTTO": "50", "NUMPUBLISHERS": "1", "MSGSIZEKBYTES": "10"}
environment: {"PEERS": "1000", "CONNECTTO": "25", "NUMPUBLISHERS": "1", "MSGSIZEKBYTES": "10"}
peer2: *client_host
peer3: *client_host
peer4: *client_host