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.
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.
Let’s run dotTrace Performance and use subsystems to quickly find out the real cause.
To repeat the steps of this tutorial, you should obtain the sample app and prepare a SQL database for it. In more details:
- Download and unpack the archive with the app.
- If you don't have Microsoft SQL Server installed, download and install it. You can use the free Microsoft SQL Server Express version.
- 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.
- Open the sample app solution SimpleWeatherApp.sln in Visual Studio.
- In the
frmMain_Loadmethod, correct the string
Properties.Settings.Default.MyConnectionStringso that it contains your SQL Server credentials.