DataCollection.MarkProfile 메서드

MarkProfile 메서드를 사용하면 .vsp 파일에 프로필 표시가 삽입됩니다.표시를 삽입하려면 MarkProfile 함수가 포함된 스레드의 프로파일링이 ON이어야 합니다.

네임스페이스:  Microsoft.VisualStudio.Profiler
어셈블리:  Microsoft.VisualStudio.Profiler(Microsoft.VisualStudio.Profiler.dll)

구문

‘선언
Public Shared Function MarkProfile ( _
    markId As Integer _
) As MarkOperationResult
public static MarkOperationResult MarkProfile(
    int markId
)
public:
static MarkOperationResult MarkProfile(
    int markId
)
static member MarkProfile : 
        markId:int -> MarkOperationResult 
public static function MarkProfile(
    markId : int
) : MarkOperationResult

매개 변수

  • markId
    형식: System.Int32
    삽입할 마커입니다.마커는 0보다 크거나 같아야 합니다.

반환 값

형식: Microsoft.VisualStudio.Profiler.MarkOperationResult
반환 값 MarkOperationResult는 열거형입니다.

설명

MarkProfile 함수가 포함된 스레드가 프로파일링되는 경우 코드가 실행될 때마다 .vsp 파일에 표시 값이 삽입됩니다.MarkProfile은 여러 번 호출할 수 있습니다.

프로필 표시는 범위에서 전역적입니다.예를 들어, 한 스레드에 삽입된 프로필 표시를 사용하여 .vsp 파일의 임의 스레드에 있는 데이터 세그먼트의 시작 또는 끝을 표시할 수 있습니다.

Mark 명령 또는 API 함수(CommentMarkAtProfile, CommentMarkProfile 또는 MarkProfile)로 표시와 주석을 삽입할 때는 표시 프로필 함수가 포함된 스레드의 프로파일링 상태가 ON이어야 합니다.

중요중요

MarkProfile 메서드는 계측에만 사용해야 합니다.

예제

다음 예제에서는 MarkProfile 메서드를 보여 줍니다.

        public void ExerciseMarkProfile()
        {
            // Declare and initialize variables to pass to 
            // MarkProfile.  The values of these parameters 
            // are assigned based on the needs of the code;
            // and for the sake of simplicity in this example, 
            // the variables are assigned arbitrary values.
            int markId = 03;

            // Declare enumeration to hold return value of 
            // call to MarkProfile.
            MarkOperationResult markResult;

            markResult = DataCollection.MarkProfile(
                markId);

            Console.WriteLine("MarkProfile returned {0}", markResult);
        }

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

DataCollection 클래스

Microsoft.VisualStudio.Profiler 네임스페이스