o
    $i                     @   sF   d Z ddlZddlZddlZddlmZ dd Zedkr!e  dS dS )z.This is the script for `ray clusterbenchmark`.    N)Clusterc                  C   s   t dddddd} | jdddd g }tdd	D ]}ttjd
d}|| qtj	dddd }t
|	|\}}tdt|ddt|d t  |   d S )NTl           )object_store_memorynum_cpus)initialize_headconnecthead_node_args   )r   num_gpusr   r   
   i   i   )r
   c                 S   sT   g }| D ]}t   }t| t   }|||  t d qt|t|fS )Nr	   )timeraygetappendsleepnpmeanstd)object_ref_listdiffs
object_refbeforeafter r   Z/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/ray/_private/ray_cluster_perf.pyf   s   
zmain.<locals>.fz(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_stdr   r   r   main   s.   


r*   __main__)	__doc__r   numpyr   r   ray.cluster_utilsr   r*   __name__r   r   r   r   <module>   s    '
