public void PerformanceTest(object sender, RoutedEventArgs arg) { GC.Collect(); var event4 = new Event4() { Flag = "flag4" }; var sw = Stopwatch.StartNew(); for (int i = 0; i < 100000; i++) { LLQNotifier.Default.Notify(event4); //subscriber4.Test4(); } sw.Stop(); rtb.Text = "\r\nNotify: " + sw.Elapsed; GC.Collect(); var event5 = new Event5() { Flag = "flag5" }; sw = Stopwatch.StartNew(); for (int i = 0; i < 100000; i++) { LLQNotifier.Default.Notify(event5); //subscriber5.Test5(event5); } sw.Stop(); rtb.Text += "\r\nNotify with param: " + sw.Elapsed; }
public void PerformanceTest(object sender, RoutedEventArgs arg) { GC.Collect(); var event4 = new Event4() { Flag = "flag4" }; var sw = Stopwatch.StartNew(); for (int i=0;i<100000;i++) { LLQNotifier.Default.Notify(event4); //subscriber4.Test4(); } sw.Stop(); rtb.Text = "\r\nNotify: " + sw.Elapsed; GC.Collect(); var event5 = new Event5() { Flag = "flag5" }; sw = Stopwatch.StartNew(); for (int i = 0; i < 100000; i++) { LLQNotifier.Default.Notify(event5); //subscriber5.Test5(event5); } sw.Stop(); rtb.Text += "\r\nNotify with param: " + sw.Elapsed; }