Correction path module

Mesure-preliminaire
leo 3 years ago
parent 8ed7dd7eea
commit 30872f20ab

@ -16,7 +16,7 @@ from coapthon.messages.request import Request
from coapthon.messages.response import Response from coapthon.messages.response import Response
from coapthon.serializer import Serializer from coapthon.serializer import Serializer
from coapthon.client.superviseur_local import SuperviseurLocalPlaceHolder from coapthon.client.superviseur import SuperviseurLocalPlaceHolder
__author__ = 'Giacomo Tanganelli' __author__ = 'Giacomo Tanganelli'

@ -4,11 +4,11 @@ import time
import threading import threading
from coapthon.client.helperclient import HelperClient from coapthon.client.helperclient import HelperClient
from coapthon.client.superviseur_local import SuperviseurLocal, SuperviseurLocalFiltre from coapthon.client.superviseur import SuperviseurLocal, SuperviseurLocalFiltre
from coapthon.utils import parse_uri from coapthon.utils import parse_uri
N_rep = 100 N_rep = 5000
N_client = 25 N_client = 5
host, port, path = parse_uri("coap://localhost:5683/basic") host, port, path = parse_uri("coap://localhost:5683/basic")
try: try:
@ -48,4 +48,4 @@ fig.tight_layout()
fig.savefig('demo.png') fig.savefig('demo.png')
for super in supers: for super in supers:
print(super.min_RTT, super.avg_RTT, super.tau_retransmission, super._n_tokken) print(super.min_RTT, super.avg_RTT, super.tau_retransmission, super._n_envoie, super._n_tokken)

@ -1,10 +1,9 @@
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import socket import socket
import time import time
from coapthon.client import superviseur_local
from coapthon.client.helperclient import HelperClient from coapthon.client.helperclient import HelperClient
from coapthon.client.superviseur_local import SuperviseurLocal, SuperviseurLocalFiltre from coapthon.client.superviseur import SuperviseurLocal, SuperviseurLocalFiltre
from coapthon.utils import parse_uri from coapthon.utils import parse_uri
@ -23,13 +22,13 @@ super = client.protocol.superviseur
rtt_l = [] rtt_l = []
rtt_s = [] rtt_s = []
N_rep = 10000 N_rep = 100
for n_rep in range(N_rep): for n_rep in range(N_rep):
# print('rep{}'.format(n_rep)) # print('rep{}'.format(n_rep))
response = client.get(path) response = client.get(path)
rtt_l.append(super.RTT_L) rtt_l.append(super._RTT_L)
rtt_s.append(super.RTT_S) rtt_s.append(super._RTT_S)
# time.sleep(1) # time.sleep(1)
# print("{} : \n{}".format(n_rep, response.pretty_print())) # print("{} : \n{}".format(n_rep, response.pretty_print()))
client.stop() client.stop()

Loading…
Cancel
Save