ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
Afc           @   s]   d  d l  Z  d  d l Z d  d l Td
 Z d Z d   Z d   Z d   Z d	   Z e   d S(   iN(   t   *iP  i*   i   c           C   sd   t  t j  d k  r t   n  t j d d k r< t   n$ t j d d k rY t   n t   d  S(   Ni   i   s   -ss   -c(   t   lent   syst   argvt   usaget   servert   client(    (    (    s/   /usr/lib64/python2.7/Demo/sockets/throughput.pyt   main   s    


c           C   s'   t  j t  _ d GHd GHt  j d  d  S(   Ns*   Usage:    (on host_A) throughput -s [port]s7   and then: (on host_B) throughput -c count host_A [port]i   (   R   t   stderrt   stdoutt   exit(    (    (    s/   /usr/lib64/python2.7/Demo/sockets/throughput.pyR   "   s    c          C   s   t  t j  d k r+ t t j d  }  n t }  t t t  } | j d |  f  | j	 d  d GHxg | j
   \ } \ } } x  | j t  } | s Pn  ~ q W| j d  | j   d G| Gd G| GHqh Wd  S(   Ni   t    i   s   Server ready...s   OK
s	   Done witht   port(   R   R   R   t   evalt   MY_PORTt   sockett   AF_INETt   SOCK_STREAMt   bindt   listent   acceptt   recvt   BUFSIZEt   sendt   close(   R   t   st   connt   hostt
   remoteportt   data(    (    s/   /usr/lib64/python2.7/Demo/sockets/throughput.pyR   )   s"    
c          C   s  t  t j  d k  r t   n  t t t j d   }  t j d } t  t j  d k rp t t j d  } n t } d t d d } t j   } t	 t
 t  } t j   } | j | | f  t j   } d } x' | |  k  r | d } | j |  q W| j d  t j   }	 | j t  }
 t j   } |
 GHd G| G| G| G|	 G| GHd	 G| | G| | G|	 | G| |	 GHd
 G| | GHd Gt t |  d | | d  Gd GHd  S(   Ni   i   i   t   xi   s   
i    s   Raw timers:s
   Intervals:s   Total:s   Throughput:gMbP?s   K/sec.(   R   R   R   R   t   intR   R   R   t   timeR   R   R   t   connectR   t   shutdownR   t   round(   t   countR   R   t   testdatat   t1R   t   t2t   t3t   it   t4R   t   t5(    (    s/   /usr/lib64/python2.7/Demo/sockets/throughput.pyR   >   s6    

%!iz  (	   R   R    R   R   R   R   R   R   R   (    (    (    s/   /usr/lib64/python2.7/Demo/sockets/throughput.pyt   <module>   s   
				