(
device: DeviceInfo,
packageName: string,
options: AndroidPerfOptions = {},
)
| 98 | } |
| 99 | |
| 100 | export async function sampleAndroidMemoryPerf( |
| 101 | device: DeviceInfo, |
| 102 | packageName: string, |
| 103 | options: AndroidPerfOptions = {}, |
| 104 | ): Promise<AndroidMemoryPerfSample> { |
| 105 | const adb = resolveAndroidAdbExecutor(device, options.adb); |
| 106 | try { |
| 107 | const result = await adb(['shell', 'dumpsys', 'meminfo', packageName], { |
| 108 | timeoutMs: ANDROID_PERF_TIMEOUT_MS, |
| 109 | }); |
| 110 | return parseAndroidMemInfoSample(result.stdout, packageName, new Date().toISOString()); |
| 111 | } catch (error) { |
| 112 | throw annotateAndroidPerfSamplingError('memory', packageName, error); |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | export async function captureAndroidHeapSnapshot( |
| 117 | device: DeviceInfo, |
no test coverage detected