Version 3.2.1
Track function calls

When this option is enabled, WiredTiger tracks all API calls as well as certain functions that are deemed important for performance, such as eviction-related functions. Tracking is performed by generating a log record when the WiredTiger library enters and exits a tracked function. A log record contains a function name and its timestamp. For the purposes of efficiency, the timestamp on most platforms is obtained directly from the CPU register, so the units of time correspond to processor clock ticks.

By default, the log files are produced in the sub-directory operation_tracking of the database home directory. To change the destination directory, use the path sub-option of the operation_tracking option.

Operation tracking produces two kinds of files: the binary log files and the map file. The map file is needed to convert the binary logs into text. The map file contains the mapping between numeric function ids used in the log files and the human-readable function name. The map file is called optrack-map.<pid>, where pid is the id of the process that generated the map file. Log files have names that look like optrack.<pid>.<tid>, where tid is the numeric id of the WiredTiger session that generated the log file.

To convert binary log files to text, run the wt_optrack_decode.py script in the tools directory of the WiredTiger distribution. The script takes as arguments the list of log files and the name of the map file with the -m option. Suppose you would like to convert the log files generated by a process with pid 1234. Then you would run the script as follows:

python wt_optrack_decode.py -m optrack-map.1234 optrack.1234.*

Enabling operation tracking may generate performance overhead if the tracked functions are executed frequently. Please be aware of this consequence and measure your performance before deciding whether to enable operation tracking.