Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add benchmarks for PathMatcher performance
Added a JMH benchmark suite to evaluate the performance of the `PathMatcher` implementation against a simple `Set`-based matcher. Changes: - Created `PathMatcherBenchmark` in `/benchmarks/src/main/scala/zio/http/gen/routing/PathMatcherBenchmark.scala`. - Benchmarked two matching strategies: 1. `Set[String]`-based matcher. 2. `PathMatcher` state machine-based matcher. - Configured benchmarks to measure: - Execution time in nanoseconds. - Different path counts (10, 100, 1000). - Both matching and non-matching paths. - Utilized randomized path generation for diverse test cases: - Included paths with varying depths and alphanumeric components. - Mixed matched and unmatched paths for realistic testing. - Configured JMH annotations for warmup, measurement, and iterations: - Warmup: 5 iterations of 1 second each. - Measurement: 5 iterations of 1 second each. - Single fork to ensure reproducibility. This update provides performance insights into `PathMatcher`, aiding in optimization and scalability analysis.
- Loading branch information