2
0

Program.cs 1.0 KB

123456789101112131415161718192021222324252627
  1. using BenchmarkDotNet.Running;
  2. namespace Renci.SshNet.Benchmarks
  3. {
  4. class Program
  5. {
  6. static void Main(string[] args)
  7. {
  8. // Usage examples:
  9. // 1. Run all benchmarks:
  10. // dotnet run -c Release -- --filter *
  11. // 2. List all benchmarks:
  12. // dotnet run -c Release -- --list flat
  13. // 3. Run a subset of benchmarks based on a filter (of a benchmark method's fully-qualified name,
  14. // e.g. "Renci.SshNet.Benchmarks.Security.Cryptography.Ciphers.AesCipherBenchmarks.Encrypt_CBC"):
  15. // dotnet run -c Release -- --filter *Ciphers*
  16. // 4. Run benchmarks and include memory usage statistics in the output:
  17. // dotnet run -c Release -- --filter *Rsa* --memory
  18. // 3. Print help:
  19. // dotnet run -c Release -- --help
  20. // See also https://benchmarkdotnet.org/articles/guides/console-args.html
  21. _ = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
  22. }
  23. }
  24. }