From 250d5802b24ff68d47239fcff4d9c72e92694899 Mon Sep 17 00:00:00 2001 From: alrevuelta Date: Fri, 23 Feb 2024 10:43:48 +0100 Subject: [PATCH] Add multihost simulations lines to plots --- rln-delay-simulations/paper_distribution.svg | 4300 ++++++++--------- .../plot_paper_distribution.py | 35 +- 2 files changed, 2172 insertions(+), 2163 deletions(-) diff --git a/rln-delay-simulations/paper_distribution.svg b/rln-delay-simulations/paper_distribution.svg index 702cad4..2d32892 100644 --- a/rln-delay-simulations/paper_distribution.svg +++ b/rln-delay-simulations/paper_distribution.svg @@ -6,7 +6,7 @@ - 2024-02-15T15:05:41.152307 + 2024-02-23T10:41:02.483282 image/svg+xml @@ -30,438 +30,438 @@ z - - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - +" clip-path="url(#p1e9f972302)"/> - - + - - + - + - + - + - + - + - + - + - - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -723,27 +723,27 @@ L 0 1.5 - - + - - + - + @@ -751,17 +751,17 @@ L -3 0 - + - + - + - + - + - + @@ -817,100 +817,100 @@ z - - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - +" clip-path="url(#p0a44b85cf9)"/> - + - + - + - + - + @@ -2009,870 +2000,19 @@ z - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + @@ -3103,19 +3021,19 @@ z - + - + - + - + - + @@ -3123,634 +3041,633 @@ z - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - +" clip-path="url(#p9e29e011ae)"/> - - + + - + - + - + - + @@ -3758,20 +3675,20 @@ z - - + + - + - + - + - + @@ -3779,129 +3696,192 @@ z - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + - + @@ -3918,37 +3898,37 @@ z - + - + - + - + - + - + - + - + - + - + - + - + @@ -3956,19 +3936,19 @@ z - + - + - + - + - + - + @@ -3977,203 +3957,217 @@ z - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + diff --git a/rln-delay-simulations/plot_paper_distribution.py b/rln-delay-simulations/plot_paper_distribution.py index ea45e48..8cbe9bd 100644 --- a/rln-delay-simulations/plot_paper_distribution.py +++ b/rln-delay-simulations/plot_paper_distribution.py @@ -11,11 +11,15 @@ latencies = pd.DataFrame({ "500kb": load("raw/paper_latency_500kb_v2.txt", "arrival_diff=")}) num_bins = 50 -#fig, ax = plt.subplots(2, 2) - - - +# Best (1 hop) and worst (4 hops) latencies in ms +# See Table 2 from paper +multi_host_simulations = { + "2kb": [364, 709], + "25kb": [436, 1084], + "100kb": [471, 1922], + "500kb": [564, 2988] +} with plt.style.context(['science', 'ieee']): fig, ax = plt.subplots(2, 2) @@ -27,15 +31,26 @@ with plt.style.context(['science', 'ieee']): ] for (size, pos) in possitions: + # Plot single host results 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') + # Plot multi host results + pos.axvline(x=multi_host_simulations[size][0], color='red', linestyle='--') + pos.axvline(x=multi_host_simulations[size][1], color='red', linestyle='--') + + pos.grid(False) + title = ('size={size}\n' + r'$\mu$={mean:.0f} $p_{{95}}$={p95:.0f} min={min:.0f} max={max:.0f}').format( + size=size, + mean=latencies[size].mean(axis=0), + p95=np.percentile(latencies[size], 95), + min=latencies[size].min(), + max=latencies[size].max()) + pos.set_title(title, fontsize=8) + + ax[0][0].set(ylabel='Amount messages') + ax[1][0].set(xlabel='Latency (ms)', ylabel='Amount messages') ax[1][1].set(xlabel='Latency (ms)') +plt.tight_layout(pad=0, w_pad=0.1, h_pad=0.1) fig.set_size_inches(4, 3) fig.savefig('paper_distribution.svg', dpi=600) \ No newline at end of file