
    &`i                     p   d dl Z d dlmZ d dlmZmZ d dlmZ  e j        d           e j	        de
dd	
           e j	        de
dd
           e j	        de
dd
           e j	        de
dd
          de
de
de
defd                                                            Zedk    r e             dS dS )    N)serve)BenchmarkerHello)DeploymentHandlez'Benchmark deployment handle throughput.)helpz--batch-sized   zBNumber of requests to send to downstream deployment in each trial.)typedefaultr   z--num-replicas   z0Number of replicas in the downstream deployment.z--num-trials   z)Number of trials of the benchmark to run.z--trial-runtimez:Duration to run each trial of the benchmark for (seconds).
batch_sizenum_replicas
num_trialstrial_runtimec           	      `   t          j        t          j        |ddi                                                    }t	          j        |          }|j                            | ||                                          \  }}t          d
                    d| d|  d||                     d S )	Nnum_cpusr   )r   ray_actor_options)r   r   r   z3DeploymentHandle throughput {}: {} +- {} requests/sz(num_replicas=z, batch_size=))r   bindr   optionsr   runrun_throughput_benchmarkremoteresultprintformat)r   r   r   r   apphmeanstddevs           /home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/serve/_private/benchmarks/handle_throughput.pymainr"      s    > 
%*a	
 	
 	

$&& C
  )C..A-44# 5   fhh	 D& 
=DDE\EE
EEE	
 	
        __main__)clickrayr   $ray.serve._private.benchmarks.commonr   r   ray.serve.handler   commandoptionintfloatr"   __name__ r#   r!   <module>r/      sy          C C C C C C C C - - - - - - =>>>		M	   		;	   		4	   		E	    	       ?>28 zDFFFFF r#   