Options

Total seconds counts are wrong.

AdamMilAdamMil Posts: 22
My previous post on this seems to have been ignored, so I'm posting again.

I ran the mandelbrot program for about 10 seconds, and the results said Main() (with children) took 262 seconds.

I tried running the application and immediately closing it. Although it ran for less than a second, it said Main() (with children) took over 40 seconds.

What's going on here?

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Adam,

    I've asked Tom to reply to the previous topic again. This is frankly a bit above my head.
  • Options
    He can just reply here.

    I've split my previous topic into two different topics.

    I think that was part of the problem before. One half of my topic was addressed and the other half was not addressed at all.

    So to make things more clear, both for you guys and for potential readers, I've split it into two topics.
  • Options
    Hi Adam,

    I don't know what is going wrong for you here. We use the mandelbrot sample for all our platform testing and have not run into your scenario. Does the same thing happen to you with the simplest windows forms app on your machine (i.e just an empty form). Does it happen everytime with the mandelbrot sample.

    Thanks,

    Tom

    Red Gate Software Ltd.
  • Options
    AdamMilAdamMil Posts: 22
    edited February 21, 2006 4:15AM
    Yes, it happens every time I run the mandelbrot sample. It's always way off, but not always by the same amount. If I run the application for five seconds, sometimes it'll say 30 seconds and sometimes it'll say 300 seconds.

    It also happens when I use a blank windows forms app.

    I'll post a screenshot of this when I get home.
  • Options
    Adam,

    Can you let me know what hardware you're running it on please (type of processor, number of processors, clock speed, O/S, whether it's a virtual machine etc.)

    - Neil
    - Neil Davidson
    Red Gate Software Ltd
  • Options
    OS: Microsoft Windows XP Professional 5.1.2600 SP2 Build 2600
    System: HP Pavilion dv4000 (PC253AV)
    CPU: 1x 1.5ghz Intel M processor (single core)
    RAM: 512MB

    Installed .NET Framework versions:
    2.0.50727.42
    1.1.4322

    More information available here (System Info file, right-click and save somewhere):
    http://www.adammil.net/adam-laptop.nfo
  • Options
    This is just a wild guess on my part, but here it is:

    Do you guys use the RDTSC x86 instruction to retrieve the "time"?

    That's not reliable. For one thing, it's not likely to work properly on machines with multiple CPUs because because whenever a thread switches CPUs, your timings will probably get screwed up. They may even become negative.

    Second, modern laptop CPUs can alter their clock rate. For instance, during periods of low CPU usage, my laptop's clock rate may be only 33 mhz or something. This is of course done to save power.

    With a variable clock-rate CPU, you obviously can't rely on RDTSC to provide wall-clock timing.

    Just a guess,
    -- Adam
  • Options
    Hi,

    you are correct - we are using the rdtsc instruction to measure the wall time.

    Sorry that this does not work correctly on your lap top.

    Thanks for pointing this out. We will address the problem in the next version of ANTS Profiler.

    Tom Harris

    Red Gate Software Ltd
This discussion has been closed.