Udostępnij za pośrednictwem


Metoda DataCollection.CommentMarkAtProfile —

Metoda CommentMarkAtProfile wstawia wartość sygnatury czasowej, znak numeryczne i ciąg komentarza w pliku .vsp.Wartość sygnatury czasowej może służyć do synchronizacji zdarzenia zewnętrzne.Profilowanie dla wątku, zawierającą funkcję CommentMarkAtProfile musi być na znak i komentarz ma zostać wstawiony.

Przestrzeń nazw:  Microsoft.VisualStudio.Profiler
Zestaw:  Microsoft.VisualStudio.Profiler (w Microsoft.VisualStudio.Profiler.dll)

Składnia

'Deklaracja
Public Shared Function CommentMarkAtProfile ( _
    timestamp As Long, _
    markId As Integer, _
    markText As String _
) As MarkOperationResult
public static MarkOperationResult CommentMarkAtProfile(
    long timestamp,
    int markId,
    string markText
)
public:
static MarkOperationResult CommentMarkAtProfile(
    long long timestamp, 
    int markId, 
    String^ markText
)
static member CommentMarkAtProfile : 
        timestamp:int64 * 
        markId:int * 
        markText:string -> MarkOperationResult 
public static function CommentMarkAtProfile(
    timestamp : long, 
    markId : int, 
    markText : String
) : MarkOperationResult

Parametry

  • timestamp
    Typ: System.Int64
    Liczba całkowita 64-bitowe, reprezentującego wartość sygnatury czasowej.
  • markId
    Typ: System.Int32
    Numeryczne Wstaw znacznik.Znacznik musi większa lub równa 0 (zero).
  • markText
    Typ: System.String
    Wskaźnik ciąg tekstowy do wstawienia.Ciąg musi być mniejsza niż 256 znaków, łącznie z NULL terminator.

Wartość zwracana

Typ: Microsoft.VisualStudio.Profiler.MarkOperationResult
Wartość zwracana, MarkOperationResult, jest wyliczeniem.

Uwagi

Stan profilowania dla wątku, który zawiera funkcję profilu znak musi być gdy znaczniki i komentarze są wstawiane za pomocą polecenia znak lub z funkcji API (CommentMarkAtProfile, CommentMarkProfile lub MarkProfile).Profil znaki są globalne w zakresie.Na przykład znak profilu, dodaje się w jednym wątku można oznaczyć początek lub koniec segmentu danych w dowolnym wątku w pliku .vsp.

Ważna uwagaWażne

CommentMarkAtProfile metody należy używać z Instrumentacji tylko.

Przykłady

Poniższy przykład ilustruje wywołanie metody CommentMarkAtProfile.

        public void ExerciseCommentMarkAtProfile()
        {
            // Declare and initalize variables to pass to 
            // CommentMarkAtProfile.  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.
            long timestamp = 0x1111;
            int markId = 01;
            string markText = "Exercising CommentMarkAtProfile...";

            // Declare MarkOperationResult Enumerator.  
            // Holds return value from call to CommentMarkAtProfile.
            MarkOperationResult markResult;

            markResult = DataCollection.CommentMarkAtProfile(
                timestamp,
                markId,
                markText);

            // Check result of CommentMarkAtProfile call.
            Console.WriteLine("CommentMarkAtProfile returned {0}",
                markResult); 
        }

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

DataCollection Klasa

Przestrzeń nazw Microsoft.VisualStudio.Profiler