%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/thread-self/root/lib64/python2.7/Demo/sockets/
Upload File :
Create Path :
Current File : //proc/thread-self/root/lib64/python2.7/Demo/sockets/throughput.pyc

�
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"scCs�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(Rtstconnthostt
remoteporttdata((s//usr/lib64/python2.7/Demo/sockets/throughput.pyR)s"


cCs�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(tcountRRttestdatatt1Rtt2tt3titt4Rtt5((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