Correction path module
This commit is contained in:
parent
8ed7dd7eea
commit
30872f20ab
3 changed files with 9 additions and 10 deletions
|
@ -16,7 +16,7 @@ from coapthon.messages.request import Request
|
|||
from coapthon.messages.response import Response
|
||||
from coapthon.serializer import Serializer
|
||||
|
||||
from coapthon.client.superviseur_local import SuperviseurLocalPlaceHolder
|
||||
from coapthon.client.superviseur import SuperviseurLocalPlaceHolder
|
||||
|
||||
__author__ = 'Giacomo Tanganelli'
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ import time
|
|||
import threading
|
||||
|
||||
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
|
||||
|
||||
N_rep = 100
|
||||
N_client = 25
|
||||
N_rep = 5000
|
||||
N_client = 5
|
||||
|
||||
host, port, path = parse_uri("coap://localhost:5683/basic")
|
||||
try:
|
||||
|
@ -48,4 +48,4 @@ fig.tight_layout()
|
|||
fig.savefig('demo.png')
|
||||
|
||||
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 socket
|
||||
import time
|
||||
from coapthon.client import superviseur_local
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
@ -23,13 +22,13 @@ super = client.protocol.superviseur
|
|||
rtt_l = []
|
||||
rtt_s = []
|
||||
|
||||
N_rep = 10000
|
||||
N_rep = 100
|
||||
|
||||
for n_rep in range(N_rep):
|
||||
# print('rep{}'.format(n_rep))
|
||||
response = client.get(path)
|
||||
rtt_l.append(super.RTT_L)
|
||||
rtt_s.append(super.RTT_S)
|
||||
rtt_l.append(super._RTT_L)
|
||||
rtt_s.append(super._RTT_S)
|
||||
# time.sleep(1)
|
||||
# print("{} : \n{}".format(n_rep, response.pretty_print()))
|
||||
client.stop()
|
||||
|
|
Loading…
Reference in a new issue