dotTrace 2017.2 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.

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 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.

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 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.

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 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.

file i o direction 2
Last modified: 14 December 2017