Commit 85b6a60
committed
feat(bench): add comprehensive throughput analysis tool
Add new `bench_throughput` binary for detailed performance analysis of
string_pipeline operations at scale. This tool is designed to analyze
performance for real-world usage patterns, particularly for the
television TUI project.
Features:
- 28+ comprehensive templates covering all operations
- Real-world path processing templates (filename extraction, etc.)
- Per-operation timing breakdown with --detailed flag
- Latency statistics (min, p50, p95, p99, max, stddev)
- JSON output format for tracking performance over time
- Scaling analysis (sub-linear, linear, super-linear detection)
- Operation-level metrics (call counts, time attribution)
- Throughput measurements (paths/sec)
- Parse cost analysis across input sizes
Template Categories:
- Core operations: split, join, upper, lower, trim, replace, etc.
- Path operations: extract filename, directory, extension, basename
- Complex chains: multi-operation pipelines
- Map operations: nested transformations
CLI Options:
- --sizes: Comma-separated input sizes (default: 100-100K)
- --iterations: Measurement iterations for stability
- --detailed: Enable operation profiling and statistics
- --format: Output format (console or json)
- --output: JSON output file path
Performance Targets:
- File browser (50K paths): < 100ms total, > 500K paths/sec
- Search results (10K paths): < 20ms total
- Process list (1K paths): < 2ms total
Documentation:
- docs/bench_throughput_plan.md: Comprehensive enhancement plan
- docs/bench_throughput_usage.md: Usage guide with examples
- test_bench_throughput.sh: End-to-end test script
This tool enables:
1. Identifying performance bottlenecks
2. Measuring optimization impact
3. Tracking performance regressions
4. Validating scaling behavior
5. Real-world workload analysis for television integration1 parent df93f9b commit 85b6a60
File tree
5 files changed
+1708
-0
lines changed- docs
- src/bin
5 files changed
+1708
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| |||
0 commit comments