Skip to main content

ScriptProfiler.startSampling

Function

Starts the sampling profiler.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

startSampling(frequencyHz?): void

Starts the sampling profiler.

Parameters

ParameterTypeDescription
frequencyHz?numberSampling rate in Hz. Defaults to 1000 if omitted or <= 0. Higher rates capture finer detail at the cost of CPU overhead.

Returns

void