החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
כלים לבדיקת ביצועי המערכת
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בדף הזה מתוארים הכלים שבעזרתם אפשר למדוד מדדי ביצועים.
זמן האתחול
כדי ליצור פרופיל של זמני האתחול, אפשר להיעזר במסמכי העזרה של Simpleperf.
config.yaml
כדי לכלול אירועים שרוצים לחפש. config.yaml
אמור להופיע כך:
stop_event: <logcat log message which will terminate log collection after reboot>
events:
event1_name: <pattern that matches log message>
event2_
...
במכשירים מסוימים, ייתכן שהשעון יציג שעה שגויה בשניות הראשונות לאחר ההפעלה. כלי bootanalyze יכול להתאים לתקנת זמן מובנית, אבל אפשר לספק דפוס אופציונלי של תיקון זמן ב-config.yaml
.
במאמר אופטימיזציה של זמני האתחול מוסבר איך לשפר את זמני האתחול באמצעות רכיבים כמו Bootloader, Device Kernel, I/O tuning, Boot animation ומדיניות SELinux.
זמן ההפעלה של האפליקציה
המשתמשים מצפים שהאפליקציות ייטענו במהירות ויהיו רספונסיביות.
במאמר זמן ההפעלה של האפליקציה מוסבר על הרכיבים הפנימיים של תהליך ההפעלה, ומוסבר איך ליצור פרופיל של הביצועים בזמן ההפעלה ולבצע אופטימיזציה שלהם.
ממשק משתמש
בדיקת הביצועים של ממשק המשתמש (UI) מבטיחה שהאפליקציה עומדת בדרישות הפונקציונליות, ואינטראקציות של משתמשים עם האפליקציה חלקות ומתבצעות בקצב קבוע של 60 פריימים לשנייה (ראו דפוסי ביצועים של Android: למה 60fps?), והכול בלי אובדן פריימים או עיכוב בהצגת פריימים.
מידע נוסף זמין במאמרים בדיקת ביצועי ממשק המשתמש וJankTest.
זיכרון
יש שתי דרכים לבדוק את השימוש בזיכרון של אפליקציה:
- לאורך זמן, באמצעות
procstats
.
- תמונת מצב בנקודת זמן, באמצעות
meminfo
.
לקבלת פרטים, ראה:
מעבד
אפשר להשתמש בכלים הבאים כדי לשלוח שאילתות ל-CPU.
- כדי ליצור פרופילים של אפליקציות ל-Android ותהליכים מקומיים שפועלים ב-Android, אפשר להיעזר במסמכי התיעוד של Simpleperf.
כלי מקורי ליצירת פרופילים של מעבדים מרכזיים (CPU) ל-Android. באמצעות Simpleperf אפשר ליצור פרופיל של קוד Java ו-C++ ב-Android. קובץ ההפעלה של Simpleperf יכול לפעול בגרסאות Android מ-L ואילך, וניתן להשתמש בסקריפטים של Python בגרסאות Android מ-N ואילך.
מסמכי התיעוד של Simpleperf.
פרטים נוספים זמינים במסמכי העזרה של Simpleperf.
- כדי לבדוק את השימוש של האפליקציה במעבד ואת פעילות השרשור בזמן אמת במהלך האינטראקציה עם האפליקציה, אפשר להשתמש ב-כלי לניתוחי מעבדים.
יש לכך יתרונות רבים, כמו חוויית משתמש מהירה וחלקה יותר ושמירה על חיי הסוללה של המכשיר. בנוסף, אפשר לבדוק את הפרטים של שיטות, פונקציות ותיעוד מערכת שתועדו.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת 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,["# System performance tools\n\nThis page describes the tools you can use to measure performance metrics.\n\nBoot time\n---------\n\nTo profile boot timing, use the\n[Simpleperf](https://android.googlesource.com/platform/system/extras/+/android16-release/simpleperf/doc/README.md)\ndocumentation.\n`config.yaml` file to include events you want to search for. `config.yaml`\nshould appear as follows: \n\n```scdoc\n stop_event: \u003clogcat log message which will terminate log collection after reboot\u003e\n events:\n event1_name: \u003cpattern that matches log message\u003e\n event2_\n ...\n```\n\nOn some devices, booting the clock may display an incorrect time for the first few seconds. While\nthe bootanalyze tool can accommodate a time correction out-of-the-box, you can provide an optional\ntime correction pattern in `config.yaml`.\n[Optimizing boot times](/devices/tech/perf/boot-times) explains how to improve boot\ntime using components such as Bootloader, Device Kernel, I/O tuning, Boot animation, and the\nSELinux policy.\n\nApp start-up time\n-----------------\n\nUsers expect apps to be quick to load and responsive.\n[App Startup Time](https://developer.android.com/topic/performance/vitals/launch-time)\ndetails the internals of the launch process and discusses how to profile and optimize startup\nperformance.\n\nUser interface\n--------------\n\nUser interface (UI) performance testing ensures that your app meets functional requirements and\nthat user interactions with your app are smooth, run at a consistent 60 frames per second (see\n[Android\nPerformance Patterns: Why 60fps?](https://www.youtube.com/watch?v=CaMTIgxCSqU&index=25&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE)), and all without dropping or delaying frames.\n\nFor more information, see [Test\nUI Performance](https://developer.android.com/training/testing/performance) and\n[JankTest](https://developer.android.com/reference/android/support/test/jank/JankTest).\n\nMemory\n------\n\nYou can inspect app memory usage in one of two ways:\n\n- Over time, using `procstats`.\n- Snapshot in time, using `meminfo`.\n\nFor details, see:\n\n- To measure memory usage, see [View\n Memory Allocations](https://developer.android.com/studio/command-line/dumpsys.html#ViewingAllocations).\n- To use the Android Studio IDE to inspect memory, Android Studio provides a GUI-based memory usage tool. For details, see [View the Java Heap and\n Memory Allocations with Memory Profiler](https://developer.android.com/studio/profile/memory-profiler).\n- To conduct performance instrumentation and tracing on the Linux, Android, and Chrome platform and in user-space apps, use open source [Perfetto](https://perfetto.dev/#/).\n\nCentral processing unit\n-----------------------\n\nYou can use the following tools to query the CPU.\n\n- To profile Android apps *and* native processes running on Android, use [Simpleperf](https://android.googlesource.com/platform/system/extras/+/android16-release/simpleperf/doc/README.md) documentation.\na native central processing unit (CPU) profiling tool for Android. Simpleperf can profile Java and C++ code on Android. The Simpleperf executable can run on Android releases later than L and Python scripts can be used on Android releases later than N. \n\n[Simpleperf](https://android.googlesource.com/platform/system/extras/+/android16-release/simpleperf/doc/README.md) documentation. For details, see the [Simpleperf](https://android.googlesource.com/platform/system/extras/+/android16-release/simpleperf/doc/README.md) documentation.\n- To inspect your app's CPU usage and thread activity in real time while interacting with your app, use the [CPU Profiler](https://developer.android.com/studio/profile/cpu-profiler). Doing so has many advantages, such as providing a faster and smoother user experience and preserving device battery life. In addition, you can inspect the details of recorded method, function, and system traces."]]