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
feat(reporters): display iteration counts inline with low-count warnings
- Add iteration count inline with timing stats in format: duration ±rme (N iter) | ops/sec
- Highlight low iteration counts (<30) in red for human reporter
- Add summary warning when tasks have insufficient iterations for reliable CV
- Remove verbose-only iteration display (now always shown inline)
The 30-iteration threshold is based on statistical best practices for
reliable coefficient of variation calculations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
`${this.colorize('brightYellow',ansiChars.approx)}${this.colorize('brightYellow','Warning:')}${this.lowIterationCount}${HumanReporter.pluralize('task',this.lowIterationCount)} had low iteration counts (<${MIN_RELIABLE_ITERATIONS}) which may affect statistical reliability`,
260
+
);
261
+
}
247
262
}
248
263
249
264
onError(error: Error): void{
@@ -373,6 +388,7 @@ export class HumanReporter extends BaseReporter {
373
388
this.failures=[];// Reset failures for new run
374
389
this.lastProgressLine='';// Reset for new run
375
390
this.maxTimePadWidth=0;// Reset time padding width for new run
391
+
this.lowIterationCount=0;// Reset low iteration count for new run
376
392
377
393
if(this.quiet){
378
394
return;
@@ -634,6 +650,9 @@ export class HumanReporter extends BaseReporter {
634
650
error: boolean;
635
651
errorMessage?: string;
636
652
iterations: number;
653
+
iterationsLen: number;
654
+
iterationsStr: string;
655
+
lowIterations: boolean;
637
656
name: string;
638
657
nameLength: number;
639
658
opsPerSecLen: number;
@@ -661,6 +680,9 @@ export class HumanReporter extends BaseReporter {
`${symbols.warning} Warning: ${this.lowIterationCount}${SimpleReporter.pluralize('task',this.lowIterationCount)} had low iteration counts (<${MIN_RELIABLE_ITERATIONS}) which may affect statistical reliability`,
209
+
);
210
+
}
195
211
}
196
212
197
213
onError(error: Error): void{
@@ -248,6 +264,7 @@ export class SimpleReporter extends BaseReporter {
248
264
onStart(run: BenchmarkRun): void{
249
265
this.startTime=Date.now();
250
266
this.failures=[];// Reset failures for new run
267
+
this.lowIterationCount=0;// Reset low iteration count for new run
251
268
252
269
if(this.quiet){
253
270
return;
@@ -366,6 +383,9 @@ export class SimpleReporter extends BaseReporter {
366
383
error: boolean;
367
384
errorMessage?: string;
368
385
iterations: number;
386
+
iterationsLen: number;
387
+
iterationsStr: string;
388
+
lowIterations: boolean;
369
389
name: string;
370
390
nameLength: number;
371
391
opsPerSecLen: number;
@@ -388,6 +408,9 @@ export class SimpleReporter extends BaseReporter {
0 commit comments