public void AddGetPerformance()
        {
            var results        = $"Using single thread, Targeting {TestLength} rounds\r\n";
            int operationCount = 2;

            foreach (var hStore in Factory.GetImplementors())
            {
                if (hStore == typeof(NullStore))
                {
                    continue;
                }

                foreach (HashProvider provider in Enum.GetValues(typeof(HashProvider)))
                {
                    var c = StoreTests.GetTestStore(hStore, provider, true, int.MaxValue);

                    DateTime startTime = DateTime.Now;
                    int      count     = 0;

                    while ((startTime + TestLength) > DateTime.Now)
                    {
                        var item = GetNextGuid();
                        item.ComputeHash(provider, null);
                        c.StoreItem(item);
                        c.GetItem <IHashable>(item.ComputedHash);
                        count++;
                    }

                    results += GetResultString(provider, count * operationCount, hStore, (DateTime.Now - startTime));
                }
            }

            Assert.Pass(results);
        }
        public void AddGetMultithreadPerformance()
        {
            var threads = 8;
            var results = $"Using {threads} threads, Targeting {TestLength} rounds\r\n";

            foreach (var hStore in Factory.GetImplementors())
            {
                if (hStore == typeof(NullStore))
                {
                    continue;
                }

                foreach (HashProvider provider in Enum.GetValues(typeof(HashProvider)))
                {
                    var      c         = StoreTests.GetTestStore(hStore, provider, true, int.MaxValue);
                    var      tasks     = new List <Task>();
                    DateTime testStart = DateTime.Now;

                    for (int i = 0; i < threads; i++)
                    {
                        var t = new Task(() => {
                            DateTime taskStartTime = DateTime.Now;

                            while ((taskStartTime + TestLength) > DateTime.Now)
                            {
                                var item = GetNextGuid();
                                item.ComputeHash(provider, null);
                                c.StoreItem(item);
                                c.GetItem <IHashable>(item.ComputedHash);
                            }
                        });

                        tasks.Add(t);
                        t.Start();
                    }

                    Task.WaitAll(tasks.ToArray());

                    results += GetResultString(provider, c.ItemCount, hStore, (DateTime.Now - testStart));
                    c.Dispose();
                }
            }

            Assert.Pass(results);
        }