1
1

Program.cs 716 B

123456789101112131415161718192021222324252627
  1. using Masuit.Tools;
  2. using Masuit.Tools.Systems;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. namespace Test
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. var timer = HiPerfTimer.Execute(() =>
  13. {
  14. var dic = new Dictionary<string, int>();
  15. var sf = SnowFlake.GetInstance();
  16. for (int i = 0; i < 1000000; i++)
  17. {
  18. //Console.WriteLine(ObjectId.GenerateNewId());
  19. var id = Stopwatch.GetTimestamp().ToBinary(36);
  20. dic.Add(id, 0);
  21. }
  22. });
  23. Console.WriteLine(timer);
  24. }
  25. }
  26. }