MCPcopy Index your code
hub / github.com/callstack/agent-device / sampleAndroidPerfResults

Function sampleAndroidPerfResults

src/daemon/handlers/session-perf.ts:418–434  ·  view source on GitHub ↗
(
  session: SessionState,
  appBundleId: string,
  options: BuildPerfResponseOptions,
)

Source from the content-addressed store, hash-verified

416}
417
418async function sampleAndroidPerfResults(
419 session: SessionState,
420 appBundleId: string,
421 options: BuildPerfResponseOptions,
422): Promise<{
423 memory: SettledMetricResult;
424 cpu: SettledMetricResult;
425 fps: SettledMetricResult;
426}> {
427 const androidPerfOptions = { adb: options.androidAdb };
428 const [memory, cpu, fps] = await Promise.allSettled([
429 sampleAndroidMemoryPerf(session.device, appBundleId, androidPerfOptions),
430 sampleAndroidCpuPerf(session.device, appBundleId, androidPerfOptions),
431 sampleAndroidFramePerf(session.device, appBundleId, androidPerfOptions),
432 ]);
433 return { memory, cpu, fps };
434}
435
436async function sampleApplePerfResultsForSession(
437 session: SessionState,

Callers 1

applyAndroidPerfMetricsFunction · 0.85

Calls 3

sampleAndroidMemoryPerfFunction · 0.90
sampleAndroidCpuPerfFunction · 0.90
sampleAndroidFramePerfFunction · 0.90

Tested by

no test coverage detected