Σημείωμα
Η πρόσβαση σε αυτήν τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να εισέλθετε ή να αλλάξετε καταλόγους.
Η πρόσβαση σε αυτήν τη σελίδα απαιτεί εξουσιοδότηση. Μπορείτε να δοκιμάσετε να αλλάξετε καταλόγους.
The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To see the documentation for these versions, set the Visual Studio Version selector control for this article to Visual Studio 2017 or later. It's found at the top of the table of contents on this page.
The TraceInfo class is used to access useful properties about a trace being analyzed or relogged.
Syntax
class TraceInfo
{
public:
TraceInfo(const TRACE_INFO_DATA& data);
const unsigned long& LogicalProcessorCount() const;
const long long& TickFrequency() const;
const long long& StartTimestamp() const;
const long long& StopTimestamp() const;
std::chrono::nanoseconds Duration() const;
};
Remarks
Subtract the StartTimestamp from StopTimestamp to obtain the number of ticks elapsed during the whole trace. Use TickFrequency to convert the resulting value into a time unit. For an example of converting ticks to time, see EVENT_DATA.
If you don't want to convert ticks yourself, the TraceInfo class provides a member function that returns the trace duration in nanoseconds. Use the standard C++ chrono library to convert this value into other time units.
Members
Constructors
Functions
Duration
LogicalProcessorCount
StartTimestamp
StopTimestamp
TickFrequency
Duration
std::chrono::nanoseconds Duration() const;
Return Value
The duration of the activity in nanoseconds.
LogicalProcessorCount
const unsigned long& LogicalProcessorCount() const;
Return Value
The number of logical processors on the machine where the trace was collected.
StartTimestamp
const long long& StartTimestamp() const;
Return Value
A tick value captured at the time the trace was started.
StopTimestamp
const long long& StopTimestamp() const;
Return Value
A tick value captured at the time the trace was stopped.
TickFrequency
const long long& TickFrequency() const;
Return Value
The number of ticks per second to use when evaluating a duration measured in ticks.
TraceInfo
TraceInfo(const TRACE_INFO_DATA& data);
Parameters
data
The data containing the information about the trace.