Example #1
0
            public IResult[] Execute(ITimes times, IParallelism parallelism)
            {
                IInstance[] input = this.instances;

                while (true)
                {
                    Log.Information("Executing {Case} {Times}", [email protected], times.Describe());

                    MinDurationVisitor visitor = new MinDurationVisitor();
                    IResult[] results = parallelism.Execute(input, times);

                    foreach (IResult result in results)
                    {
                        result.Data.Visit(visitor);
                    }

                    if (visitor.HasValue() == false || visitor.GetValue().TotalSeconds >= 1.0d)
                    {
                        return results;
                    }

                    double ceiling = Math.Ceiling(1.2d / visitor.GetValue().TotalSeconds);
                    times = times.Multiply(Math.Max(2, (int)ceiling));
                    input = OptimizeOrder(results);
                }
            }
Example #2
0
        public IReport Execute(ITimes times, IParallelism parallelism)
        {
            Report report = new Report();

            foreach (IExecutionGroup @group in this.GroupInstances())
            {
                foreach (IResult result in @group.Execute(times, parallelism))
                {
                    report.AddResult(result);
                }
            }

            return report;
        }