Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public void Test5(Event5 e)
 {
 }
Exemplo n.º 4
0
 public void Test5(Event5 e)
 {
 }