25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

38 lines
1.2 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. var pressedKey = Console.ReadKey(true);
  16. switch (pressedKey.KeyChar)
  17. {
  18. case '1':
  19. BenchmarkRunner.Run<MessageProcessingBenchmark>();
  20. break;
  21. case '2':
  22. BenchmarkRunner.Run<SerializerBenchmark>();
  23. break;
  24. case '3':
  25. BenchmarkRunner.Run<LoggerBenchmark>();
  26. break;
  27. case '4':
  28. BenchmarkRunner.Run<TopicFilterComparerBenchmark>();
  29. break;
  30. }
  31. Console.ReadLine();
  32. }
  33. }
  34. }