Hello. I have an application which synchronize one SQL Server 2008 with one SQL Server 2008 Express. I added a performance measurement and found a confusing result of time used for synchronization. Here is the code that I used:
Stopwatch timer = new Stopwatch();
timer.Start();
SyncStatistics stats = syncOrchestrator.Synchronize();
timer.Stop();
long result1 = (stats.SyncEndTime - stats.SyncStartTime).Milliseconds;
long result2 = timer.ElapsedMilliseconds
When I compare result1 with result2, I found these two numbers didn't match. Though I don't expect thest two are the same, sometimes the gap is pretty big.
For example, in one test, result1 is 900 ms with result2 is 19400 ms.
Could someone tell me what causes such difference?
Edited byyunwwangWednesday, August 8, 2012 8:57 PM