(
device: DeviceInfo,
packageName: string,
options: AndroidPerfOptions = {},
)
| 82 | }; |
| 83 | |
| 84 | export async function sampleAndroidCpuPerf( |
| 85 | device: DeviceInfo, |
| 86 | packageName: string, |
| 87 | options: AndroidPerfOptions = {}, |
| 88 | ): Promise<AndroidCpuPerfSample> { |
| 89 | const adb = resolveAndroidAdbExecutor(device, options.adb); |
| 90 | try { |
| 91 | const result = await adb(['shell', 'dumpsys', 'cpuinfo'], { |
| 92 | timeoutMs: ANDROID_PERF_TIMEOUT_MS, |
| 93 | }); |
| 94 | return parseAndroidCpuInfoSample(result.stdout, packageName, new Date().toISOString()); |
| 95 | } catch (error) { |
| 96 | throw annotateAndroidPerfSamplingError('cpu', packageName, error); |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | export async function sampleAndroidMemoryPerf( |
| 101 | device: DeviceInfo, |
no test coverage detected
searching dependent graphs…