dotTrace 2016.1 Help

File I/O

The File I/O 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 I/O 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 I/O event in Interval Filters. The methods will be shown on top of the Top Methods in the Call Stack window.

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

File I/O: File Name

The File I/O: 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.

file_i_o_filename_1

pos_1 File name.

pos_2 Total time spent on file I/O operations with the file summed up for all selected threads.

pos_3 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 Interval Filters will show the following:
File I/O 45 ms 45%

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

To apply the File I/O: 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.

file_i_o_filename_2

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.

file_i_o_filename_table

To open the File I/O window:

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

As well as the File I/O: 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 I/O: Direction

The File I/O: 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.

file_i_o_direction_1

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

pos_2 Total time spent on read or write operation summed up for all selected threads.

pos_3 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 Interval Filters will show the following:
File I/O 45 ms 45%

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

To apply the File I/O: 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.

file_i_o_direction_2
Last modified: 19 August 2016