Syndica / sig

a Solana validator client implementation written in Zig
https://syndica.io/sig
Apache License 2.0
219 stars 34 forks source link

improve(benchmarks): better cli parsing #391

Closed 0xNineteen closed 6 days ago

0xNineteen commented 1 week ago

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?

How to test?

  1. Run zig build benchmark -- --help to view available benchmarks
  2. Test individual benchmarks: zig build benchmark -- [benchmark_name]
  3. Run all benchmarks: zig build benchmark -- all
  4. 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.

0xNineteen commented 1 week ago

This stack of pull requests is managed by Graphite. Learn more about stacking.