コード例 #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);
                }
            }
コード例 #2
0
ファイル: TestSuit.cs プロジェクト: amacal/Quality.Json
            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);
                }
            }