1717import psutil
1818import requests
1919
20+ from ai_infra_bench .constants import WARMUP_FILE , demo_output
21+
2022
2123@dataclass
2224class ServerAccessInfo :
@@ -27,50 +29,6 @@ class ServerAccessInfo:
2729
2830logger = logging .getLogger (__name__ )
2931
30- colors = ["#1f77b4" , "#ff7f0e" , "#2ca02c" , "#d62728" , "#9467bd" , "#8c564b" ]
31- graph_per_row = 3
32- FULL_DATA_JSON_PATH = "full_data_json" # used to store all json files
33- TABLE_NAME = "table.md"
34- CSV_NAME = "data.csv"
35- WARMUP_FILE = ".warmup.json"
36- demo_output = {
37- "backend" : "sglang-oai" ,
38- "dataset_name" : "random" ,
39- "request_rate" : 10.0 ,
40- "max_concurrency" : 10 ,
41- "sharegpt_output_len" : None ,
42- "random_input_len" : 1200 ,
43- "random_output_len" : 800 ,
44- "random_range_ratio" : 1.0 ,
45- "duration" : 45.11868940386921 ,
46- "completed" : 100 ,
47- "total_input_tokens" : 120000 ,
48- "total_output_tokens" : 80000 ,
49- "total_output_tokens_retokenized" : 79998 ,
50- "request_throughput" : 2.2163764356024127 ,
51- "input_throughput" : 2659.6517227228956 ,
52- "output_throughput" : 1773.1011484819303 ,
53- "mean_e2e_latency_ms" : 4482.026166650467 ,
54- "median_e2e_latency_ms" : 4487.435979535803 ,
55- "std_e2e_latency_ms" : 32.15524448450066 ,
56- "p99_e2e_latency_ms" : 4534.823208898306 ,
57- "mean_ttft_ms" : 38.534140698611736 ,
58- "median_ttft_ms" : 42.44273528456688 ,
59- "std_ttft_ms" : 10.558202315257851 ,
60- "p99_ttft_ms" : 61.15902605932206 ,
61- "mean_tpot_ms" : 5.561316678287678 ,
62- "median_tpot_ms" : 5.56157646876747 ,
63- "std_tpot_ms" : 0.04168330778296244 ,
64- "p99_tpot_ms" : 5.627061070545631 ,
65- "mean_itl_ms" : 5.561935330397016 ,
66- "median_itl_ms" : 5.495080258697271 ,
67- "std_itl_ms" : 1.1977701758121588 ,
68- "p95_itl_ms" : 6.047771545127034 ,
69- "p99_itl_ms" : 6.62423954345286 ,
70- "concurrency" : 9.933857179517508 ,
71- "accept_length" : None ,
72- }
73-
7432
7533def cmp_preprocess_client_cmds (
7634 client_cmds : List [str ], server_access_info : ServerAccessInfo
0 commit comments