ok
Mini Shell
�
Afc@s]ddlZddlZddlTd
ZdZd�Zd�Zd�Zd �Ze�dS(i����N(t*iP�i*icCsdttj�dkrt�ntjddkr<t�n$tjddkrYt�nt�dS(Niis-ss-c(tlentsystargvtusagetservertclient(((s//usr/lib64/python2.7/Demo/sockets/throughput.pytmains
cCs'tjt_dGHdGHtjd�dS(Ns*Usage: (on host_A) throughput -s [port]s7and then: (on host_B) throughput -c count host_A [port]i(Rtstderrtstdouttexit(((s//usr/lib64/python2.7/Demo/sockets/throughput.pyR"scCs�ttj�dkr+ttjd�}nt}ttt�}|jd|f�|j d�dGHxg|j
�\}\}}x |jt�}|s�Pn~q�W|j
d�|j�dG|GdG|GHqhWdS(NitisServer ready...sOK
s Done withtport(RRRtevaltMY_PORTtsockettAF_INETtSOCK_STREAMtbindtlistentaccepttrecvtBUFSIZEtsendtclose(Rtstconnthostt
remoteporttdata((s//usr/lib64/python2.7/Demo/sockets/throughput.pyR)s"
cCs�ttj�dkrt�ntttjd��}tjd}ttj�dkrpttjd�}nt}dtdd}tj�}t t
t�}tj�}|j||f�tj�}d}x'||kr�|d}|j
|�q�W|jd�tj�} |jt�}
tj�}|
GHdG|G|G|G| G|GHd G||G||G| |G|| GHd
G||GHdGtt|d||d�Gd
GHdS(Niiitxis
isRaw timers:s
Intervals:sTotal:sThroughput:g����MbP?sK/sec.(RRRRtintR
RRttimeRRRtconnectRtshutdownRtround(tcountRRttestdatatt1Rtt2tt3titt4Rtt5((s//usr/lib64/python2.7/Demo/sockets/throughput.pyR>s6
%
!iz�( RR RRRRRRR(((s//usr/lib64/python2.7/Demo/sockets/throughput.pyt<module>s
Zerion Mini Shell 1.0