コード例 #1
0
        private static void CompareAwaitWhenAll()
        {
            var comparison = new PerformanceComparer(10, new Dictionary <string, object> {
                { "tasksCount", 1000 }
            });

            comparison.PerformanceTests.Add(new AwaitMultipleTask());
            comparison.PerformanceTests.Add(new WaitAllMultipleTasks());
            comparison.Run();
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            var comparison = new PerformanceComparer(100, new Dictionary <string, object> {
                { "hits", 100 }, { "itemsCount", 1000 }
            });

            comparison.PerformanceTests.Add(new FindInList());
            comparison.PerformanceTests.Add(new FindInDictionary());
            comparison.PerformanceTests.Add(new FindInDictionaryWithDistinct());
            comparison.Run();
        }
コード例 #3
0
        private static void CompareFindInCollections()
        {
            var comparison = new PerformanceComparer(100, new Dictionary <string, object> {
                { "hits", 100 }, { "itemsCount", 1000 }
            });

            comparison.PerformanceTests.Add(new FindInList());
            comparison.PerformanceTests.Add(new FindInDictionary());
            comparison.PerformanceTests.Add(new FindInDictionaryWithDistinct());
            comparison.Run();
        }