public sealed class FlameNodeOne scope in a flame chart: a sample, what ran inside it, and where it draws.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The tree the rings do not keep. A ProfilerSample carries a depth and two timestamps and nothing about its parent — which is exactly right for the recording side, where a parent pointer would be a second store on the hot path. Rebuilding the nesting is a walk over the samples in begin order, and it happens once per capture rather than once per frame.
⚠ Samples arrive in completion order, not in begin order. A scope is recorded when it closes, so a parent lands in the ring after every child it contains — which means the obvious reading of the array builds every tree upside down. Build sorts before it walks, and that sort is the whole trick.
Fields and properties (9)
public ProfilerSample SampleThe scope itself.
public int LevelWhich row it draws on, counting from zero at the root.
public IReadOnlyList<FlameNode> ChildrenWhat ran inside it, in begin order.
public string NameWhat it is called.
public double MillisecondsHow long it ran, in milliseconds.
public double SelfMillisecondsHow long it ran with its children's time taken out, in milliseconds.
public long EndTicksWhen it ended, in Stopwatch ticks.
public int CountHow many nodes are in this subtree, including this one.
public int HeightHow many rows deep this subtree goes.
Methods (3)
public static IReadOnlyList<FlameNode> Build(ProfilerSample[] samples)Rebuilds one thread's nesting from its flat samples.
public void Walk(Action<FlameNode> visit)Calls on this node and everything under it, parents first.
public override string ToString()Returns a string that represents the current object.
Used by (8)
- FlameChartViewVixen.Editor.Profiler
- FlameChartViewTestsVixen.Editor.Profiler.Tests
- FlameTreeTestsVixen.Editor.Profiler.Tests
- ProfileCaptureVixen.Editor.Profiler
- ProfileSummaryVixen.Editor.Profiler
- ProfileThreadVixen.Editor.Profiler
- ProfilerModelVixen.Editor.Profiler
- ProfilerViewVixen.Editor.Profiler