API Reference
MeasureProfiler class methods
Item | Returns | Description |
---|---|---|
GetFeatures() | enum MeasureFeatures: uint | Returns a set of features currently active in the profiler: Bit flags in the
|
StartCollectingData() | Start collecting profiling data. Doesn't throw any errors even if the application is run with profiling disabled. | |
StartCollectingData(string groupName) | [Internal use only] Start collecting profiling data. Doesn't throw any errors even if the application is run with profiling disabled. groupName is the name of the collected data block. | |
StopCollectingData() | Stop collecting profiling data. Current data will persist in memory so next time you start taking measurements with StartCollectingData() , the new data will be added to the current data. This method doesn't save the collected data block to the disk. Doesn't throw any errors even if the application is run with profiling disabled. Important! This method is not applicable to the Timeline profiling type and will be ignored by the profiler. | |
SaveData() | Stop collecting data if needed and save all collected data blocks to the disk. After saving a snapshot, the collected data is reset. Doesn't throw any errors even if the application is run with profiling disabled. | |
SaveData(string name) | [Internal use only] Stop collecting data if needed and save all collected data blocks to the disk. After saving a snapshot, the collected data is reset. Doesn't throw any errors even if the application is run with profiling disabled. name is the name of the collected data blocks. It is not a filename. | |
Detach() | Detach the profiler from the profiled process. Does nothing if detaching is disabled in the profiler. To check whether the detaching is enabled, use MeasureProfiler.GetFeatures() with MeasureFeatures.Detach flag. Doesn't throw any errors even if the application is run with profiling disabled. | |
DropData() | Stop collecting data if needed and drop all collected data blocks. Doesn't throw any errors even if the application is run with profiling disabled. |
The profiling API
The self-profiling API
SelfAttach class properties
Item | Type | Description |
---|---|---|
State | enum SelfApiState {None, Inactive, Active} | Indicates the profiler state.
|
SelfAttach class methods
Item | Description |
---|---|
Attach(BaseProfilingConfig baseConfig) | Attaches the profiler to the calling application with supplied configuration baseConfig . |
Show() | Shows the profiling controller to a user. |
BaseProfilingConfig class public fields
Item | Type | Description |
---|---|---|
ProfilingControlKind | enum ProfilingControlKind {None, Manual, Api} | Defines the profiling control method.
|
ProfilingType | enum ProfilingType {Performance, Memory, Timeline} | Defines the profiling method.
|
PerformaceMeterKind | enum PerformaceMeterKind {Rdtsc, PerformanceCounter, ThreadTime, ThreadCycleTime} | Defines the time measurement method.
|
RedistDir | string | Defines location of dotTrace SDK redistributables. By default, they are searched in the same folder where JetBrains.Profiler.Windows.Api.dll is located. |
BaseSnapshotProfilingConfig class public fields
Item | Type | Description |
---|---|---|
SaveDir | string | Defines a path and a base filename for the resulting snapshot. Required for this configuration. |
SnapshotFormat | enum {Compressed, Uncompressed} | Defines a file format for a snapshot: compressed or uncompressed. By default, it is compressed. |
SaveSnapshotProfilingConfig class public fields
Item | Type | Description |
---|---|---|
ListFile | string | Defines a filename for a file which lists snapshots collected during profiling. Required for this configuration. Do NOT create this file manually, it will be created automatically during profiling! Do NOT open this file until the SelfAttach.State is in the None state! |
ExecutableSnapshotProfilingConfig class public fields
Item | Type | Description |
---|---|---|
Executable | string | Defines the path to the executable file to run after profiling is completed. The snapshot path will be passed as a parameter to this executable file. Required for this configuration. |