Table of Contents

Class ProfilerSessionMetadata

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Static description of the profiling session, passed to each exporter once via Initialize(ProfilerSessionMetadata). Holds everything the exporter needs to write the header + metadata tables.

public sealed class ProfilerSessionMetadata
Inheritance
ProfilerSessionMetadata
Inherited Members

Remarks

All fields are immutable for the lifetime of the session — set once at TyphonProfiler.Start and never mutated. Multiple exporters can safely read them concurrently without synchronization.

Constructors

ProfilerSessionMetadata(SystemDefinitionRecord[], ArchetypeRecord[], ComponentTypeRecord[], int, float, long, long, DateTime, long, TrackRecord[], DagRecord[], ComponentDefinitionRecord[], ArchetypeDefinitionRecord[], IndexCatalogEntry[], RuntimeConfigRecord, EventQueueRecord[], ResourceGraphNodeRecord[])

Construct session metadata from captured engine/runtime tables. Every optional array defaults to empty (never null); RuntimeConfig defaults to null when no engine config is available.

public ProfilerSessionMetadata(SystemDefinitionRecord[] systems, ArchetypeRecord[] archetypes, ComponentTypeRecord[] componentTypes, int workerCount, float baseTickRate, long startTimestamp, long stopwatchFrequency, DateTime startedUtc, long samplingSessionStartQpc = 0, TrackRecord[] tracks = null, DagRecord[] dags = null, ComponentDefinitionRecord[] componentDefinitions = null, ArchetypeDefinitionRecord[] archetypeDefinitions = null, IndexCatalogEntry[] indexCatalog = null, RuntimeConfigRecord runtimeConfig = null, EventQueueRecord[] eventQueues = null, ResourceGraphNodeRecord[] resourceGraphNodes = null)

Parameters

systems SystemDefinitionRecord[]

System DAG metadata; empty when started outside a runtime context.

archetypes ArchetypeRecord[]

Archetype id → name table for the viewer.

componentTypes ComponentTypeRecord[]

Component-type id → CLR name table for the viewer.

workerCount int

Scheduler worker-thread count at session start; 0 when standalone.

baseTickRate float

Target tick rate in Hz; 0 for non-runtime profiling.

startTimestamp long

Stopwatch.GetTimestamp() anchor captured at session start.

stopwatchFrequency long

Stopwatch.Frequency at session start, for tick → wall-clock conversion.

startedUtc DateTime

UTC wall-clock time the session started.

samplingSessionStartQpc long

CPU-sampling QPC anchor; 0 when no EventPipe sampling companion is running.

tracks TrackRecord[]

Track table (top of the runtime partitioning hierarchy); empty without a scheduler.

dags DagRecord[]

DAG table; empty without a scheduler.

componentDefinitions ComponentDefinitionRecord[]

Rich component-type definitions; empty when no engine is attached.

archetypeDefinitions ArchetypeDefinitionRecord[]

Rich archetype definitions; empty when no engine is attached.

indexCatalog IndexCatalogEntry[]

Per-(component, field) index catalog; empty when no engine is attached.

runtimeConfig RuntimeConfigRecord

Engine runtime-config snapshot, or null when unavailable.

eventQueues EventQueueRecord[]

Per-queue static schema; empty when no queues are registered.

resourceGraphNodes ResourceGraphNodeRecord[]

Resource-graph pre-order tree snapshot; empty when unavailable.

Properties

ArchetypeDefinitions

Rich archetype definitions (parent/child, slot map, cluster info). v7+ trace section. Empty when no engine is attached.

public ArchetypeDefinitionRecord[] ArchetypeDefinitions { get; }

Property Value

ArchetypeDefinitionRecord[]

Archetypes

Archetype table — maps ArchetypeId numbers in typed events back to human-readable names for the viewer.

public ArchetypeRecord[] Archetypes { get; }

Property Value

ArchetypeRecord[]

BaseTickRate

Target tick rate in Hz (e.g., 60.0). Zero for non-runtime profiling.

public float BaseTickRate { get; }

Property Value

float

ComponentDefinitions

Rich component-type definitions (fields, types, sizes, indexes). v7+ trace section. Empty when no engine is attached.

public ComponentDefinitionRecord[] ComponentDefinitions { get; }

Property Value

ComponentDefinitionRecord[]

ComponentTypes

Component type table — maps ComponentTypeId numbers in typed events back to C# type names for the viewer.

public ComponentTypeRecord[] ComponentTypes { get; }

Property Value

ComponentTypeRecord[]

Dags

DAG table (#354) — each DAG references its owning track by index and carries its own ordered phase names. Surfaced through the trace v11 DagsTable section. Empty array when the host runs without a scheduler.

public DagRecord[] Dags { get; }

Property Value

DagRecord[]

EventQueues

Per-queue static schema (capacity, event type). v7+ trace section. Empty when no queues are registered.

public EventQueueRecord[] EventQueues { get; }

Property Value

EventQueueRecord[]

IndexCatalog

Flat per-(component, field) index catalog. v7+ trace section. Empty when no engine is attached.

public IndexCatalogEntry[] IndexCatalog { get; }

Property Value

IndexCatalogEntry[]

ResourceGraphNodes

Resource-graph pre-order tree snapshot. v7+ trace section. Empty when no resource graph is available.

public ResourceGraphNodeRecord[] ResourceGraphNodes { get; }

Property Value

ResourceGraphNodeRecord[]

RuntimeConfig

Engine runtime config snapshot (tick rate, worker count). v7+ trace section. Null when no engine config is available.

public RuntimeConfigRecord RuntimeConfig { get; }

Property Value

RuntimeConfigRecord

SamplingSessionStartQpc

Stopwatch.GetTimestamp() captured when an EventPipe CPU-sampling session started. Zero when no sampling companion is running. Hosts that attach an EventPipe session (e.g., AntHill profile runner) populate this so the viewer can overlay .nettrace flame graphs on the same time base as the record stream.

public long SamplingSessionStartQpc { get; }

Property Value

long

StartTimestamp

Stopwatch.GetTimestamp() value captured at TyphonProfiler.Start. Anchors all subsequent event timestamps.

public long StartTimestamp { get; }

Property Value

long

StartedUtc

UTC wall-clock time when the session started, for human-readable headers.

public DateTime StartedUtc { get; }

Property Value

DateTime

StopwatchFrequency

Stopwatch.Frequency at session start. Lets exporters convert ticks to wall-clock time without re-querying.

public long StopwatchFrequency { get; }

Property Value

long

Systems

System DAG metadata captured at session start. Empty array if the profiler is started outside a runtime context.

public SystemDefinitionRecord[] Systems { get; }

Property Value

SystemDefinitionRecord[]

Tracks

Track table (#354) — the top level of the runtime partitioning hierarchy (Engine → Track → DAG → Phase → System). Surfaced through the trace v11 TracksTable section. Empty array when the host runs without a scheduler (e.g., standalone profiling).

public TrackRecord[] Tracks { get; }

Property Value

TrackRecord[]

WorkerCount

Number of scheduler worker threads at session start. Zero if the profiler is running standalone (no scheduler).

public int WorkerCount { get; }

Property Value

int