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, compile, 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_compile() async
Handle result processing after request execution has ended.
Defaults to no action so existing progress trackers remain compatible.
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 |
on_requests_prefetched(loaded, target)
Record request nodes loaded before the run starts.
The scheduler calls this synchronously from the prefetch loop. Trackers that do not display loading progress keep the default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loaded | int | Request nodes loaded so far | required |
target | int | None | Request nodes to load, or | required |
Source code in src/guidellm/benchmark/progress.py
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
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 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 | |
__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
on_benchmark_compile() async
Notify all trackers that benchmark results are being processed.
on_requests_prefetched(loaded, target)
Forward a prefetch progress update to every tracker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loaded | int | Request nodes loaded so far | required |
target | int | None | Request nodes to load, or | 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
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 309 310 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 | |
__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_compile() async
Show result processing before synchronous compilation begins.
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
on_requests_prefetched(loaded, target)
Update the loading bar with the number of prefetched requests.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loaded | int | Request nodes loaded so far | required |
target | int | None | Request nodes to load, or | 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
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 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | |
__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_compile() async
Log result processing immediately, regardless of the interval.
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 |
Source code in src/guidellm/benchmark/progress.py
on_requests_prefetched(loaded, target)
Log prefetch progress on the first update and then on the log interval.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
loaded | int | Request nodes loaded so far | required |
target | int | None | Request nodes to load, or | required |