mirror of
https://github.com/logos-messaging/research.git
synced 2026-01-02 14:13:07 +00:00
Latency distribution plots + raw for paper (#86)
This commit is contained in:
parent
e411aefe17
commit
870d8890fd
4179
rln-delay-simulations/paper_distribution.svg
Normal file
4179
rln-delay-simulations/paper_distribution.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 116 KiB |
41
rln-delay-simulations/plot_paper_distribution.py
Normal file
41
rln-delay-simulations/plot_paper_distribution.py
Normal 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)
|
||||
9990
rln-delay-simulations/raw/paper_latency_100kb_v2.txt
Normal file
9990
rln-delay-simulations/raw/paper_latency_100kb_v2.txt
Normal file
File diff suppressed because it is too large
Load Diff
9990
rln-delay-simulations/raw/paper_latency_25kb_v2.txt
Normal file
9990
rln-delay-simulations/raw/paper_latency_25kb_v2.txt
Normal file
File diff suppressed because it is too large
Load Diff
9990
rln-delay-simulations/raw/paper_latency_2kb_v2.txt
Normal file
9990
rln-delay-simulations/raw/paper_latency_2kb_v2.txt
Normal file
File diff suppressed because it is too large
Load Diff
9990
rln-delay-simulations/raw/paper_latency_500kb_v2.txt
Normal file
9990
rln-delay-simulations/raw/paper_latency_500kb_v2.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user