dot Trace self attach API - measurement options

How can I start a self attached profiler with sampling and thread time measurement?

 

0
2 comments

Currently, It's not possible to specify time measurement in SelfAttach.Attach parameters. You're welcome to comment or vote for this feature request: https://youtrack.jetbrains.com/issue/PROF-692

Profiling type can be specified by setting ProfilingType = ProfilingType.Performance for Sampling or ProfilingType = ProfilingType.Timeline for Timeline profiling type. For example:

SelfAttach.Attach(new SaveSnapshotProfilingConfig()
          {
            RedistDir = distrPath,
            ProfilingType = ProfilingType.Timeline,
            ListFile = listFile
          });

 

0

This functionality is available since 2017.3 version of dotTrace: you need to specify PerformaceMeterKind field. For example:

SelfAttach.Attach(new SaveSnapshotProfilingConfig()
{
ProfilingControlKind = ProfilingControlKind.Api,
PerformaceMeterKind = PerformaceMeterKind.PerformanceCounter,
SaveDir = @"C:\Temp\",
RedistDir = @"C:\ProfilingSDK",
ProfilingType = ProfilingType.Performance,
ListFile = @"C:\Temp\snapshot_list.xml",
});

0

Please sign in to leave a comment.