- Open the MassFileProcessing.sln solution in Visual Studio.
- In case you have dotTrace integrated with Visual Studio, run the profiler by choosing ReSharper | Profile | Profile Startup Project (Performance).
Otherwise, run dotTrace from the Windows Start menu. In dotTrace, select New Session \ | Local, Profile Application | Standalone.
- In Profiling type, select Timeline. 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 controller window used to control the profiling process.
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 timeline profiling snapshot by clicking Get Snapshot’n’Wait in the controller window. The snapshot will be opened in Timeline Viewer.
- Close the app. This will also close the controller window.