API Reference
Profiling API
MeasureProfiler class methods
Item | Returns | Description |
---|---|---|
|
| Returns a set of features currently active in the profiler: Bit flags in the
|
| Start collecting profiling data. | |
| [Internal use only] | |
| Stop collecting profiling data. Current data will persist in memory so next time you start taking measurements with | |
| Stop collecting data if needed and save all collected data blocks to the disk. | |
| [Internal use only] | |
| Detach the profiler from the profiled process. Does nothing if detaching is disabled in the profiler. To check whether the detaching is enabled, use | |
| Stop collecting data if needed and drop all collected data blocks. |
Self-profiling API
DotTrace class methods
Item | Returns | Description |
---|---|---|
| Initializes the profiler. This method is a simplified way to call the | |
|
| (We recommend that you use |
| Attaches the profiler to the current process using the default profiling configuration. | |
| Attaches the profiler to the current process using the specified profiling | |
| Starts collecting performance data. The profiler changes its state from "Stopped" to "Started". If the profiler is already in "Started" state, the command is ignored. | |
| Takes a performance snapshot of the current process. All collected data is saved to files specified in the configuration. Note that after saving the data, profiler goes to the "Stopped" state. To start collecting data again, call | |
| Run this method to discard the collected data. Note that after discarding the data, the profiler goes to the "Stopped" state. To start collecting data again, call | |
| Stops collecting performance data. The profiler changes its state from "Started" to "Stopped". If the profiler is already in the "Stopped" state, the command is ignored. It is not necessary to call this method before taking a snapshot. Note: The command is supported only if the profiler API is used to control session. Otherwise, the command is ignored. | |
|
| Returns paths to collected snapshot index files. For each collected snapshot, a separate index file is returned. Note: To share a snapshot, you must copy not only the index file but all files. In such cases, it's more convenient to use GetCollectedSnapshotFilesArchive(). |
|
| Returns paths to all collected snapshot files. For each collected snapshot, more than one file is returned. |
|
| Returns a path to the zip file containing all collected snapshot files (including index files). Returns |
| Detaches the profiler from the current process. Call it after you finish profiling. |
DotTrace.Config class methods
Item | Returns | Description |
---|---|---|
|
| Specifies the path to the snapshot index file. If you take more than one snapshot, the first snapshot will get the specified filename. Others will additionally get the suffix |
|
| Specifies the path to the directory where snapshot files must be saved (names will be auto-generated). The directory must already exist. |
|
| Specifies the Timeline profiling type for the session. |