Struct PageCacheEventData
Decoded form of any page-cache span event. Covers six page-cache kinds: PageCacheFetch, PageCacheDiskRead, PageCacheDiskWrite, PageCacheAllocatePage, PageCacheFlush, and PageEvicted (zero-duration marker span). Which of FilePageIndex and PageCount are set depends on the kind.
public readonly struct PageCacheEventData
- Inherited Members
Constructors
PageCacheEventData(TraceEventKind, byte, long, long, ulong, ulong, ulong, ulong, int, int, byte, byte, ushort)
Construct a decoded page-cache event. Optional fields default to absent (0).
public PageCacheEventData(TraceEventKind kind, byte threadSlot, long startTimestamp, long durationTicks, ulong spanId, ulong parentSpanId, ulong traceIdHi, ulong traceIdLo, int filePageIndex, int pageCount, byte optionalFieldMask, byte dirtyBit = 0, ushort sourceLocationId = 0)
Parameters
kindTraceEventKindPage-cache event kind.
threadSlotbyteTyphon thread slot.
startTimestamplongSpan start, in Stopwatch ticks.
durationTickslongSpan duration, in Stopwatch ticks.
spanIdulongSpan id.
parentSpanIdulongParent span id, or 0.
traceIdHiulongHigh 64 bits of the trace id, or 0.
traceIdLoulongLow 64 bits of the trace id, or 0.
filePageIndexintTarget file page index (meaningless for Flush).
pageCountintContiguous page-run length (present per
optionalFieldMask).optionalFieldMaskbyteBit mask of optional trailing fields present.
dirtyBitbyteEviction dirty flag; meaningful only when the mask sets OptDirtyBit.
sourceLocationIdushortSource-location id, or 0 when no source attribution was carried.
Properties
DirtyBit
Phase 5: dirty-bit for PageEvicted (1 if the displaced page was dirty, 0 otherwise).
public byte DirtyBit { get; }
Property Value
DurationTicks
Span duration, in Stopwatch ticks (0 for the PageEvicted marker).
public long DurationTicks { get; }
Property Value
FilePageIndex
Required for Fetch/DiskRead/DiskWrite/AllocatePage; meaningless for Flush.
public int FilePageIndex { get; }
Property Value
HasDirtyBit
True when the record carried the optional DirtyBit field (mask bit OptDirtyBit).
public bool HasDirtyBit { get; }
Property Value
HasPageCount
True when the record carried the optional PageCount field (mask bit OptPageCount).
public bool HasPageCount { get; }
Property Value
HasSourceLocation
True when the record carried a non-zero SourceLocationId.
public bool HasSourceLocation { get; }
Property Value
HasTraceContext
public bool HasTraceContext { get; }
Property Value
Kind
Which page-cache event kind this record decodes to.
public TraceEventKind Kind { get; }
Property Value
OptionalFieldMask
Bit mask of the optional trailing fields present — see the Opt* constants on PageCacheEventCodec.
public byte OptionalFieldMask { get; }
Property Value
PageCount
Required for Flush; optional for DiskWrite (contiguous run length); meaningless for Fetch/DiskRead/AllocatePage.
public int PageCount { get; }
Property Value
ParentSpanId
Span id of the parent span, or 0 when none.
public ulong ParentSpanId { get; }
Property Value
SourceLocationId
Source-location id assigned by SourceLocationGenerator (#302). Zero when the wire record didn't carry source attribution.
public ushort SourceLocationId { get; }
Property Value
SpanId
Span id of this event.
public ulong SpanId { get; }
Property Value
StartTimestamp
Span start timestamp, in Stopwatch ticks.
public long StartTimestamp { get; }
Property Value
ThreadSlot
Typhon thread slot the event was emitted on.
public byte ThreadSlot { get; }
Property Value
TraceIdHi
High 64 bits of the W3C trace id. 0 when no trace context was carried — see HasTraceContext.
public ulong TraceIdHi { get; }
Property Value
TraceIdLo
Low 64 bits of the W3C trace id. 0 when no trace context was carried — see HasTraceContext.
public ulong TraceIdLo { get; }