Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Jetpack Macrobenchmark measures performance across test-driven Android app journeys, such as a cold launch, opening a screen, scrolling a list, or playing an animation. Put benchmark code in a separate com.android.test module, drive the app from outside its process, and measure only the actions that answer your performance question. Choose startup or frame metrics to fit the journey, then compare results only when the device, startup state, and compilation conditions match.
What Macrobenchmark measures—and what it does not
Macrobenchmark runs tests that interact with a target app and collect performance metrics across those interactions. It is suited to user-visible flows such as launching from the launcher or a notification, navigating to a screen, scrolling, or sustaining an activity such as music playback. Android’s performance-measurement guidance recommends identifying important journeys and combining automated collection with manual investigation of individual runs.
The benchmark runs in a separate process from the app under test. Its code belongs in a com.android.test module, not in the app module; the target app must be profileable to provide detailed trace information without affecting its performance. See Android’s Macrobenchmark setup guide.
Choose a journey that answers one question
Start by stating what you want to learn: how quickly the app appears after launch, whether a scrolling screen produces slow frames, or how long a specific portion of work takes. Keep the benchmark focused on a representative flow rather than unrelated actions that make the result harder to interpret.
#1 Best Overall
- YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
- LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
- MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
- NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
- BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
- Launch: measure a cold, warm, or hot startup with
StartupTimingMetric. - Scrolling, transitions, or animation: perform the interaction and collect
FrameTimingMetricdata. - A specific operation: use a named trace section with
TraceSectionMetricwhen the question concerns that section’s duration.
A frame benchmark does not have to scroll: it can capture frames produced by an animation or other UI work. You can pass more than one metric to a benchmark, but at least one is required. Metric details and platform qualifications are in Android’s Macrobenchmark metrics guide.
Separate reaching the screen from measuring it
If the question concerns a screen deeper in the app, use setup to reach it and reserve the measured block for the screen’s relevant work. That way, the result reflects the target activity—such as rendering and scrolling a list—rather than also including unrelated navigation. Android’s app-control guide describes this separation with setupBlock and measureBlock.
Rank #2
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
- DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
- CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
- PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
- BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.
Because the benchmark runs outside the app process, it cannot directly call an in-process object such as a NavController. Drive the app as a user would, using UI Automator or another mechanism that can control it from the benchmark process. For Compose, expose stable test tags as resource IDs using the documented semantics setting, then locate those elements from the benchmark and perform the action.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Make setup and measured actions repeatable and independent of leftover app state. The Macrobenchmark codelab notes that the target app is reinstalled or restarted and recommends state-independent interactions. For example, avoid relying on a screen being left open from a previous run; have setup reach the intended destination each time.
Rank #3
- YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
- LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
- MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
- NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
- BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
Build the benchmark around the journey
MacrobenchmarkRule provides measureRepeated. The call specifies the target package, metrics, iteration count, and the interactions to run. Here is a structural example for a launch journey; replace the package and actions with the app’s actual flow:
@RunWith(AndroidJUnit4::class)
class LaunchBenchmark {
@get:Rule
val benchmarkRule = MacrobenchmarkRule()
@Test
fun launch() = benchmarkRule.measureRepeated(
packageName = "com.example.app",
metrics = listOf(StartupTimingMetric()),
iterations = 5,
startupMode = StartupMode.COLD
) {
pressHome()
startActivityAndWait()
}
}
The iteration count shown is only an example, not a guarantee of statistical reliability. Adapt the test structure to the APIs and dependency versions in your project, and keep the actions inside the measured portion aligned with the performance question. Android’s overview documents the rule and journey example.
Rank #4
- PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
- TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
- NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
- MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
- HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone
Choose metrics that match the result you need
| Question | Metric | What it reports | Important qualification |
|---|---|---|---|
| How quickly does the app show its first screen? | StartupTimingMetric |
timeToInitialDisplayMs, from launch intent to the destination activity’s first frame; output includes minimum, median, and maximum. |
Use the median for typical startup. timeToFullDisplayMs is also available when the app supplies the fully drawn signal; its behavior can depend on Android version and app reporting. |
| Are frames slow during scrolling, animation, or another interaction? | FrameTimingMetric |
frameDurationCpuMs and distributions including P50, P90, P95, and P99. Higher percentiles reveal slower frames. |
frameOverrunMs is available on Android 12 (API 31) and later. Positive overrun means a frame missed its deadline and may correspond to visible jank. |
| How long does a named portion of code take? | TraceSectionMetric |
Timing for matching named trace sections. | Android marks this metric experimental. By default, it selects the first matching instance and filters to the target package unless configured otherwise. |
Consult the official metrics reference for startup and frame behavior and the Views metrics guide for trace-section details.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Keep startup and compilation conditions explicit
Startup mode changes what a startup result means. Android documents three modes: COLD measures from a process killed between setup and measurement; WARM recreates activity state while retaining the process; and HOT represents a process and activity that are already more available. Select the mode that reflects the user experience you want to measure. Do not treat results from different modes as directly comparable.
Best Value
- Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
- ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
- CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
- PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
- 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US
Compilation state also affects results. Android describes CompilationMode.DEFAULT as installing a Baseline Profile when available on Android 7 (API 24) and later, alongside other modes for varying precompilation and JIT conditions. Benchmark setup resets compilation state to reduce interference. The official overview notes a version-dependent caveat: Android 14 (API 34) and later can persist state when benchmarking, while earlier versions may require reinstalling the APK; it also identifies CompilationMode.Ignore as a workaround when compilation is controlled separately. Check the current run and compilation guidance before relying on that operational detail.
Make results comparable and investigate outliers
Record the conditions that define each run so another developer can tell what changed. Include:
- Device model and Android version
- App build and benchmark build
- Startup mode and compilation mode
- Journey setup and measured actions
- Iteration count
Compare builds under matched conditions. For startup, examine the median rather than choosing the fastest run; for frame behavior, inspect the percentile distribution, especially the slower tail. Automated output helps identify regressions, but manually inspect individual runs to investigate suspicious results, as Android’s measurement guidance recommends.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsRun on a device appropriate to the project’s target Android versions and test requirements. The documentation does not prescribe a particular phone model; API-level support matters especially when interpreting frameOverrunMs and full-display timing.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

