- Open the MassFileProcessing.sln solution in Visual Studio.
- In case you have dotTrace integrated with Visual Studio, run the profiler by choosing dotTrace ReSharper | Profile | Profile Startup Project (Performance)..
Otherwise, run dotTrace from the Windows Start menu. In dotTrace, select New Session \ Local, Profile Application | Standalone application.
- In Profiler Configuration, leave the Sampling profiling type. The thing is Timeline information can be gathered only in the sampling mode.
In case you ran dotTrace as a standalone app, you should also specify the path to the release executable of our sample app in Application.
- After you click Run, dotTrace runs our app and a special dotTrace 6.0 Controller window used to control the profiling process.
- Note that after you start profiling, dotTrace starts showing the real-time data about CPU usage and I/O operations in our app.
Now, we should reproduce a performance issue in our app.
- Click the Select Files button and choose five text files that come with the app in the Text Files folder.
- Click the Process Files button to start file processing.
As you can see, the app lags very badly. Actually, you are even unable to see the progress of file processing until it is finished and the All files were processed successfully message is shown.
- Collect a performance snapshot by clicking Get Snapshot in the dotTrace 6.0 Controller window. The collected snapshot will be opened in dotTrace.
- Close the app. This will also close the controller window.
- In dotTrace, switch to the Timeline view by clicking the Threads Timeline button.