Improved benchmark filtering with an enum-based approach and added a help menu for available benchmarks.
These changes were pulled from #298 and full credit goes to @Rexicon226
What changed?
Introduced a Benchmark enum to strictly type available benchmark options
Added a --help flag that displays all available benchmarks
Replaced string-based benchmark filtering with enum matching
Updated error handling to show usage information for invalid benchmark names
Modified logging messages to be more precise
How to test?
Run zig build benchmark -- --help to view available benchmarks
Test individual benchmarks: zig build benchmark -- [benchmark_name]
Run all benchmarks: zig build benchmark -- all
Verify error handling by attempting to run an invalid benchmark name
Why make this change?
The enum-based approach provides better type safety and prevents typos when selecting benchmarks. The help menu improves user experience by clearly showing available options, making the benchmark system more user-friendly and maintainable.
TL;DR
Improved benchmark filtering with an enum-based approach and added a help menu for available benchmarks.
These changes were pulled from #298 and full credit goes to @Rexicon226
What changed?
Benchmark
enum to strictly type available benchmark options--help
flag that displays all available benchmarksHow to test?
zig build benchmark -- --help
to view available benchmarkszig build benchmark -- [benchmark_name]
zig build benchmark -- all
Why make this change?
The enum-based approach provides better type safety and prevents typos when selecting benchmarks. The help menu improves user experience by clearly showing available options, making the benchmark system more user-friendly and maintainable.