
    &`i                     X    d Z ddlZddlZddlZddlmZ d Zedk    r e             dS dS )z.This is the script for `ray clusterbenchmark`.    N)Clusterc            	      R   t          ddddd          } |                     ddd           g }t          dd	          D ]I}t          j        t
          j                            d
d                    }|                    |           Jt          j	        d          d             }t          j
        |	                    |                    \  }}t          dt          |d          dt          |d                     t          j                     |                                  d S )NTl           )object_store_memorynum_cpus)initialize_headconnecthead_node_args   )r   num_gpusr   r   
   i   i   )r   c                 ,   g }| D ]h}t          j                     }t          j        |           t          j                     }|                    ||z
             t          j        d           it          j        |          t          j        |          fS )Nr   )timeraygetappendsleepnpmeanstd)object_ref_listdiffs
object_refbeforeafters        q/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/_private/ray_cluster_perf.pyfzmain.<locals>.f   s|    ) 	 	JY[[FGJIKKELL(((JqMMMMwu~~rve}},,    z(latency to get an 1G object over network   z+-)r   add_noderanger   putr   randomrandr   remoter   printroundshutdown)clusterr   ir   r   	time_difftime_diff_stds          r   mainr-      sB   /FTVWW  G
 3a"     O1b\\ + +WRY^^J==>>
z****Z- - -  #wqxx'@'@AAI}	2imQ	   LNNNr   __main__)	__doc__r   numpyr   r   ray.cluster_utilsr   r-   __name__ r   r   <module>r4      so    4 4      



 % % % % % %$ $ $N zDFFFFF r   