(
device: DeviceInfo,
packageName: string,
options: AndroidFramePerfOptions = {},
)
| 41 | } |
| 42 | |
| 43 | export async function resetAndroidFramePerfStats( |
| 44 | device: DeviceInfo, |
| 45 | packageName: string, |
| 46 | options: AndroidFramePerfOptions = {}, |
| 47 | ): Promise<void> { |
| 48 | const adb = resolveAndroidAdbExecutor(device, options.adb); |
| 49 | try { |
| 50 | await adb(['shell', 'dumpsys', 'gfxinfo', packageName, 'reset'], { |
| 51 | allowFailure: true, |
| 52 | timeoutMs: ANDROID_FRAME_RESET_TIMEOUT_MS, |
| 53 | }); |
| 54 | } catch { |
| 55 | // Reset is best-effort; sampling/open should still succeed if adb times out or disappears. |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | function annotateAndroidFramePerfSamplingError(packageName: string, error: unknown): AppError { |
| 60 | if (error instanceof AppError) { |
no test coverage detected