Table of Contents

Struct QueryDefinitionDescribeData

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

Decoded form of a QueryDefinitionDescribe record.

public readonly struct QueryDefinitionDescribeData
Inherited Members

Constructors

QueryDefinitionDescribeData(byte, long, byte, uint, ushort, short, short, byte, ushort, int, ushort, ushort, ReadOnlyMemory<byte>, ushort, ReadOnlyMemory<byte>)

Construct a decoded query-definition descriptor.

public QueryDefinitionDescribeData(byte threadSlot, long timestamp, byte kind, uint localId, ushort targetComponentType, short primaryIndexFieldIdx, short sortFieldIdx, byte sortDescending, ushort definitionSourceFileId, int definitionSourceLine, ushort definitionSourceMethodId, ushort evaluatorCount, ReadOnlyMemory<byte> evaluatorBlob, ushort fieldDependencyCount, ReadOnlyMemory<byte> fieldDependenciesBlob)

Parameters

threadSlot byte

Typhon thread slot.

timestamp long

Emit timestamp, in Stopwatch ticks.

kind byte

0 = View, 1 = EcsQuery.

localId uint

ViewId or EcsQueryId, per kind.

targetComponentType ushort

Component type id the query targets.

primaryIndexFieldIdx short

Primary index-scan field index, or -1.

sortFieldIdx short

Sort field index, or -1.

sortDescending byte

Non-zero for descending sort.

definitionSourceFileId ushort

Interned file id of the definition site.

definitionSourceLine int

Source line of the definition site.

definitionSourceMethodId ushort

Interned method id of the definition site.

evaluatorCount ushort

Number of evaluator entries in evaluatorBlob.

evaluatorBlob ReadOnlyMemory<byte>

Packed evaluator entries (4 bytes each).

fieldDependencyCount ushort

Number of field-dependency entries in fieldDependenciesBlob.

fieldDependenciesBlob ReadOnlyMemory<byte>

Packed field-dependency entries (2 bytes each).

Properties

DefinitionSourceFileId

Interned file id of the query's definition site (indexes the trace's FileTable).

public ushort DefinitionSourceFileId { get; }

Property Value

ushort

DefinitionSourceLine

Source line of the query's definition site.

public int DefinitionSourceLine { get; }

Property Value

int

DefinitionSourceMethodId

Interned method id of the query's definition site.

public ushort DefinitionSourceMethodId { get; }

Property Value

ushort

EvaluatorBlob

Per-evaluator shape: 4 bytes each (FieldIdx u16, Op u8, Reserved u8). Total bytes = EvaluatorCount * 4.

public ReadOnlyMemory<byte> EvaluatorBlob { get; }

Property Value

ReadOnlyMemory<byte>

EvaluatorCount

Number of evaluator entries packed in EvaluatorBlob.

public ushort EvaluatorCount { get; }

Property Value

ushort

FieldDependenciesBlob

Per-field-dep: 2 bytes each (u16). Total bytes = FieldDependencyCount * 2.

public ReadOnlyMemory<byte> FieldDependenciesBlob { get; }

Property Value

ReadOnlyMemory<byte>

FieldDependencyCount

Number of field-dependency entries packed in FieldDependenciesBlob.

public ushort FieldDependencyCount { get; }

Property Value

ushort

Kind

Definition kind: 0 = View, 1 = EcsQuery.

public byte Kind { get; }

Property Value

byte

LocalId

Local identifier — a ViewId or EcsQueryId depending on Kind.

public uint LocalId { get; }

Property Value

uint

PrimaryIndexFieldIdx

Field index used for the primary index scan, or -1 when there is no index scan.

public short PrimaryIndexFieldIdx { get; }

Property Value

short

SortDescending

Sort direction: non-zero for descending, 0 for ascending.

public byte SortDescending { get; }

Property Value

byte

SortFieldIdx

Field index the results are sorted on, or -1 when unsorted.

public short SortFieldIdx { get; }

Property Value

short

TargetComponentType

Component type id the query targets.

public ushort TargetComponentType { get; }

Property Value

ushort

ThreadSlot

Typhon thread slot the definition was emitted on.

public byte ThreadSlot { get; }

Property Value

byte

Timestamp

Emit timestamp, in Stopwatch ticks.

public long Timestamp { get; }

Property Value

long