Example #1
0
        public void AddSuiteFromClass(string suiteClassName)
        {
            Type suiteType = Type.GetType(suiteClassName, true);
            var  suite     = (BenchmarkSuite)Activator.CreateInstance(suiteType);
            var  instance  = new BenchmarkSuiteInstance(suite);

            AddSuite(instance);
        }
Example #2
0
        public void RemoveSuiteByName(string suiteName)
        {
            BenchmarkSuiteInstance suite = FindSuite(suiteName);

            if (suite != null)
            {
                _parameters.RemoveSuite(suite);
                _suites.Remove(suite);
            }
        }
Example #3
0
        public void AddSuitesFromAssembly(string assemblyName)
        {
            // Load assembly
            Assembly assembly = Assembly.LoadFrom(assemblyName);

            // Find benchmark suites
            foreach (Type type in assembly.GetTypes())
            {
                if (type.IsSubclassOf(typeof(BenchmarkSuite)) && !type.IsAbstract)
                {
                    BenchmarkSuite suite    = Activator.CreateInstance(type) as BenchmarkSuite;
                    var            instance = new BenchmarkSuiteInstance(suite);
                    _suites.Add(instance);
                    _parameters.AddSuite(instance);
                }
            }
        }
Example #4
0
        public void RemoveSuite(BenchmarkSuiteInstance suite)
        {
            _parameters.RemoveSuite(suite);

            _suites.Remove(suite);
        }
Example #5
0
 public void AddSuite(BenchmarkSuiteInstance instance)
 {
     _suites.Add(instance);
     _parameters.AddSuite(instance);
 }
Example #6
0
        public void AddSuite(BenchmarkSuite suite)
        {
            var instance = new BenchmarkSuiteInstance(suite);

            AddSuite(instance);
        }