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
refactor(bench): parse N times, remove detailed flag, always collect real timings
Major refactoring to fix legacy issues and improve accuracy:
1. Parse time now measured N times (like formatting):
- Parse template `iterations` times and average the result
- Previously: parsed once, reused same value for all sizes
- Now: accurate parse timing with same stability as format timing
2. Removed legacy "detailed" flag entirely:
- Was broken: only worked with iterations=1
- Created fake/uniform timing data when disabled
- Latency statistics with dummy data were meaningless
3. Always collect real per-path timings:
- Removed conditional timing collection (detailed && iterations==1)
- Removed fake data generation (vec![avg_per_path; size])
- Now collects actual timings across all iterations: (size × iterations) samples
- Provides accurate latency statistics with real variance
4. Always show latency statistics:
- Removed "if detailed" check around statistics display
- Users always see min/p50/p95/p99/max/stddev
- Statistics now reflect real data, not uniform averages
5. Cleaned up code:
- Removed unused_assignments warning (total_duration)
- Updated pattern description: "Parse and format N paths with M iterations"
- Simplified function signatures (no detailed parameter)
- Removed detailed CLI flag and all related code
Benefits:
- More accurate parse time measurements
- Real latency variance visible in all runs
- Simpler code (23 lines added, 40 deleted)
- No more misleading fake statistics
- Consistent measurement approach for parse and format
0 commit comments