Skip to content

Hitch 0.4.0

Latest

Choose a tag to compare

@dlandman27 dlandman27 released this 04 Nov 21:40
· 1 commit to main since this release

Android support: thread lanes, native hot spots, startups and memory on an Android emulator or phone, over adb.

New

  • Android, with the same detail as the iOS simulator. Run a debug build on an emulator or phone and start Hitch. It finds the app on Metro, finds its process over adb, and shows per-thread lanes, JS freezes with code lines, React render reasons, console, network, memory and startups. Nothing is added to the app; all you need is adb on your PATH.
  • Native hot spots on Android come from the device's simpleperf. When the UI thread or another thread runs hot (or you press Sample), Hitch records every thread for about a second and names the hottest functions and subsystems. It works without root on any debuggable build, Android 9 and up.
  • Cold-launch timing on Android, read from the process start time. Attaching up to two minutes after launch still counts.
  • Scenario open_url steps work on Android (adb shell am start -d).
  • Android frame names are categorized: OkHttp, Fresco/Glide, Fabric mounting, ART, hwui rendering, Datadog, and Rive animations (on iOS too).

How it reads Android

  • Thread CPU streams from one long-running adb shell loop about every 140ms, so freezes down to ~100ms get stacks. The loop costs the device about 3% of one core, outside the app.
  • A dropped adb read no longer disconnects the session; Hitch reconnects on its own.
  • Lane names to know: Java GC (ART) is Android's collector for Java and Kotlin objects (Hermes has its own hades thread). Metro connection (dev only) is the debug build's link to Metro.

Good to know

  • On an emulator, GPU work on RenderThread and in Rive or Skia shows up as QemuPipeStream. That cost belongs to the emulator, so measure rendering on a phone.
  • If the same app is open in the iOS simulator and on Android, pick the one to watch in the app picker.
  • See Testing on Android in the README, which also has new troubleshooting rows.

Upgrading
git pull in your clone, then restart Hitch (quit and reopen Hitch.app, or stop and rerun hitch). Rerun hitch --install-app to update the version shown in Hitch.app.