@@ -28,7 +28,7 @@ def parse_experiment_output(lines):
28
28
# required_fields = ['status_code', 'start_time', 'end_time', 'latency', 'throughput',
29
29
# 'prompt_tokens', 'output_tokens', 'total_tokens', 'input', 'output']
30
30
required_fields = ['status' , 'start_time' , 'end_time' , 'latency' , 'throughput' ,
31
- 'prompt_tokens' , 'output_tokens' , 'total_tokens' , 'input' , 'output' ]
31
+ 'prompt_tokens' , 'output_tokens' , 'total_tokens' , 'input' , 'output' , 'ttft' , 'tpot' ]
32
32
if any (field not in data for field in required_fields ):
33
33
missingfields = [field not in data for field in required_fields ]
34
34
print (missingfields )
@@ -178,11 +178,11 @@ def analyze_performance(df):
178
178
179
179
def plot_combined_visualization (experiment_home_dir , workload_type ):
180
180
# Create figure
181
- fig = plt .figure (figsize = (12 , 12 ))
181
+ fig = plt .figure (figsize = (12 , 15 ))
182
182
183
183
# Create GridSpec for time series plots
184
- gs_ts = GridSpec (2 , 2 , figure = fig )
185
- gs_ts .update (top = 0.95 , bottom = 0.45 , hspace = 0.3 , wspace = 0.25 )
184
+ gs_ts = GridSpec (4 , 2 , figure = fig )
185
+ gs_ts .update (top = 0.95 , bottom = 0.4 , hspace = 0.5 , wspace = 0.3 )
186
186
187
187
# Create subplots for time series
188
188
ax_cdf = fig .add_subplot (gs_ts [0 , 0 ])
@@ -196,6 +196,11 @@ def plot_combined_visualization(experiment_home_dir, workload_type):
196
196
197
197
ax_cost = fig .add_subplot (gs_ts [1 , 1 ])
198
198
199
+ ax_ttft = fig .add_subplot (gs_ts [2 , 0 ])
200
+ ax_tpot = fig .add_subplot (gs_ts [2 , 1 ])
201
+
202
+ ax_throughput = fig .add_subplot (gs_ts [3 , 0 ])
203
+
199
204
# Create 1x4 grid for bar plots
200
205
gs_bars = GridSpec (1 , 4 , figure = fig )
201
206
gs_bars .update (top = 0.35 , bottom = 0.1 , left = 0.1 , right = 0.9 , wspace = 0.4 )
@@ -308,7 +313,11 @@ def plot_combined_visualization(experiment_home_dir, workload_type):
308
313
# ax_latency.scatter(df['end_time'], df['latency'], label=f'{autoscaler}', color=color, marker='.', s=5, alpha=0.3)
309
314
ax_rps .plot (df ['start_time' ], df ['rps' ], label = label_name , color = color , linewidth = 0.5 , alpha = 0.7 )
310
315
print (f"Max time: { label_name } , { df ['start_time' ].max ()} " )
311
-
316
+ ax_ttft .plot (df ['start_time' ], df ['ttft' ], label = label_name , color = color , linewidth = 0.5 , alpha = 0.7 )
317
+ ax_tpot .plot (df ['start_time' ], df ['tpot' ], label = label_name , color = color , linewidth = 0.5 , alpha = 0.7 )
318
+ ax_throughput .plot (df ['start_time' ], df ['throughput' ], label = label_name , color = color , linewidth = 0.5 , alpha = 0.7 )
319
+
320
+
312
321
313
322
# 3. Running pods over time
314
323
ax_pods .plot (pod_count_df ['asyncio_time' ], pod_count_df ['Running' ],
@@ -345,6 +354,21 @@ def plot_combined_visualization(experiment_home_dir, workload_type):
345
354
ax_rps .grid (True )
346
355
ax_rps .legend ()
347
356
357
+ ax_ttft .set_title ("TTFT Over Time" )
358
+ ax_ttft .set_xlabel ("Time (s)" )
359
+ ax_ttft .set_ylabel ("TTFT (s)" )
360
+ ax_ttft .legend ()
361
+
362
+ ax_tpot .set_title ("TPOT Over Time" )
363
+ ax_tpot .set_xlabel ("Time (s)" )
364
+ ax_tpot .set_ylabel ("TPOT (s)" )
365
+ ax_tpot .legend ()
366
+
367
+ ax_throughput .set_title ("Throughput Over Time" )
368
+ ax_throughput .set_xlabel ("Time (s)" )
369
+ ax_throughput .set_ylabel ("Tokens/sec" )
370
+ ax_throughput .legend ()
371
+
348
372
ax_pods .set_title ('Running Pods' , fontsize = 12 )
349
373
ax_pods .set_xlabel ('Time (seconds)' )
350
374
ax_pods .set_ylabel ('# Running Pods' )
0 commit comments