Performance Telemetry

Capture built-in FPS and memory telemetry with the Ansight .NET SDK, tune sampling cadence and retention, and choose the right default memory channels per platform.

This page is about numeric telemetry channels. For application logs and timeline events, see Capturing Logs.

What Ansight Captures By Default

When you use Options.Default or the default builder behavior, Ansight starts with:

  • sample frequency: 500ms
  • retention window: 10 minutes
  • FPS tracking enabled
  • default memory channels for the current platform

That gives Studio a live and recorded telemetry stream without requiring any optional tool packages.

Minimal Setup

using Ansight;

var options = Options.CreateBuilder()
    .WithFramesPerSecond()
    .Build();

Runtime.InitializeAndActivate(options);

That setup gives you FPS plus the platform-default memory channels.

WithFramesPerSecond() is shown explicitly here to make the telemetry intent obvious. If you keep the default builder behavior, FPS is already enabled.

Tune Sampling And Retention

Use the builder when you want a tighter or looser telemetry stream:

using Ansight;

var options = Options.CreateBuilder()
    .WithSampleFrequencyMilliseconds(250)
    .WithRetentionPeriodSeconds(900)
    .WithFramesPerSecond()
    .Build();

Runtime.InitializeAndActivate(options);
  • Lower sample intervals produce a denser telemetry stream and more overhead.
  • Higher retention keeps more metrics buffered for the active session.

Memory Channels

DefaultMemoryChannels is a flags enum:

  • ManagedHeap
  • NativeHeap
  • ResidentSetSize
  • PhysicalFootprint
  • All

Platform defaults:

  • Android: ManagedHeap | NativeHeap | ResidentSetSize
  • iOS and Mac Catalyst: ManagedHeap | PhysicalFootprint
  • other targets: ManagedHeap

Replace The Default Memory Set

Use WithDefaultMemoryChannels(...) when you want a known, explicit memory profile:

using Ansight;

var options = Options.CreateBuilder()
    .WithFramesPerSecond()
    .WithDefaultMemoryChannels(DefaultMemoryChannels.All)
    .Build();

Runtime.InitializeAndActivate(options);

Remove Specific Default Channels

Use WithoutDefaultMemoryChannels(...) when you want to trim the built-in platform defaults instead of replacing them outright:

using Ansight;

var options = Options.CreateBuilder()
    .WithFramesPerSecond()
    .WithoutDefaultMemoryChannels(DefaultMemoryChannels.NativeHeap)
    .Build();

Runtime.InitializeAndActivate(options);

What Studio Does With Telemetry

Studio uses these channels to render live and recorded time-series charts for:

  • FPS
  • built-in memory channels
  • any additional metric channels you register

Telemetry is also available in captured sessions and can be included in downstream analysis workflows.

For most teams:

  1. Start with the built-in defaults.
  2. Keep the sample interval at 500ms unless you are diagnosing short spikes.
  3. Extend retention only when you need longer local sessions in memory.
  4. Pair telemetry with Screen Views and App Lifecycle so the graphs have session context.