Skip to content

Commit 85b6a60

Browse files
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 integration
1 parent df93f9b commit 85b6a60

File tree

5 files changed

+1708
-0
lines changed

5 files changed

+1708
-0
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ path = "src/main.rs"
3838
name = "string-pipeline-bench"
3939
path = "src/bin/bench.rs"
4040

41+
[[bin]]
42+
bench = false
43+
name = "bench_throughput"
44+
path = "src/bin/bench_throughput.rs"
45+
4146
[profile.staging]
4247
inherits = "dev"
4348
opt-level = 3

0 commit comments

Comments
 (0)