Example #1
0
        public static void FromAssembly(PerfTesterCollection testers, Assembly a)
        {
            Console.WriteLine("FromAssembly enter");
            if (testers==null)
                throw new ArgumentNullException("testers");
            if (a==null)
                throw new ArgumentNullException("a");

            foreach(Type t in a.GetExportedTypes())
            {
                if (TypeHelper.HasCustomAttribute(t, typeof(PerfTesterAttribute)))
                {
                    Console.WriteLine("PerfTesterAttribute {0}", t);
                    PerfTesterAttribute attr =
                        (PerfTesterAttribute)TypeHelper.GetFirstCustomAttribute(
                        t,
                        typeof(PerfTesterAttribute)
                        );
                    Console.WriteLine("PerfTesterAttribute {0}", attr.Description);
                    PerfTester tester = new PerfTester(t, attr);

                    testers.Add(tester);
                }
                else
                    Console.WriteLine("No custom attr");
            }
        }
Example #2
0
        public static void FromAssembly(PerfTesterCollection testers, Assembly a)
        {
            if (testers==null)
                throw new ArgumentNullException("testers");
            if (a==null)
                throw new ArgumentNullException("a");

            foreach(Type t in a.GetExportedTypes())
            {
                if (TypeHelper.HasCustomAttribute(t,typeof(PerfTesterAttribute)))
                {
                    PerfTesterAttribute attr =
                        (PerfTesterAttribute)TypeHelper.GetFirstCustomAttribute(
                        t,
                        typeof(PerfTesterAttribute)
                        );
                    PerfTester tester = new PerfTester(t,attr);

                    testers.Add(tester);
                }
            }
        }
Example #3
0
 void tester_ResultsChange(object sender, PerfTester.ResultsChangeEventArgs results)
 {
     //Updating Charts
     OnResultsChange(this, new ResultsChangedEventArgs(results.CurrentResults));
 }