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.
 
 
 
 

50 lines
1.7 KiB

  1. using System;
  2. using BenchmarkDotNet.Running;
  3. using MQTTnet.Diagnostics;
  4. namespace MQTTnet.Benchmarks
  5. {
  6. public static class Program
  7. {
  8. public static void Main(string[] args)
  9. {
  10. Console.WriteLine($"MQTTnet - BenchmarkApp.{TargetFrameworkInfoProvider.TargetFramework}");
  11. Console.WriteLine("1 = MessageProcessingBenchmark");
  12. Console.WriteLine("2 = SerializerBenchmark");
  13. Console.WriteLine("3 = LoggerBenchmark");
  14. Console.WriteLine("4 = TopicFilterComparerBenchmark");
  15. Console.WriteLine("5 = ChannelAdapterBenchmark");
  16. Console.WriteLine("6 = MqttTcpChannelBenchmark");
  17. Console.WriteLine("7 = TcpPipesBenchmark");
  18. var pressedKey = Console.ReadKey(true);
  19. switch (pressedKey.KeyChar)
  20. {
  21. case '1':
  22. BenchmarkRunner.Run<MessageProcessingBenchmark>();
  23. break;
  24. case '2':
  25. BenchmarkRunner.Run<SerializerBenchmark>();
  26. break;
  27. case '3':
  28. BenchmarkRunner.Run<LoggerBenchmark>();
  29. break;
  30. case '4':
  31. BenchmarkRunner.Run<TopicFilterComparerBenchmark>();
  32. break;
  33. case '5':
  34. BenchmarkRunner.Run<ChannelAdapterBenchmark>();
  35. break;
  36. case '6':
  37. BenchmarkRunner.Run<MqttTcpChannelBenchmark>();
  38. break;
  39. case '7':
  40. BenchmarkRunner.Run<TcpPipesBenchmark>();
  41. break;
  42. }
  43. Console.ReadLine();
  44. }
  45. }
  46. }