Performance Telemetry

Capture native memory, FPS, battery, and custom point-in-time metrics from Cordova/Capacitor app code.

The bridge uses native iOS and Android telemetry channels. Register app metrics from JavaScript:

await Ansight.registerMetricChannel({
  id: 42,
  name: "Queue depth",
  unit: "items",
});
await Ansight.metric(7, 42);

Use enableFramesPerSecond(), disableFramesPerSecond(), isFramesPerSecondEnabled(), and captureBuiltInTelemetrySample() to control native sampling.

Open-file-handle and Android JNI-reference tracking are off by default:

const options = Ansight.createOptionsBuilder()
  .withOpenFileHandleTracking()
  .withJniReferenceCountTracking()
  .build();

Open file handles use reserved channel 7 on supported native targets. JNI references use reserved channel 6 on Android only. Do not use ids 0-7 or 255 for custom channels.

The current adapter does not add a JavaScript-heap profiler. Use app-defined channels for framework-specific metrics that are not available from the native runtime.