public Performance GetPerformance(TestConstraints testConstraints) { Stopwatch sw = new Stopwatch(); var trialDivison = new SieveOfEratosthenes(testConstraints.Limit); sw.Start(); long prime = trialDivison.Primes.ToList().Last(); return new Performance { RangeLimit = testConstraints.Limit, TimeTaken = sw.ElapsedMilliseconds }; }
public Performance GetPerformance(TestConstraints testConstraints) { Stopwatch sw = new Stopwatch(); var trialDivison = new TrialDivisionByPrimes(); sw.Start(); long prime = trialDivison.Primes.TakeWhile(p => p < testConstraints.Limit).ToList().Last(); return new Performance { RangeLimit = testConstraints.Limit, TimeTaken = sw.ElapsedMilliseconds }; }
public List<Performance> DoWork(TestConstraints testConstraints) { return GetSieveOfErathosthenesPeformanceTimes(testConstraints.Limit, testConstraints.Increment); }
public List<Performance> DoWork(TestConstraints testConstraints) { return GetTrialDivisonPeformanceTimes(testConstraints.Limit, testConstraints.Increment); }