Sample App

Skip to end of metadata
Go to start of metadata

To help you get acquainted with subsystems in dotTrace Performance, let’s profile a simple app. The app is written in C# and is used to display some data (let's assume these are temperature data) in a chart. It communicates with SQL Server storing the temperature database and displays the diagram. 

The app works the following way: The button Load Temperature Data runs the GetTemperature function which communicates with SQL Server and displays the content of a certain table in the Chart component of a Windows form.

What kind of performance issues might the app possibly face? Let's say that the temperature graph is displayed with a significant delay. There are two possible causes of this:

  • Slow response from the database server.
  • Graph drawing takes too much system resources.
This tutorial doesn't provide detailed guidelines on how you should run dotTrace Performance and set profiling options. If you need to get up to date with these operations, you can refer to dotTrace Performance Manual.

Let’s run dotTrace Performance and use subsystems to quickly find out the real cause.

Prerequisites

To repeat the steps of this tutorial, you should obtain the sample app and prepare a SQL database for it. In more details:

  1. Download and unpack the archive with the app.
  2. If you don't have Microsoft SQL Server installed, download and install it. You can use the free Microsoft SQL Server Express version.
  3. Open and execute the SQL script RandomFloatTable.sql located in the same directory with the sample app.
    This will create the database required by the app. The database contains just one table randomly filled with float values.
  4. Open the sample app solution SimpleWeatherApp.sln in Visual Studio.
  5. In the frmMain_Load method, correct the string Properties.Settings.Default.MyConnectionString so that it contains your SQL Server credentials.

Next Page

  • No labels