You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 line
918 B

  1. using System;
  2. using System.Threading;
  3. using BenchmarkDotNet.Running;
  4. using MQTTnet.Diagnostics;
  5. namespace MQTTnet.Benchmarks
  6. {
  7. public static class Program
  8. {
  9. public static void Main(string[] args)
  10. {
  11. Console.WriteLine($"MQTTnet - BenchmarkApp.{TargetFrameworkInfoProvider.TargetFramework}");
  12. Console.WriteLine("1 = MessageProcessingBenchmark");
  13. Console.WriteLine("2 = SerializerBenchmark");
  14. var pressedKey = Console.ReadKey(true);
  15. switch (pressedKey.KeyChar)
  16. {
  17. case '1':
  18. BenchmarkRunner.Run<MessageProcessingBenchmark>();
  19. break;
  20. case '2':
  21. BenchmarkRunner.Run<SerializerBenchmark>();
  22. break;
  23. default:
  24. break;
  25. }
  26. Console.ReadLine();
  27. }
  28. }
  29. }