Skip to content

Commit

Permalink
Run all option
Browse files Browse the repository at this point in the history
  • Loading branch information
OudomMunint committed Aug 9, 2023
1 parent d8bb171 commit 34da010
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
if: matrix.os == 'windows-latest'
uses: ncipollo/[email protected]
with:
tag: v1.4.2
tag: v1.4.3
9 changes: 8 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
Console.WriteLine("1. Hashing Benchmark");
Console.WriteLine("2. Encryption Benchmark");
Console.WriteLine("3. Multithreading Benchmark");
Console.WriteLine("4. Run all benchmarks");
Console.Write("Enter the number of your choice: ");

string choice = Console.ReadLine();
Expand All @@ -130,15 +131,21 @@
case "1":
var hashingSummary = BenchmarkRunner.Run<HashingBenchmark>();
break;

case "2":
var encryptionSummary = BenchmarkRunner.Run<EncryptionBenchmark>();
break;

case "3":
var multithreadingSummary = BenchmarkRunner.Run<MultithreadingBenchmark>();
break;

case "4":
var runAll = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).RunAllJoined();
break;

default:
Console.WriteLine("Invalid choice.");
break;
}

}

0 comments on commit 34da010

Please sign in to comment.