You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/getting-started/index.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ modestbench run "tests/**/*.bench.ts"
140
140
141
141
## View Results
142
142
143
-
modestbench provides a clean, colorized output:
143
+
modestbench provides clean, colorized output in interactive terminals:
144
144
145
145
```text
146
146
🚀 modestbench
@@ -174,6 +174,10 @@ Found 1 benchmark file(s)
174
174
🎉 All benchmarks completed successfully!
175
175
```
176
176
177
+
:::note[Output Format]
178
+
The colorized output above is from the `human` reporter, used automatically in interactive terminals. In CI/CD or when piping output, modestbench uses the `simple` reporter for clean, plain-text output without colors.
`--quiet` suppresses progress (stderr), not data output (stdout). Perfect for CI/CD pipelines.
166
+
:::note[CI/CD Pipelines]
167
+
In non-TTY environments, modestbench automatically uses the `simple` reporter which has no progress bars. `--quiet` further suppresses status messages for completely clean output.
Copy file name to clipboardExpand all lines: site/src/content/docs/guides/configuration.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,11 +208,12 @@ Stop execution on first benchmark failure.
208
208
#### `reporters`
209
209
210
210
**Type:**`string[]`
211
-
**Default:**`["human"]`
211
+
**Default:**Auto-selected based on environment
212
212
213
213
Array of reporter names to use for output. Available reporters:
214
214
215
-
-`human` - Color-coded terminal output with progress bars
215
+
-`human` - Color-coded terminal output with progress bars (default for TTY with colors)
216
+
-`simple` - Plain text output without colors (default for non-TTY environments)
216
217
-`json` - Structured JSON data for programmatic analysis
217
218
-`csv` - Tabular data for spreadsheets
218
219
@@ -222,6 +223,10 @@ Array of reporter names to use for output. Available reporters:
222
223
}
223
224
```
224
225
226
+
:::note[Auto-Selection]
227
+
When not specified, modestbench automatically selects `human` (TTY + color support) or `simple` (non-TTY). The `human` reporter is used when `FORCE_COLOR=1` even in non-TTY environments.
228
+
:::
229
+
225
230
:::note[Multiple Reporters]
226
231
You can use multiple reporters simultaneously! Results will be output in all specified formats.
227
232
:::
@@ -256,6 +261,10 @@ Minimal output mode. Suppresses progress bars and non-essential messages on stde
256
261
}
257
262
```
258
263
264
+
:::tip[CI/CD Usage]
265
+
In CI/CD environments, modestbench automatically uses the `simple` reporter which has no progress bars. Use `quiet` to further suppress status messages for completely clean output.
266
+
:::
267
+
259
268
:::tip[quiet vs output]
260
269
`quiet` suppresses progress (stderr), not data output (stdout). Use it in CI to reduce noise while still getting results.
modestbench supports multiple output formats through its reporter system. You can use multiple reporters simultaneously to get results in different formats.
7
7
8
-
## Human Reporter (Default)
8
+
## Default Reporter Selection
9
9
10
-
The human reporter provides color-coded terminal output with real-time progress bars and formatted results.
10
+
modestbench automatically selects the appropriate reporter based on your environment:
11
+
12
+
-**Interactive terminals** (TTY with color support): `human` reporter with colors and progress bars
13
+
-**Non-TTY environments** (CI/CD, piped output): `simple` reporter with plain text output
14
+
-**Forced color mode** (`FORCE_COLOR=1`): `human` reporter even in non-TTY environments
15
+
16
+
You can always override the default by explicitly specifying `--reporters`.
17
+
18
+
## Human Reporter
19
+
20
+
The human reporter provides color-coded terminal output with real-time progress bars and formatted results. This is the default when running in an interactive terminal (TTY) with color support.
11
21
12
22
### Features
13
23
@@ -70,9 +80,74 @@ modestbench run --reporters human --quiet
70
80
-**stderr** - Progress bars and real-time updates
71
81
72
82
:::tip[CI/CD Usage]
73
-
Use `--quiet`flag to suppress progress bars while keeping results output.
83
+
In CI/CD environments, modestbench automatically uses the `simple` reporter for clean, parseable output. Use `--quiet` to suppress progress messages if using the `human` reporter explicitly.
74
84
:::
75
85
86
+
## Simple Reporter
87
+
88
+
The simple reporter provides clean, text-only output without colors or progress bars. This is the default in non-TTY environments (CI/CD, piped output) or when `FORCE_COLOR` is not set.
89
+
90
+
### Features
91
+
92
+
-**Plain text output** - No ANSI colors or escape codes
93
+
-**No progress bars** - Clean output suitable for logs and pipes
94
+
-**Structured results** - Same hierarchy as human reporter (File → Suite → Task)
95
+
-**Machine-readable** - Perfect for parsing and CI/CD logs
96
+
97
+
### Example Output
98
+
99
+
```text
100
+
modestbench
101
+
102
+
Environment:
103
+
Node.js: v24.10.0
104
+
Platform: darwin arm64
105
+
CPU: Apple M4 Max (16 cores)
106
+
Memory: 48.0 GB
107
+
108
+
Found 1 benchmark file(s)
109
+
110
+
> benchmarks/example.bench.js
111
+
112
+
> Array Operations
113
+
✓ Array.push()
114
+
810.05μs ±2.45% (1.23M ops/sec)
115
+
✓ Array spread
116
+
81.01ms ±4.12% (12.34K ops/sec)
117
+
✓ 2 passed
118
+
119
+
✓ All 2 tasks passed
120
+
121
+
Results
122
+
123
+
✓ All tests passed: 2
124
+
Files: 1
125
+
Suites: 1
126
+
Duration: 1.82s
127
+
128
+
All benchmarks completed successfully!
129
+
```
130
+
131
+
### Usage
132
+
133
+
```bash
134
+
# Simple reporter is default in non-TTY environments
135
+
modestbench run | tee results.log
136
+
137
+
# Explicitly specify simple reporter
138
+
modestbench run --reporters simple
139
+
140
+
# Force human reporter in non-TTY (requires FORCE_COLOR=1)
141
+
FORCE_COLOR=1 modestbench run --reporters human
142
+
```
143
+
144
+
### When to Use
145
+
146
+
-**CI/CD pipelines** - Clean logs without ANSI codes
147
+
-**Piped output** - `modestbench run | grep "passed"`
148
+
-**Log files** - Readable output without color codes
149
+
-**Automated parsing** - Consistent text format
150
+
76
151
## JSON Reporter
77
152
78
153
The JSON reporter outputs structured data perfect for programmatic analysis, CI/CD integration, and historical tracking.
@@ -383,8 +458,11 @@ modestbench run
383
458
#### CI/CD
384
459
385
460
```bash
386
-
# JSON + CSV for analysis, quiet mode
461
+
# JSON + CSV for analysis (simple reporter used automatically)
387
462
modestbench run --reporters json,csv --output ./results --quiet
463
+
464
+
# Or let auto-detection handle it
465
+
modestbench run --output ./results
388
466
```
389
467
390
468
#### Documentation
@@ -400,27 +478,30 @@ modestbench run --reporters human,json,csv --output ./benchmark-results
400
478
401
479
-**JSON reporter**: Writes to `{output}/results.json`
402
480
-**CSV reporter**: Writes to `{output}/results.csv`
403
-
-**Human reporter**: Still writes to stdout/stderr
481
+
-**Human/Simple reporters**: Still write to stdout/stderr
404
482
405
483
### When `--output` is NOT Specified
406
484
407
485
-**JSON reporter**: Writes to stdout
408
486
-**CSV reporter**: Writes to stdout
409
-
-**Human reporter**: Writes to stdout/stderr
487
+
-**Human/Simple reporters**: Write to stdout/stderr
410
488
411
489
:::caution[Multiple Data Reporters]
412
490
Using both JSON and CSV without `--output` will mix their output on stdout. Always use `--output` when using multiple data reporters.
413
491
:::
414
492
415
493
### Quiet Mode
416
494
417
-
The `--quiet` flag affects only the human reporter:
495
+
The `--quiet` flag affects the human and simple reporters:
418
496
419
-
- Suppresses progress bars (stderr)
420
-
- Suppresses status messages
497
+
- Suppresses progress bars and status messages (stderr)
421
498
- Keeps final results output
422
499
- Does NOT affect JSON or CSV output
423
500
501
+
:::note[Simple Reporter]
502
+
The `simple` reporter has no progress bars by default, so `--quiet` primarily affects status messages.
503
+
:::
504
+
424
505
## Next Steps
425
506
426
507
- Learn about [Configuration](/guides/configuration/) for reporter setup
0 commit comments