dotTrace 2016.3 Help

File Operations

The File Operations event is used to indicate time intervals where file input/output operations took place. This includes reading from and writing to physical disk and system cache. Therefore, file I/O operations are not equal to disk I/O operations.

File operations are very important for performance analysis as access to file system might require significant time. For example, if your application frequently reads a particular file, it will be more effective to cache the file data.

Select the File Operations event to analyze file operations in your app: evaluate how file operations affect performance, what methods do most of the job, and so on. For example, to determine methods in a thread that perform the majority of file I/O operations, select the thread in the Threads diagram and the File Operations event in Events. The methods will be shown on top of the Methods and Subsystems in the Call Stack window.

When the File Operations event is selected, the Filters window contains sub-filters that allow you to refine the resulting filter: File Operations: File Name and File Operations: Direction.

File Operations: File Name

The File Operations: File Name sub-filter shows distribution of file I/O operations time between particular files. Use this sub-filter to determine files your application works with.

/help/img/dotnet/2016.3/file_i_o_filename_1.png

/help/img/dotnet/2016.3/pos_1.png File name.

/help/img/dotnet/2016.3/pos_2.png Total time spent on file I/O operations with the file summed up for all selected threads.

/help/img/dotnet/2016.3/pos_3.png The percentage of time spent on file I/O operations with the file relative to the total selected time.

For example, your application has two threads you are interested in: Thread#1 and Thread#2. Profiling lasted 50 ms. Thread#1 worked with file1.txt for 10 ms and with file2.txt for 30 ms. Thread#2 worked with file1.txt for 5 ms. The Events will show the following:
File Operations 45 ms 45%

If you select the File Operations event, the File Operations: File Name sub-filter will show you the following:
file1.txt 15 ms 15%
file2.txt 30 ms 30%

To apply the File Operations: File Name filter:

  • Check the desired file name in the filter.

After you select a file name, other filters will show data only for the time intervals where threads performed file I/O operations with the selected file.

/help/img/dotnet/2016.3/file_i_o_filename_2.png

File I/O Window

If you want to see full file path or find a specific file by its path, open the File I/O window.

/help/img/dotnet/2016.3/file_i_o_filename_table.png

To open the File I/O window:

  • Do one of the following:
    • Use the menu View | File I/O.
    • Click the /help/img/dotnet/2016.3/ThemedIcon.DatailsTableOpen.Screen.[Gray].png button in the File Operations: File Name filter.

As well as the File Operations: File Name filter, the File I/O window also can work as a filter by specific files.

To apply the filter by a particular file:

  • Do one of the following:
    • Check the desired file.
    • Double-click on the desired file.
    • Select the desired file and press Enter
    • In the context menu of the desired file, choose Select And Clear Others.

To apply the filter by a number of files:

  • Do one of the following:
    • Select the desired file and press Space.
    • In the context menu of the desired file, choose Select As Filter.
    This will add the file to selection.

To copy file path to the clipboard:

  • In the context menu of the desired file, choose Copy To Clipboard.

To find a particular file by its path:

  • In the search text box located on top of the File I/O window, start typing file's path. As you type, the list of files narrows down, suggesting the ones that match the entered string.

File Operations: Direction

The File Operations: Direction sub-filter shows distribution of file I/O between read and write operations. Use this sub-filter to determine what type of file I/O operations dominates.

/help/img/dotnet/2016.3/file_i_o_direction_1.png

/help/img/dotnet/2016.3/pos_1.png I/O direction: Read, Write, or Not Selected which is equal to "the filter is not applied".

/help/img/dotnet/2016.3/pos_2.png Total time spent on read or write operation summed up for all selected threads.

/help/img/dotnet/2016.3/pos_3.png The percentage of time spent on read or write operation relative to the total selected time.

For example, your application has two threads you are interested in: Thread#1 and Thread#2. Profiling lasted 50 ms. Thread#1 worked read from file1.txt for 10 ms and wrote to it for 15 ms. Thread#2 only read from file1.txt for 20 ms. The Events will show the following:
File Operations 45 ms 45%

If you select the File Operations event, the File Operations: Direction sub-filter will show you the following:
Read 30 ms 30%
Write 15 ms 15%
Not Selected 45 ms

To apply the File Operations: Direction filter:

  • Check the desired direction in the filter.

After you select a direction, other filters will show data only for the time intervals where threads performed the selected type of file I/O operations.

/help/img/dotnet/2016.3/file_i_o_direction_2.png
Last modified: 3 April 2017