Table of Contents

Struct PageCacheEventData

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

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

kind TraceEventKind

Page-cache event kind.

threadSlot byte

Typhon thread slot.

startTimestamp long

Span start, in Stopwatch ticks.

durationTicks long

Span duration, in Stopwatch ticks.

spanId ulong

Span id.

parentSpanId ulong

Parent span id, or 0.

traceIdHi ulong

High 64 bits of the trace id, or 0.

traceIdLo ulong

Low 64 bits of the trace id, or 0.

filePageIndex int

Target file page index (meaningless for Flush).

pageCount int

Contiguous page-run length (present per optionalFieldMask).

optionalFieldMask byte

Bit mask of optional trailing fields present.

dirtyBit byte

Eviction dirty flag; meaningful only when the mask sets OptDirtyBit.

sourceLocationId ushort

Source-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

byte

DurationTicks

Span duration, in Stopwatch ticks (0 for the PageEvicted marker).

public long DurationTicks { get; }

Property Value

long

FilePageIndex

Required for Fetch/DiskRead/DiskWrite/AllocatePage; meaningless for Flush.

public int FilePageIndex { get; }

Property Value

int

HasDirtyBit

True when the record carried the optional DirtyBit field (mask bit OptDirtyBit).

public bool HasDirtyBit { get; }

Property Value

bool

HasPageCount

True when the record carried the optional PageCount field (mask bit OptPageCount).

public bool HasPageCount { get; }

Property Value

bool

HasSourceLocation

True when the record carried a non-zero SourceLocationId.

public bool HasSourceLocation { get; }

Property Value

bool

HasTraceContext

True when a W3C trace context (TraceIdHi/TraceIdLo) was present on the wire.

public bool HasTraceContext { get; }

Property Value

bool

Kind

Which page-cache event kind this record decodes to.

public TraceEventKind Kind { get; }

Property Value

TraceEventKind

OptionalFieldMask

Bit mask of the optional trailing fields present — see the Opt* constants on PageCacheEventCodec.

public byte OptionalFieldMask { get; }

Property Value

byte

PageCount

Required for Flush; optional for DiskWrite (contiguous run length); meaningless for Fetch/DiskRead/AllocatePage.

public int PageCount { get; }

Property Value

int

ParentSpanId

Span id of the parent span, or 0 when none.

public ulong ParentSpanId { get; }

Property Value

ulong

SourceLocationId

Source-location id assigned by SourceLocationGenerator (#302). Zero when the wire record didn't carry source attribution.

public ushort SourceLocationId { get; }

Property Value

ushort

SpanId

Span id of this event.

public ulong SpanId { get; }

Property Value

ulong

StartTimestamp

Span start timestamp, in Stopwatch ticks.

public long StartTimestamp { get; }

Property Value

long

ThreadSlot

Typhon thread slot the event was emitted on.

public byte ThreadSlot { get; }

Property Value

byte

TraceIdHi

High 64 bits of the W3C trace id. 0 when no trace context was carried — see HasTraceContext.

public ulong TraceIdHi { get; }

Property Value

ulong

TraceIdLo

Low 64 bits of the W3C trace id. 0 when no trace context was carried — see HasTraceContext.

public ulong TraceIdLo { get; }

Property Value

ulong