Competition: What’s your favorite Redgate tool? Enter now.

Incorrect measure time

Hi!

I'm evaluating the latest version of ANTS Profiler 3 to see if it fits my business. For a simple test I encounterd a strange behaviour regarding the reports and wonder if there is an explanation to it or maybe a fix?

I was running the following code in a .NET Console App:
using Microsoft.SharePoint; 

...

using(SPSite site = new SPSite(@"http://localhost")) 
{ 
   using(SPWeb web = site.OpenWeb()) 
   { 
      SPList list = new SPList["Test"]; 
      for(int i = 0; i < 1000; i ++) 
      { 
          list.items[0].Delete(); 
      } 
   } 
} 

In the report from ANTS Profiler I could see that the execution took approximately 7 minutes (felt longer than that).

I thought that the time was a little bit high and made a test by adding:
Console.WriteLine(DateTime.Now);
in the beginning and at the end of the code. The result I could measure (difference between the timestamp at the beginning and the one at the end) was approximately 5.5 minutes.

The test was made in a Virtual environment (VPC 2007) running Win 2003 Std R2 SP2 and Visual Studio 2005

Any ideas?

Comments

  • Hi,

    Unfortunately ANTS Profiler relies on high performance timers to get accurate results. In virtual machines these high performance timers are a little less than reliable - our experience has shown that the relative timings of the lines should be fine but the absolute values shown can be off.

    We are looking for ways to improve the presentation of the results when this happens in future versions.

    Sorry you have it these problems, if I can be of any further help please let me know

    James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
  • Ok, thank you for the answer!

    Any ideas if this issue affects virtual machines in general or may it work with VMWare or maybee Hyper-V? VPC is not the best choice of virtual machine. :wink:
  • I'm not aware of any VM platform which show the times in seconds as sensible values - you might be better off turning on the tick count columns in the results grids. You should be able to do this by right clicking on the grid header and choosing "choose columns".

    James
    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
Sign In or Register to comment.