guidellm.benchmark.progress
Progress tracking and console display for benchmark execution monitoring.
Provides abstract interfaces and concrete implementations for tracking benchmark progress during execution. The module enables real-time display of benchmark statistics, metrics, and execution state through console-based UI components. Primary use cases include monitoring generative benchmark runs with detailed request/token statistics and scheduler state updates.
BenchmarkerProgress
Bases: Generic[BenchmarkAccumulatorT, BenchmarkT], ABC
Abstract interface for tracking and displaying benchmark execution progress.
Provides lifecycle hooks for monitoring benchmark stages including initialization, execution start, progress updates, completion, and finalization. Implementations handle display updates, progress tracking, and resource management for benchmark monitoring.
Source code in src/guidellm/benchmark/progress.py
__init__()
on_benchmark_complete(benchmark) abstractmethod async
Handle benchmark strategy execution completion event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
benchmark | BenchmarkT | Completed benchmark results with final metrics | required |
on_benchmark_start(strategy) abstractmethod async
Handle benchmark strategy execution start event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy | SchedulingStrategy | Scheduling strategy configuration being executed | required |
on_benchmark_update(accumulator, scheduler_state) abstractmethod async
Handle benchmark execution progress update with current metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
accumulator | BenchmarkAccumulatorT | Current accumulated benchmark metrics and statistics | required |
scheduler_state | SchedulerState | Current scheduler execution state and counters | required |
Source code in src/guidellm/benchmark/progress.py
on_finalize() abstractmethod async
on_initialize(profile) abstractmethod async
Initialize progress tracking for the given benchmark profile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile | Profile | Benchmark profile configuration defining execution parameters | required |
CompositeBenchmarkerProgress
Bases: BenchmarkerProgress[BenchmarkAccumulatorT, BenchmarkT]
Composite progress tracker that aggregates multiple progress trackers.
Delegates lifecycle events to all registered progress trackers, enabling simultaneous monitoring and display of benchmark execution across different interfaces or formats.
Source code in src/guidellm/benchmark/progress.py
__init__(trackers)
Initialize composite progress tracker with a list of individual trackers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress_trackers | Individual progress trackers to aggregate | required |
Source code in src/guidellm/benchmark/progress.py
GenerativeConsoleBenchmarkerProgress
Bases: BenchmarkerProgress[GenerativeBenchmarkAccumulator, GenerativeBenchmark], Live
Console-based real-time progress display for generative benchmarks.
Renders live benchmark execution statistics using Rich library components with structured progress bars, timing information, request/token metrics, and optional scheduler statistics. Updates refresh automatically during benchmark execution.
Attributes:
| Name | Type | Description |
|---|---|---|
display_scheduler_stats | bool | Whether to include scheduler statistics in display |
Source code in src/guidellm/benchmark/progress.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
__init__(display_scheduler_stats=False, cleanup=True)
Initialize console progress display with rendering configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
display_scheduler_stats | bool | Whether to display scheduler timing statistics | False |
cleanup | bool | Whether to clear the console display after completion | True |
Source code in src/guidellm/benchmark/progress.py
on_benchmark_complete(benchmark) async
Update display for completed benchmark strategy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
benchmark | GenerativeBenchmark | Completed benchmark results with final metrics | required |
Source code in src/guidellm/benchmark/progress.py
on_benchmark_start(strategy) async
Update display for benchmark strategy execution start.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy | SchedulingStrategy | Scheduling strategy configuration being executed | required |
Source code in src/guidellm/benchmark/progress.py
on_benchmark_update(accumulator, scheduler_state) async
Update display with current benchmark progress and metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
accumulator | GenerativeBenchmarkAccumulator | Current accumulated benchmark metrics and statistics | required |
scheduler_state | SchedulerState | Current scheduler execution state and counters | required |
Source code in src/guidellm/benchmark/progress.py
on_finalize() async
Stop display rendering and release resources.
Source code in src/guidellm/benchmark/progress.py
on_initialize(profile) async
Initialize console display components and begin live rendering.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile | Profile | Benchmark profile configuration defining execution parameters | required |
Source code in src/guidellm/benchmark/progress.py
GenerativeLoggingBenchmarkerProgress
Bases: BenchmarkerProgress[GenerativeBenchmarkAccumulator, GenerativeBenchmark]
Log interval-limited progress independently of other progress trackers.
Source code in src/guidellm/benchmark/progress.py
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | |
__init__(interval=10.0)
Initialize independent progress logging.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
interval | float | Positive finite minimum seconds between periodic records | 10.0 |
Raises:
| Type | Description |
|---|---|
ValueError | If the interval is not positive and finite |
Source code in src/guidellm/benchmark/progress.py
on_benchmark_complete(benchmark) async
Log final metrics regardless of the interval.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
benchmark | GenerativeBenchmark | Completed result | required |
Source code in src/guidellm/benchmark/progress.py
on_benchmark_start(strategy) async
Log strategy start immediately.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy | SchedulingStrategy | Strategy being executed | required |
Source code in src/guidellm/benchmark/progress.py
on_benchmark_update(accumulator, scheduler_state) async
Periodically log current metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
accumulator | GenerativeBenchmarkAccumulator | Accumulated benchmark metrics | required |
scheduler_state | SchedulerState | Scheduler counters and progress | required |
Source code in src/guidellm/benchmark/progress.py
on_finalize() async
on_initialize(profile) async
Reset logging for a new run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
profile | Profile | Benchmark profile | required |