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 |
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
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 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 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 | |
__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
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 | |
__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 |