views:

46

answers:

1

Hi,

I'm trying to profile an app in c#, never done any kind of profiling before. I haven't been able to find much documentation on the profiler so far maybe someone here might know better.

I have an app that when I click a toolbar button, kicks off a background thread to fetch me some data. The data is then prepared and displayed on the Main thread. I'm trying to profile this process to determine whether the time taken is in the preparation of the data or in the fetching, but I'm not having much luck. If I use the Sampling mode, it only displays the Main thread, if I use the Concurrency view, it gives me a load of information that I'm not after like contention etc.

Cheers if anyone knows something that could help!

Alex

+1  A: 

The VS sampler is suspended during I/O, so if a thread spends nearly all its time in I/O, it will appear to be spending almost no time at all. On the other hand, instrumentation should catch it.

My favorite method is to just pause it while it's working, and examine any thread you like.

Mike Dunlavey
Best way to find hanging threads at pre-qa time.
Tom Anderson
Thanks, this appears to be what was causing my problem.
AlexC