예제 #1
0
        private void CreateParametersForSuite()
        {
            _parameters.Clear();

            _parameters.Add(new NumberOfThreadsParameter(Runner.Process));
            _parameters.Add(new MeasurementTypeParameter(Runner.Process));
            _parameters.Add(new NominalRateParameter(Runner.Process));
            _parameters.Add(new ExecutionTypeParameter(Runner.Process));
            _parameters.Add(new DurationParameter(Runner.Process));

            // Create benchmark related parameters
            foreach (BenchmarkInstance benchmark in _suites.SelectMany(x => x.Benchmarks))
            {
                Parameter selectedParameter
                    = new BenchmarkSelectedParameter(benchmark);
                _parameters.Add(selectedParameter);

                Parameter proportionParameter
                    = new BenchmarkProportionParameter(benchmark);
                _parameters.Add(proportionParameter);
            }

            foreach (var suite in _suites)
            {
                // Create indirect test suite parameters
                foreach (Parameter originalParameter in suite.Parameters.Values)
                {
                    Parameter indirectParameter
                        = new IndirectSuiteParameter(suite, originalParameter);
                    _parameters.Add(indirectParameter);
                }
            }
        }
예제 #2
0
 public void SetConfigurationToDefault()
 {
     foreach (Parameter parameter in _parameters)
     {
         IndirectSuiteParameter indirectParameter = parameter as IndirectSuiteParameter;
         if (indirectParameter != null)
         {
             indirectParameter.Value = indirectParameter.DefaultValue;
         }
     }
 }