ANTS Performance Profiler 11

Worked example - Profiling network overheads

This worked example demonstrates how to use ANTS Performance Profiler to profile a .NET executable that exhibits latency problems caused by fetching HTTP data from a network.

Introducing LatencyDemo

This worked example uses LatencyDemo.

LatencyDemo is a simple Windows application that fetches the RSS feeds from the ANTS Memory Profiler and ANTS Performance Profiler forums on the Redgate website.

A copy of LatencyDemo is supplied with ANTS Performance Profiler in %Program Files%\Red Gate\ANTS Performance Profiler 8\Tutorials\CS\Precompiled\LatencyDemo\

Walkthrough

  1. Start ANTS Performance Profiler
  2. Select .NET executable
  3. Enter the path to the demo application LatencyDemo.exe
  4. Click Start Profiling

  5. If required by your configuration, grant elevation permission
  6. The demo application starts
  7. Load the ANTS Memory Profiler RSS feed by clicking ANTS Memory Profiler
  8. Load the ANTS Performance Profiler RSS feed by clicking ANTS Performance Profiler
  9. Click Intro
     
  10. Click Auto test. Focus switches between the tabs 20 times.
  11. In ANTS Performance Profiler, click StopLatencyDemo closes.
     
  12. By clicking the events on the Events bar, find the Method event for a click on Auto test
  13. On the timeline, drag over the time when the tabs were switching, starting from the Method event
  14. Look at the hot stack trace. Time is lost by the tab control, but you can't see why.
  15. Switch to wall clock time.
  16. You should only look at one thread at a time in wall clock time, so find the UI thread.
  17. The time is being lost in System.Net.HttpWebRequest.GetResponse()
  18. Look at the hit count. 40 hits. We're not cacheing the result.
     

Didn't find what you were looking for?