<jupyter_start><jupyter_text>DHT Tests This Notebook is used to provide a reproduceable test environment*open this file with Jupyter-Lab  Setup<jupyter_code>import subprocess

import numpy as np
import pandas as pd 
import matplotlib.pyplot as plt
import seaborn as sns

%matplotlib inline
%reload_ext autoreload
%autoreload 2<jupyter_output><empty_output><jupyter_text>Peer to Peer tests *We use tmux to access and monitor the individual test progress*  Localhost The output CSV files are at /results.  Batch Put *Make sure to '''chmod u+rx bc_p2p''' and all scipts*<jupyter_code>import subprocess

hosts = 1
maxpeers = 10
runs = 10
network = "localhost"

#init
peers = 1 

while peers <= maxpeers :
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    subprocess.call(["sh", "xstarttmux.sh", str(peers)])
    
    subprocess.call(["./batchPUT.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_put_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_put_" + network + ".csv")
    
    peers = peers +1<jupyter_output><empty_output><jupyter_text>Batch Get<jupyter_code>import subprocess

hosts = 1
maxpeers = 10
runs = 10
network = "localhost"

#init
peers = 1 

while peers <= maxpeers :
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    subprocess.call(["sh", "xstarttmux.sh", str(peers)])
    
    subprocess.call(["./batchGET.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_get_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_get_" + network + ".csv")
    
    peers = peers +1<jupyter_output><empty_output><jupyter_text>1 Ethernet Host  Batch Put<jupyter_code># import subprocess
import paramiko
import time

hosts = 1
maxpeers = 10
runs = 10
network = "ethernet"

#init
peers = 1 
ssh = paramiko.SSHClient()

while peers <= maxpeers :
    # Devide peers
    
    # Start network host peers
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
    ssh.connect("192.168.2.140", username="vldb", password="<PASSWORD>")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("mv /home/vldb/GIT/bc_p2p/evaluation/bc_p2p .")
    time.sleep(1)
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("sh /home/vldb/GIT/bc_p2p/evaluation/xstarttmux.sh "+ str(peers))
    
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    time.sleep(1)

    # Start batch
    subprocess.call(["./batchPUT.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_put_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_put_" + network + ".csv")
    
    peers = peers +1
    
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
subprocess.call(["tmux", "kill-server"])<jupyter_output><empty_output><jupyter_text>Batch GET<jupyter_code># import subprocess
import paramiko
import time

hosts = 1
maxpeers = 10
runs = 10
network = "ethernet"

#init
peers = 1 
ssh = paramiko.SSHClient()

while peers <= maxpeers :
    # Devide peers
    
    # Start network host peers
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
    ssh.connect("192.168.2.140", username="vldb", password="<PASSWORD>")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("mv /home/vldb/GIT/bc_p2p/evaluation/bc_p2p .")
    time.sleep(1)
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("sh /home/vldb/GIT/bc_p2p/evaluation/xstarttmux.sh "+ str(peers))
    
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    time.sleep(1)

    # Start batch
    subprocess.call(["./batchGET.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_get_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_get_" + network + ".csv")
    
    peers = peers +1
    
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
subprocess.call(["tmux", "kill-server"])<jupyter_output><empty_output><jupyter_text>1 Wifi Host   Batch PUT<jupyter_code>import subprocess
import paramiko
import time

hosts = 1
maxpeers = 10
runs = 10
network = "wifi"

#init
peers = 1 
ssh = paramiko.SSHClient()

while peers <= maxpeers :
    # Devide peers
    
    # Start network host peers
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
    ssh.connect("192.168.2.126", username="vldb", password="<PASSWORD>")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("mv /home/vldb/GIT/bc_p2p/evaluation/bc_p2p .")
    time.sleep(1)
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("sh /home/vldb/GIT/bc_p2p/evaluation/xstarttmux.sh "+ str(peers))
    
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    time.sleep(1)

    # Start batch
    subprocess.call(["./batchPUT.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_put_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_put_" + network + ".csv")
    
    peers = peers +1
    
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
subprocess.call(["tmux", "kill-server"])<jupyter_output><empty_output><jupyter_text>Batch GET<jupyter_code># import subprocess
import paramiko
import time

hosts = 1
maxpeers = 10
runs = 10
network = "wifi"

#init
peers = 1 
ssh = paramiko.SSHClient()

while peers <= maxpeers :
    # Devide peers
    
    # Start network host peers
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
    ssh.connect("192.168.2.126", username="vldb", password="<PASSWORD>")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("mv /home/vldb/GIT/bc_p2p/evaluation/bc_p2p .")
    time.sleep(1)
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("sh /home/vldb/GIT/bc_p2p/evaluation/xstarttmux.sh "+ str(peers))
    
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    time.sleep(1)

    # Start batch
    subprocess.call(["./batchGET.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_get_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_get_" + network + ".csv")
    
    peers = peers +1
    
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
subprocess.call(["tmux", "kill-server"])<jupyter_output><empty_output><jupyter_text>1 Localhost + 1 Ethernet Host  Batch Put<jupyter_code>import subprocess
import paramiko
import time

hosts = 2
maxpeers = 10
runs = 10
network = "localhost"

#init
peers = 1 
ssh = paramiko.SSHClient()

while peers <= maxpeers :
    # Devide peers
    net_host_peers = int(math.ceil(peers/hosts))
    local_host_peers = int(math.floor(peers/hosts))
    
    # Start network host peers
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
    ssh.connect("192.168.2.140", username="vldb", password="<PASSWORD>")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("mv /home/vldb/GIT/bc_p2p/evaluation/bc_p2p .")
    time.sleep(1)
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("sh /home/vldb/GIT/bc_p2p/evaluation/xstarttmux.sh "+ str(net_host_peers))
    
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    time.sleep(1)
    subprocess.call(["sh", "xstarttmux.sh", str(local_host_peers)])

    # Start batch
    subprocess.call(["./batchPUT.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_put_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_put_" + network + ".csv")
    
    peers = peers +1
    
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
subprocess.call(["tmux", "kill-server"])<jupyter_output><empty_output><jupyter_text>Batch Get<jupyter_code>import subprocess
import paramiko
import time
import math

hosts = 2
maxpeers = 10
runs = 10
network = "localhost_ethernet"

#init
peers = 1 
ssh = paramiko.SSHClient()

while peers <= maxpeers :
    # Devide peers
    net_host_peers = int(math.ceil(peers/hosts))
    local_host_peers = int(math.floor(peers/hosts))
    
    # Start network host peers
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 
    ssh.connect("192.168.2.140", username="vldb", password="<PASSWORD>")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("mv /home/vldb/GIT/bc_p2p/evaluation/bc_p2p .")
    time.sleep(1)
    ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("sh /home/vldb/GIT/bc_p2p/evaluation/xstarttmux.sh "+ str(net_host_peers))
    
    # Start localhost peers
    subprocess.call(["tmux", "kill-server"])
    time.sleep(1)
    subprocess.call(["sh", "xstarttmux.sh", str(local_host_peers)])

    # Start batch
    subprocess.call(["./batchGET.sh", str(hosts), str(peers), str(runs), network])
    
    df = pd.read_csv("results/timings" + str(hosts) +"host" + str(peers) + "peers_batch_get_" + network + ".csv", names=["Seconds","Nanoseconds"])
    # To milliseconds
    df[df.columns[1]] = df[df.columns[1]].apply(lambda x: x/1000000000)
    # Join collumns
    df[df.columns[0]] = df[df.columns[0]] + df[df.columns[1]] 
    del df[df.columns[1]] 
    df.to_csv("results/seconds" + str(hosts) + "host" + str(peers) +"peers_batch_get_" + network + ".csv")
    
    peers = peers +1
    
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("tmux kill-server")
subprocess.call(["tmux", "kill-server"])<jupyter_output><empty_output><jupyter_text>Visualization<jupyter_code>import subprocess

import numpy as np
import pandas as pd 
import matplotlib.pyplot as plt
import seaborn as sns

%matplotlib inline
%reload_ext autoreload
%autoreload 2
# 1 Host Ethernet
# PUT 
p01 = pd.read_csv('results/1Ethernet/PUT/seconds1host1peers_batch_put_ethernet.csv', index_col=[0], names=["1"])
p02 = pd.read_csv('results/1Ethernet/PUT/seconds1host2peers_batch_put_ethernet.csv', index_col=[0], names=["2"])
p03 = pd.read_csv('results/1Ethernet/PUT/seconds1host3peers_batch_put_ethernet.csv', index_col=[0], names=["3"])
p04 = pd.read_csv('results/1Ethernet/PUT/seconds1host4peers_batch_put_ethernet.csv', index_col=[0], names=["4"])
p05 = pd.read_csv('results/1Ethernet/PUT/seconds1host5peers_batch_put_ethernet.csv', index_col=[0], names=["5"])
p06 = pd.read_csv('results/1Ethernet/PUT/seconds1host6peers_batch_put_ethernet.csv', index_col=[0], names=["6"])
p07 = pd.read_csv('results/1Ethernet/PUT/seconds1host7peers_batch_put_ethernet.csv', index_col=[0], names=["7"])
p08 = pd.read_csv('results/1Ethernet/PUT/seconds1host8peers_batch_put_ethernet.csv', index_col=[0], names=["8"])
p09 = pd.read_csv('results/1Ethernet/PUT/seconds1host9peers_batch_put_ethernet.csv', index_col=[0], names=["9"])
p10 = pd.read_csv('results/1Ethernet/PUT/seconds1host10peers_batch_put_ethernet.csv', index_col=[0], names=["10"])


ethernet_put_df = pd.concat([p01, p02, p03, p04, p05, p06, p07, p08, p09, p10], axis=1, join='inner').sort_index()
ethernet_put_df.drop(ethernet_put_df.tail(1).index,inplace=True)
ethernet_put_df.reset_index()
ethernet_put_df = ethernet_put_df.astype(float)


# GET
df01 = pd.read_csv('results/1Ethernet/GET/seconds1host1peers_batch_get_ethernet.csv', index_col=[0], names=["1"])
df02 = pd.read_csv('results/1Ethernet/GET/seconds1host2peers_batch_get_ethernet.csv', index_col=[0], names=["2"])
df03 = pd.read_csv('results/1Ethernet/GET/seconds1host3peers_batch_get_ethernet.csv', index_col=[0], names=["3"])
df04 = pd.read_csv('results/1Ethernet/GET/seconds1host4peers_batch_get_ethernet.csv', index_col=[0], names=["4"])
df05 = pd.read_csv('results/1Ethernet/GET/seconds1host5peers_batch_get_ethernet.csv', index_col=[0], names=["5"])
df06 = pd.read_csv('results/1Ethernet/GET/seconds1host6peers_batch_get_ethernet.csv', index_col=[0], names=["6"])
df07 = pd.read_csv('results/1Ethernet/GET/seconds1host7peers_batch_get_ethernet.csv', index_col=[0], names=["7"])
df08 = pd.read_csv('results/1Ethernet/GET/seconds1host8peers_batch_get_ethernet.csv', index_col=[0], names=["8"])
df09 = pd.read_csv('results/1Ethernet/GET/seconds1host9peers_batch_get_ethernet.csv', index_col=[0], names=["9"])
df10 = pd.read_csv('results/1Ethernet/GET/seconds1host10peers_batch_get_ethernet.csv', index_col=[0], names=["10"])


ethernet_get_df = pd.concat([df01, df02, df03, df04, df05, df06, df07, df08, df09, df10], axis=1, join='inner').sort_index()
ethernet_get_df.drop(ethernet_get_df.tail(1).index,inplace=True)
ethernet_get_df.reset_index()
ethernet_get_df = ethernet_get_df.astype(float)

# PUT
ethernet_put_fig = sns.boxplot(data = ethernet_put_df, palette="coolwarm")
ethernet_put_fig.set(ylabel='Seconds', xlabel='Peers')

fig1 = ethernet_put_fig.get_figure()
fig1.savefig("ethernet_put_fig.png")
# GET
ethernet_get_fig = sns.boxplot(data = ethernet_get_df, palette="coolwarm")
ethernet_get_fig.set(ylabel='Seconds', xlabel='Peers')

fig2 = ethernet_get_fig.get_figure()
fig2.savefig("ethernet_get_fig.png")
# 1 Localhost + Host Ethernet
# PUT 
ple01 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host1peers_batch_put_localhost.csv', index_col=[0], names=["1"])
ple02 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host2peers_batch_put_localhost.csv', index_col=[0], names=["2"])
ple03 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host3peers_batch_put_localhost.csv', index_col=[0], names=["3"])
ple04 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host4peers_batch_put_localhost.csv', index_col=[0], names=["4"])
ple05 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host5peers_batch_put_localhost.csv', index_col=[0], names=["5"])
ple06 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host6peers_batch_put_localhost.csv', index_col=[0], names=["6"])
ple07 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host7peers_batch_put_localhost.csv', index_col=[0], names=["7"])
ple08 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host8peers_batch_put_localhost.csv', index_col=[0], names=["8"])
ple09 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host9peers_batch_put_localhost.csv', index_col=[0], names=["9"])
ple10 = pd.read_csv('results/1Localhost_1Ethernet/PUT/seconds2host10peers_batch_put_localhost.csv', index_col=[0], names=["10"])


local_ethernet_put_df = pd.concat([ple01, ple02, ple03, ple04, ple05, ple06, ple07, ple08, ple09, ple10], axis=1, join='inner').sort_index()
local_ethernet_put_df.drop(local_ethernet_put_df.tail(1).index,inplace=True)
local_ethernet_put_df.reset_index()
local_ethernet_put_df = local_ethernet_put_df.astype(float)


# GET
gle01 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host1peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["1"])
gle02 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host2peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["2"])
gle03 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host3peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["3"])
gle04 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host4peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["4"])
gle05 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host5peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["5"])
gle06 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host6peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["6"])
gle07 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host7peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["7"])
gle08 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host8peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["8"])
gle09 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host9peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["9"])
gle10 = pd.read_csv('results/1Localhost_1Ethernet/GET/seconds2host10peers_batch_get_localhost_ethernet.csv', index_col=[0], names=["10"])


local_ethernet_get_df = pd.concat([gle01, gle02, gle03, gle04, gle05, gle06, gle07, gle08, gle09, gle10], axis=1, join='inner').sort_index()
local_ethernet_get_df.drop(local_ethernet_get_df.tail(1).index,inplace=True)
local_ethernet_get_df.reset_index()
local_ethernet_get_df = local_ethernet_get_df.astype(float)

# PUT
localhost_ethernet_put_fig = sns.boxplot(data = local_ethernet_put_df, palette="coolwarm")
localhost_ethernet_put_fig.set(ylabel='Seconds', xlabel='Peers')

fig3 = localhost_ethernet_put_fig.get_figure()
fig3.savefig("localhost_ethernet_put_fig.png")
# GET
localhost_ethernet_get_fig = sns.boxplot(data = local_ethernet_get_df, palette="coolwarm")
localhost_ethernet_get_fig.set(ylabel='Seconds', xlabel='Peers')

fig4 = localhost_ethernet_get_fig.get_figure()
fig4.savefig("localhost_ethernet_get_fig.png")
# 1  Wifi
# PUT 
pw01 = pd.read_csv('results/1Wifi/PUT/seconds1host1peers_batch_put_wifi.csv', index_col=[0], names=["1"])
pw02 = pd.read_csv('results/1Wifi/PUT/seconds1host2peers_batch_put_wifi.csv', index_col=[0], names=["2"])
pw03 = pd.read_csv('results/1Wifi/PUT/seconds1host3peers_batch_put_wifi.csv', index_col=[0], names=["3"])
pw04 = pd.read_csv('results/1Wifi/PUT/seconds1host4peers_batch_put_wifi.csv', index_col=[0], names=["4"])
pw05 = pd.read_csv('results/1Wifi/PUT/seconds1host5peers_batch_put_wifi.csv', index_col=[0], names=["5"])
pw06 = pd.read_csv('results/1Wifi/PUT/seconds1host6peers_batch_put_wifi.csv', index_col=[0], names=["6"])
pw07 = pd.read_csv('results/1Wifi/PUT/seconds1host7peers_batch_put_wifi.csv', index_col=[0], names=["7"])
pw08 = pd.read_csv('results/1Wifi/PUT/seconds1host8peers_batch_put_wifi.csv', index_col=[0], names=["8"])
pw09 = pd.read_csv('results/1Wifi/PUT/seconds1host9peers_batch_put_wifi.csv', index_col=[0], names=["9"])
pw10 = pd.read_csv('results/1Wifi/PUT/seconds1host10peers_batch_put_wifi.csv', index_col=[0], names=["10"])


wifi_put_df = pd.concat([pw01, pw02, pw03, pw04, pw05, pw06, pw07, pw08, pw09, pw10], axis=1, join='inner').sort_index()
wifi_put_df.drop(wifi_put_df.tail(1).index,inplace=True)
wifi_put_df.reset_index()
wifi_put_df = wifi_put_df.astype(float)


# GET
gw01 = pd.read_csv('results/1Wifi/GET/seconds1host1peers_batch_get_wifi.csv', index_col=[0], names=["1"])
gw02 = pd.read_csv('results/1Wifi/GET/seconds1host2peers_batch_get_wifi.csv', index_col=[0], names=["2"])
gw03 = pd.read_csv('results/1Wifi/GET/seconds1host3peers_batch_get_wifi.csv', index_col=[0], names=["3"])
gw04 = pd.read_csv('results/1Wifi/GET/seconds1host4peers_batch_get_wifi.csv', index_col=[0], names=["4"])
gw05 = pd.read_csv('results/1Wifi/GET/seconds1host5peers_batch_get_wifi.csv', index_col=[0], names=["5"])
gw06 = pd.read_csv('results/1Wifi/GET/seconds1host6peers_batch_get_wifi.csv', index_col=[0], names=["6"])
gw07 = pd.read_csv('results/1Wifi/GET/seconds1host7peers_batch_get_wifi.csv', index_col=[0], names=["7"])
gw08 = pd.read_csv('results/1Wifi/GET/seconds1host8peers_batch_get_wifi.csv', index_col=[0], names=["8"])
gw09 = pd.read_csv('results/1Wifi/GET/seconds1host9peers_batch_get_wifi.csv', index_col=[0], names=["9"])
gw10 = pd.read_csv('results/1Wifi/GET/seconds1host10peers_batch_get_wifi.csv', index_col=[0], names=["10"])


wifi_get_df = pd.concat([gw01, gw02, gw03, gw04, gw05, gw06, gw07, gw08, gw09, gw10], axis=1, join='inner').sort_index()
wifi_get_df.drop(wifi_get_df.tail(1).index,inplace=True)
wifi_get_df.reset_index()
wifi_get_df = wifi_get_df.astype(float)

# PUT
wifi_put_fig = sns.boxplot(data = wifi_put_df, palette="coolwarm")
wifi_put_fig.set(ylabel='Seconds', xlabel='Peers')

fig5 = wifi_put_fig.get_figure()
fig5.savefig("wifi_put_fig.png")
# GET
wifi_get_fig = sns.boxplot(data = wifi_get_df, palette="coolwarm")
wifi_get_fig.set(ylabel='Seconds', xlabel='Peers')

fig6 = wifi_get_fig.get_figure()
fig6.savefig("wifi_get_fig.png")
# 1 Localhost
# PUT 
pl01 = pd.read_csv('results/1Localhost/PUT/seconds1host1peers_batch_put_localhost.csv', index_col=[0], names=["1"])
pl02 = pd.read_csv('results/1Localhost/PUT/seconds1host2peers_batch_put_localhost.csv', index_col=[0], names=["2"])
pl03 = pd.read_csv('results/1Localhost/PUT/seconds1host3peers_batch_put_localhost.csv', index_col=[0], names=["3"])
pl04 = pd.read_csv('results/1Localhost/PUT/seconds1host4peers_batch_put_localhost.csv', index_col=[0], names=["4"])
pl05 = pd.read_csv('results/1Localhost/PUT/seconds1host5peers_batch_put_localhost.csv', index_col=[0], names=["5"])
pl06 = pd.read_csv('results/1Localhost/PUT/seconds1host6peers_batch_put_localhost.csv', index_col=[0], names=["6"])
pl07 = pd.read_csv('results/1Localhost/PUT/seconds1host7peers_batch_put_localhost.csv', index_col=[0], names=["7"])
pl08 = pd.read_csv('results/1Localhost/PUT/seconds1host8peers_batch_put_localhost.csv', index_col=[0], names=["8"])
pl09 = pd.read_csv('results/1Localhost/PUT/seconds1host9peers_batch_put_localhost.csv', index_col=[0], names=["9"])
pl10 = pd.read_csv('results/1Localhost/PUT/seconds1host10peers_batch_put_localhost.csv', index_col=[0], names=["10"])


localhost_put_df = pd.concat([pl01, pl02, pl03, pl04, pl05, pl06, pl07, pl08, pl09, pl10], axis=1, join='inner').sort_index()
localhost_put_df.drop(localhost_put_df.tail(1).index,inplace=True)
localhost_put_df.reset_index()
localhost_put_df = localhost_put_df.astype(float)


# GET
gl01 = pd.read_csv('results/1Localhost/GET/seconds1host1peers_batch_get_localhost.csv', index_col=[0], names=["1"])
gl02 = pd.read_csv('results/1Localhost/GET/seconds1host2peers_batch_get_localhost.csv', index_col=[0], names=["2"])
gl03 = pd.read_csv('results/1Localhost/GET/seconds1host3peers_batch_get_localhost.csv', index_col=[0], names=["3"])
gl04 = pd.read_csv('results/1Localhost/GET/seconds1host4peers_batch_get_localhost.csv', index_col=[0], names=["4"])
gl05 = pd.read_csv('results/1Localhost/GET/seconds1host5peers_batch_get_localhost.csv', index_col=[0], names=["5"])
gl06 = pd.read_csv('results/1Localhost/GET/seconds1host6peers_batch_get_localhost.csv', index_col=[0], names=["6"])
gl07 = pd.read_csv('results/1Localhost/GET/seconds1host7peers_batch_get_localhost.csv', index_col=[0], names=["7"])
gl08 = pd.read_csv('results/1Localhost/GET/seconds1host8peers_batch_get_localhost.csv', index_col=[0], names=["8"])
gl09 = pd.read_csv('results/1Localhost/GET/seconds1host9peers_batch_get_localhost.csv', index_col=[0], names=["9"])
gl10 = pd.read_csv('results/1Localhost/GET/seconds1host10peers_batch_get_localhost.csv', index_col=[0], names=["10"])


localhost_get_df = pd.concat([gl01, gl02, gl03, gl04, gl05, gl06, gl07, gl08, gl09, gl10], axis=1, join='inner').sort_index()
localhost_get_df.drop(localhost_get_df.tail(1).index,inplace=True)
localhost_get_df.reset_index()
localhost_get_df = localhost_get_df.astype(float)

# PUT
localhost_put_fig = sns.boxplot(data = localhost_put_df, palette="coolwarm")
localhost_put_fig.set(ylabel='Seconds', xlabel='Peers')

fig7 = localhost_put_fig.get_figure()
fig7.savefig("localhost_put_fig.png")
# GET
localhost_fig = sns.boxplot(data = localhost_get_df, palette="coolwarm")
localhost_fig.set(ylabel='Seconds', xlabel='Peers')

fig8 = localhost_fig.get_figure()
fig8.savefig("localhost_get_fig.png")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15841891106374734, 'fraction_numerical': 0.04158108893625266, 'mean_word_length': 6.178303198887344, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '231561', 'license': 'Apache-2.0', 'n_tokens_mistral': 10662, 'n_tokens_neox': 10043, 'n_words': 1408, 'path': 'evaluation/dht_tests.ipynb', 'repo_name': 'ag-gipp/bc_p2p', 'size': '25787'}