성능 검사
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
성능을 검사하여 앱에서 발생하는 상황을 이해하고 기대치를 충족하는지 확인할 수 있습니다.
Android에서는 앱 성능을 검사하는 데 사용할 수 있는 여러 도구를 제공합니다.
처음에는 검사를 진행할 때 한 번에 한 가지 영역에 집중하는 것이 좋습니다. 이러한 영역에는 다음이 포함될 수 있습니다.
- 앱 시작
- 느린 렌더링(버벅거림)
- 화면 전환 및 탐색 이벤트
- 장기 실행 작업
- 백그라운드에서 진행되는 작업(I/O, 네트워킹 등)
앱 워크플로의 중요한 사용자 여정을 검사하는 방법도 있습니다.
이를 통해 어느 부분에서 성능과 예상이 일치하지 않는지 종합적으로 파악할 수 있습니다.
성능을 검사할 때는 수동 검사와 자동 검사, 이렇게 두 가지 방법을 사용할 수 있습니다.
새로운 영역을 검사할 때는 수동 디버깅으로 시작하는 경우가 많습니다.
수동 검사
앱의 어느 영역을 검사할지 정했으면 다양한 도구를 사용하여 정확히 어떤 일이 일어나고 있는지 알아볼 수 있습니다.
Android 9 이상을 실행하는 기기에서 성능을 검사하는 가장 포괄적인 도구는 Perfetto입니다. Perfetto는 추적 정보의 가능한 가장 자세한 정보를 제공합니다. 강력한 필터를 사용하면 필요에 따라 세부정보 수준을 조정할 수 있습니다. Android 기기에서 트레이스를 캡처하는 방법에 관한 자세한 내용은 빠른 시작: Android에서 트레이스 기록 가이드를 참고하세요.
Android 스튜디오에 내장된 Android 프로파일러는 세부정보 수준을 앱으로 제한할 수 있으며 Android 9보다 낮은 기기에서 실행할 때 앱의 성능에 관한 유용한 정보를 제공할 수도 있습니다.
자세한 내용은 시스템 추적 개요를 참고하거나 성능 디버깅에 관한 심층 시리즈를 시청하세요.
자동 테스트
수동 검사 외에도 자동 테스트를 설정하여 성능 데이터를 수집하고 집계할 수 있습니다. 이렇게 하면 사용자가 실제로 보게 되는 내용과 회귀가 발생할 수 있는 경우를 파악하는 데 도움이 됩니다. 앱의 자동 성능 테스트를 설정하는 방법에 관한 자세한 내용은 앱 벤치마크를 참고하세요.
성능을 검사하고 모니터링하여 앱을 개선하는 데 사용할 수 있는 도구는 다양합니다.
벤치마크 라이브러리를 사용하여 로컬에서 성능 이해
프로덕션의 성능 이해
- Android vitals를 사용하면 다양한 성능 측정항목이 사전에 결정된 기준점을 초과할 때 알림을 수신하여 앱 성능을 개선할 수 있습니다.
- Firebase 성능 SDK는 앱 성능에 관한 다양한 측정항목을 수집합니다. 예를 들어 사용자가 앱을 여는 시점과 앱이 반응하는 시점 사이의 시간을 측정하는 데 SDK를 사용함으로써 잠재적인 시작 병목 현상을 파악할 수 있습니다.
Android 스튜디오를 사용하여 로컬에서 프로파일링
- Android 스튜디오를 사용하여 시스템 트레이스 또는 스택 샘플링 트레이스를 기록하고 확인합니다.
- Android 스튜디오를 사용하여 트레이스를 기록합니다. 자세한 내용은 성능 디버깅 동영상 시리즈를 참고하세요.
- Android용 네이티브 스택 샘플링 도구인 Simpleperf를 사용하여 Android 앱과 Android에서 실행되는 네이티브 프로세스를 모두 프로파일링합니다. Android에서 Java 코드와 C++ 코드를 모두 프로파일링할 수 있습니다.
고급 프로파일링 도구: Perfetto 추적
추가 리소스
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Inspect performance to help you understand what is happening in your app and\nensure it meets your expectations.\n\nAndroid provides several tools you can use to inspect your app's performance.\nWhen getting started, we recommend you focus on one area at a time during\ninspection. These areas can include the following:\n\n- App startup\n- Slow rendering (jank)\n- Screen transitions and navigation events\n- Long running work\n- Operations in the background, such as I/O and networking\n\nAlternatively, you can inspect critical user journeys of your app's workflow.\nThis can help you gain a holistic understanding of where performance and\nexpectations don't align.\n\nThere are two main approaches when inspecting performance, manual and automated.\nIt's likely that you start with manual debugging when inspecting a new area.\n\nManual inspection\n-----------------\n\nAfter deciding which area of your app to inspect, you can use a variety of tools\nto identify what exactly is happening.\n\nThe most comprehensive tool to inspect performance on devices running Android 9\nand higher is [Perfetto](https://perfetto.dev/). Perfetto provides the highest possible\ndetail of tracing information. By using powerful filters, you can adjust the\nlevel of detail for your needs. For more information about how to capture traces\nfrom Android devices, see the [Quickstart: Record traces on\nAndroid](https://perfetto.dev/docs/quickstart/android-tracing) guide.\n\nThe [Android profilers](/studio/profile) built into Android Studio can also provide valuable\ninsights into your app's performance, where you can limit the level of detail to\nyour app, or when running on devices earlier than Android\n9.\n\nFor more information, see [Overview of system tracing](/topic/performance/tracing) or watch the in-depth\nseries on [performance debugging](https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-xjSI-rWn9SViXivBhQUnp).\n\nAutomated testing\n-----------------\n\nIn addition to manual inspection, you can set up automated tests to collect and\naggregate performance data. This helps you understand what users are actually\nseeing and identify when regressions might occur. For more information about\nsetting up automated performance tests for your app, see [Benchmark your\napp](/topic/performance/benchmarking/benchmarking-overview).\n\nApp startup performance\n-----------------------\n\nThere are multiple tools you can use to inspect and monitor performance to help\nimprove your app.\n\n### Understand performance locally with Benchmark libraries\n\n- The [Macrobenchmark library](/topic/performance/benchmarking/macrobenchmark-overview) helps you measure larger end-user interactions, such as startup, interacting with the UI, and animations.\n- The [Microbenchmark library](/topic/performance/benchmarking/microbenchmark-overview) helps analyze performance of more granular, app-specific situations.\n\n### Understand performance in production\n\n- [Android vitals](/topic/performance/vitals) can help improve your app's performance by alerting you when various performance metrics exceed predetermined thresholds.\n- The [Firebase performance SDK](https://firebase.google.com/docs/perf-mon/get-started-android) collects various metrics about your app's performance. For example, you can use the SDK to measure the time between when the user opens the app and when the app becomes responsive, helping identify potential startup bottlenecks.\n\n### Profile locally with Android Studio\n\n- Use [Android Studio](/studio/profile) to record and view system traces or stack sampling traces.\n- [Record traces](/studio/profile/record-traces) using Android Studio. For additional information, see the [Performance Debugging video series](https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-xjSI-rWn9SViXivBhQUnp).\n- Use [Simpleperf](https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md), a native stack sampling tool for Android, to profile both Android apps and native processes running on Android. It can profile both Java and C++ code on Android.\n\n### Advanced profiling tools: Perfetto tracing\n\n- [Perfetto](https://perfetto.dev/): a platform-wide tracing tool available on Android 10 (API level 29) and higher. For more information, see the [overview of Perfetto traces](https://perfetto.dev/docs/).\n- [Run Perfetto using `adb`](/studio/command-line/perfetto): describes how to run the `perfetto` command-line tool to capture traces.\n- [Recording a trace through the cmdline](https://perfetto.dev/docs/quickstart/android-tracing#recording-a-trace-through-the-cmdline): describes how to build and run the `perfetto` command-line tool to capture traces.\n- [Perfetto web-based trace viewer](https://perfetto.dev/docs/quickstart/android-tracing#recording-a-trace-through-the-perfetto-ui): opens Perfetto traces and displays a complete report. You can also open [Systrace](/topic/performance/tracing) traces in this viewer using the legacy UI option.\n\nAdditional resources\n--------------------\n\n- [Performance debugging - MAD skills series](https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-xjSI-rWn9SViXivBhQUnp)\n- [Profile your app performance](/studio/profile)\n- [Write a Macrobenchmark](/topic/performance/benchmarking/macrobenchmark-overview)\n- [Microbenchmark](/topic/performance/benchmarking/microbenchmark-overview)"]]