Skip to content

Commit 780be20

Browse files
committed
Add trace replay documentation
Signed-off-by: Vincent Gimenes <vincent.gimenes@gmail.com>
1 parent de40aee commit 780be20

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

docs/getting-started/benchmark.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ For example, setting `--max-requests 1000` with `--profile sweep` will run 1000
8282

8383
GuideLLM supports several benchmark profiles and strategies, which are described in detail below.
8484

85+
- `synchronous`: Runs requests one at a time (sequential)
86+
- `throughput`: Tests maximum throughput by running requests in parallel
87+
- `concurrent`: Runs a fixed number of parallel request streams
88+
- `constant`: Sends requests at a fixed rate per second
89+
- `poisson`: Sends requests following a Poisson distribution
90+
- `sweep`: Automatically determines optimal performance points (default)
91+
- `replay`: Replays requests from a trace file to reproduce real-world traffic patterns (beta)
92+
8593
#### Synchronous Profile
8694

8795
Runs requests one at a time (sequential).
@@ -187,6 +195,28 @@ guidellm benchmark \
187195

188196
You can customize synthetic data generation with additional parameters such as standard deviation, minimum, and maximum values. See the [Datasets Synthetic data documentation](../guides/datasets.md#synthetic-data) for more details.
189197

198+
### Trace Replay Benchmarking (beta)
199+
200+
For realistic load testing, replay traffic patterns from trace files. Trace files must be JSONL with `timestamp`, `input_length`, and `output_length` fields:
201+
202+
```json
203+
{"timestamp": 0, "input_length": 256, "output_length": 128}
204+
{"timestamp": 0.5, "input_length": 512, "output_length": 64}
205+
```
206+
207+
Run with the `replay` profile:
208+
209+
```bash
210+
guidellm benchmark \
211+
--target "http://localhost:8000" \
212+
--data "path/to/trace.jsonl" \
213+
--data-args '{"type_": "trace_synthetic"}' \
214+
--profile replay \
215+
--rate 1.0
216+
```
217+
218+
The `rate` parameter acts as a time scale: `1.0` for original speed, `2.0` for 2x faster, `0.5` for half speed.
219+
190220
### Working with Real Data
191221

192222
While synthetic data is convenient for quick tests, you can benchmark with real-world data:

docs/guides/datasets.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ GuideLLM supports various file formats for datasets, including text, CSV, JSON,
131131
{"prompt": "Hello, how are you?", "output_tokens_count": 5, "additional_column": "foo", "additional_column2": "bar"}
132132
{"prompt": "What is your name?", "output_tokens_count": 3, "additional_column": "baz", "additional_column2": "qux"}
133133
```
134+
- **Trace files (`.jsonl` with `trace_synthetic` type)**: Specialized JSONL files for replay benchmarking with `timestamp`, `input_length`, and `output_length` fields. Used with `--profile replay` to reproduce production traffic patterns. See [Trace Replay Benchmarking](../getting-started/benchmark.md#trace-replay-benchmarking).
135+
```json
136+
{"timestamp": 0, "input_length": 256, "output_length": 128}
137+
{"timestamp": 0.5, "input_length": 512, "output_length": 64}
138+
```
134139
- **JSON files (`.json`)**: Where the entire dataset is represented as a JSON array of objects nested under a specific key. To surface the correct key to use, a `--data-column-mapper` argument must be passed in of `"field": "NAME"` for where the array exists. The objects should include `prompt` or other common names for the prompt which will be used as the prompt column. Additional fields can be included based on the previously mentioned aliases for the `--data-column-mapper` argument.
135140
```json
136141
{

0 commit comments

Comments
 (0)