Class ProfilerSessionMetadata
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
systemsSystemDefinitionRecord[]System DAG metadata; empty when started outside a runtime context.
archetypesArchetypeRecord[]Archetype id → name table for the viewer.
componentTypesComponentTypeRecord[]Component-type id → CLR name table for the viewer.
workerCountintScheduler worker-thread count at session start;
0when standalone.baseTickRatefloatTarget tick rate in Hz;
0for non-runtime profiling.startTimestamplongStopwatch.GetTimestamp()anchor captured at session start.stopwatchFrequencylongStopwatch.Frequencyat session start, for tick → wall-clock conversion.startedUtcDateTimeUTC wall-clock time the session started.
samplingSessionStartQpclongCPU-sampling QPC anchor;
0when no EventPipe sampling companion is running.tracksTrackRecord[]Track table (top of the runtime partitioning hierarchy); empty without a scheduler.
dagsDagRecord[]DAG table; empty without a scheduler.
componentDefinitionsComponentDefinitionRecord[]Rich component-type definitions; empty when no engine is attached.
archetypeDefinitionsArchetypeDefinitionRecord[]Rich archetype definitions; empty when no engine is attached.
indexCatalogIndexCatalogEntry[]Per-(component, field) index catalog; empty when no engine is attached.
runtimeConfigRuntimeConfigRecordEngine runtime-config snapshot, or
nullwhen unavailable.eventQueuesEventQueueRecord[]Per-queue static schema; empty when no queues are registered.
resourceGraphNodesResourceGraphNodeRecord[]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
Archetypes
Archetype table — maps ArchetypeId numbers in typed events back to human-readable names for the viewer.
public ArchetypeRecord[] Archetypes { get; }
Property Value
BaseTickRate
Target tick rate in Hz (e.g., 60.0). Zero for non-runtime profiling.
public float BaseTickRate { get; }
Property Value
ComponentDefinitions
Rich component-type definitions (fields, types, sizes, indexes). v7+ trace section. Empty when no engine is attached.
public ComponentDefinitionRecord[] ComponentDefinitions { get; }
Property Value
ComponentTypes
Component type table — maps ComponentTypeId numbers in typed events back to C# type names for the viewer.
public ComponentTypeRecord[] ComponentTypes { get; }
Property Value
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
EventQueues
Per-queue static schema (capacity, event type). v7+ trace section. Empty when no queues are registered.
public EventQueueRecord[] EventQueues { get; }
Property Value
IndexCatalog
Flat per-(component, field) index catalog. v7+ trace section. Empty when no engine is attached.
public IndexCatalogEntry[] IndexCatalog { get; }
Property Value
ResourceGraphNodes
Resource-graph pre-order tree snapshot. v7+ trace section. Empty when no resource graph is available.
public ResourceGraphNodeRecord[] ResourceGraphNodes { get; }
Property Value
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
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
StartTimestamp
Stopwatch.GetTimestamp() value captured at TyphonProfiler.Start. Anchors all subsequent event timestamps.
public long StartTimestamp { get; }
Property Value
StartedUtc
UTC wall-clock time when the session started, for human-readable headers.
public DateTime StartedUtc { get; }
Property Value
StopwatchFrequency
Stopwatch.Frequency at session start. Lets exporters convert ticks to wall-clock time without re-querying.
public long StopwatchFrequency { get; }
Property Value
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
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
WorkerCount
Number of scheduler worker threads at session start. Zero if the profiler is running standalone (no scheduler).
public int WorkerCount { get; }