Vixen
02b45cc4
csharp
public sealed class ProfilerView

The CPU profiler panel: a source, a capture, a flame chart and a table.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Doc 20's E4 in one panel, and its exit criterion is the first thing the strip says. "A frame of the editor and a frame of a running game are both profilable in the same panel" is a dropdown — the panel has no idea which process it is looking at, which is what IProfileSource is for.

⚠ The chart and the table answer different questions and both are here. A flame chart shows one frame's shape; a table shows which scope costs the most across the whole capture. Shipping only the chart is the mistake that makes a profiler pretty and useless at any capture longer than a frame.

⚠ The table is rebuilt on change rather than every frame. A capture's summary is fixed the moment the capture is — nothing about it moves while it is on screen — so the only thing that ticks here is the model's drain of the rings.

Fields and properties (14)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public ProfilerModel? Model

    What it is showing.

  • public UiElement Toolbar

    The strip along the top.

  • public Select Sources

    Which process is being profiled.

  • public Button Record

    Starts and stops a capture.

  • public Button Baseline

    Makes the current capture the one later ones are compared with.

  • public Select Threads

    Which thread's chart is on screen.

  • public Select Frames

    Which frame, or all of them.

  • public UiElement Status

    The line under the strip saying what the capture holds.

  • public FlameChartView Chart

    The chart.

  • public DataGrid Table

    The table under it.

  • public DataGrid Comparison

    The table that replaces it once there is a baseline to compare against.

  • public UiElement Detail

    What the selected bar says about itself.

Methods (4)

  • public void Show(ProfilerModel profiler)

    Points the panel at a model.

  • public void Tick(TimeSpan now = default(TimeSpan))

    Drains the rings, if a capture is running.

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • protected override void OnRemoved()

    Called once, as the element leaves the document.

Used by (2)

  • DiagnosticsModuleVixen.Editor.Diagnostics
  • DiagnosticsPanelTestsVixen.Editor.App.Tests