public void SimplePerformanceCounterTest()
        {
            Stopwatch           stopwatch = new Stopwatch();
            ViewModelNoAutoInpc vm        = new ViewModelNoAutoInpc();

            stopwatch.Start();
            vm = new ViewModelNoAutoInpc();


            foreach (var i in Enumerable.Repeat(0, 20))
            {
                vm.ChangeName();
                vm.ChangeSalary();
            }

            foreach (var i in Enumerable.Repeat(0, 20))
            {
                vm.Model.FirstName = "skdalfj";
                vm.OnPropertyChanged("NameAndSalary");
                vm.Model.LastName = "sklgjkls";
                vm.OnPropertyChanged("NameAndSalary");
            }
            vm.Model.Salary = 21;
            vm.OnPropertyChanged("NameAndSalary");
            long   fib    = vm.Model.Fibonacci10;
            double fibAvg = vm.Model.Fibonacci30Average;


            stopwatch.Stop();
            long noAutoElapsedTime = stopwatch.ElapsedMilliseconds;

            stopwatch.Reset();

            ViewModelAutoInpc autovm = new ViewModelAutoInpc();

            stopwatch.Start();
            autovm = new ViewModelAutoInpc();


            foreach (var i in Enumerable.Repeat(0, 20))
            {
                autovm.ChangeName();
                autovm.ChangeSalary();
            }

            foreach (var i in Enumerable.Repeat(0, 20))
            {
                autovm.Model.FirstName = DateTime.Now.Ticks.ToString();
                autovm.Model.LastName  = DateTime.Now.Ticks.ToString();
            }
            autovm.Model.Salary = 21;
            fib    = autovm.Model.Fibonacci10;
            fibAvg = vm.Model.Fibonacci30Average;

            stopwatch.Stop();
            long autoElapsedTime = stopwatch.ElapsedMilliseconds;

            Debug.WriteLine("Manual INPC time: {0} \n Automatic INPC time: {1}", noAutoElapsedTime, autoElapsedTime);

            Assert.Less(autoElapsedTime, 4 * noAutoElapsedTime);
        }
        public void SimplePerformanceCounterTest()
        {
            Stopwatch stopwatch = new Stopwatch();
            ViewModelNoAutoInpc vm = new ViewModelNoAutoInpc();

            stopwatch.Start();
            vm = new ViewModelNoAutoInpc();

            foreach ( var i in Enumerable.Repeat( 0, 20 ) )
            {
                vm.ChangeName();
                vm.ChangeSalary();
            }

            foreach (var i in Enumerable.Repeat(0, 20))
            {
                vm.Model.FirstName = "skdalfj";
                vm.OnPropertyChanged( "NameAndSalary" );
                vm.Model.LastName = "sklgjkls";
                vm.OnPropertyChanged( "NameAndSalary" );
            }
            vm.Model.Salary = 21;
            vm.OnPropertyChanged("NameAndSalary");
            long fib = vm.Model.Fibonacci10;
            double fibAvg = vm.Model.Fibonacci30Average;

            stopwatch.Stop();
            long noAutoElapsedTime = stopwatch.ElapsedMilliseconds;

            stopwatch.Reset();

            ViewModelAutoInpc autovm = new ViewModelAutoInpc();

            stopwatch.Start();
            autovm = new ViewModelAutoInpc();

            foreach (var i in Enumerable.Repeat(0, 20))
            {
                autovm.ChangeName();
                autovm.ChangeSalary();
            }

            foreach (var i in Enumerable.Repeat(0, 20))
            {
                autovm.Model.FirstName = DateTime.Now.Ticks.ToString();
                autovm.Model.LastName = DateTime.Now.Ticks.ToString();
            }
            autovm.Model.Salary = 21;
            fib = autovm.Model.Fibonacci10;
            fibAvg = vm.Model.Fibonacci30Average;

            stopwatch.Stop();
            long autoElapsedTime = stopwatch.ElapsedMilliseconds;

            Debug.WriteLine("Manual INPC time: {0} \n Automatic INPC time: {1}", noAutoElapsedTime, autoElapsedTime);

            Assert.Less( autoElapsedTime, 4*noAutoElapsedTime );
        }