Vixen
02b45cc4
csharp
public readonly record struct ProfilerSample

One timed scope: which key, when it started, how long it took, and how deeply nested it was.

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

Remarks

Twenty-four bytes. DurationTicks is a 32-bit count rather than a second timestamp, which halves the field and costs nothing real — at the stopwatch's frequency it tops out around two seconds, and a scope that long is a hang rather than a sample.

Fields and properties (7)

  • public ProfilingKey Key

    Which scope this is.

  • public int Depth

    How many scopes were already open on this thread when it began.

  • public long BeginTicks

    When it began, in Stopwatch ticks.

  • public int DurationTicks

    How long it ran, in Stopwatch ticks.

  • public int FrameIndex

    Which frame it belongs to.

  • public double DurationMilliseconds

    How long the scope ran, in milliseconds.

  • public double DurationMicroseconds

    How long the scope ran, in microseconds — the unit a trace viewer wants.

Methods (1)

  • public ProfilerSample(ProfilingKey Key, int Depth, long BeginTicks, int DurationTicks, int FrameIndex)

    One timed scope: which key, when it started, how long it took, and how deeply nested it was.

Used by (17)

  • DiagnosticsTestsVixen.Core.Diagnostics.Tests
  • FrameGraphOverlayVixen.Engine
  • ProfilerVixen.Core.Diagnostics
  • ProfilerThreadSamplesVixen.Core.Diagnostics
  • ThreadRecorderVixen.Core.Diagnostics
  • TraceExporterVixen.Core.Diagnostics
  • CaptureTestsVixen.Editor.Profiler.Tests
  • FlameChartViewVixen.Editor.Profiler
  • FlameChartViewTestsVixen.Editor.Profiler.Tests
  • FlameNodeVixen.Editor.Profiler
  • FlameTreeTestsVixen.Editor.Profiler.Tests
  • ProfileCaptureVixen.Editor.Profiler
  • ProfileSummaryVixen.Editor.Profiler
  • ProfileThreadVixen.Editor.Profiler
  • ProfilerModelVixen.Editor.Profiler
  • ProfilerModelTestsVixen.Editor.Profiler.Tests
  • ProfilerViewVixen.Editor.Profiler