Lớp phủ hiệu suất ARCore
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
ARCore có thể hiển thị một bảng điều khiển lớp phủ có số liệu thống kê về hiệu suất của ứng dụng, chẳng hạn như
Mức sử dụng CPU và bộ nhớ, cung cấp thông tin tổng quan về tài nguyên hệ thống theo thời gian thực.

Làm theo các bước sau để bật lớp phủ hiệu suất.
Mở trải nghiệm thực tế tăng cường trong ứng dụng của bạn để có một phiên ARCore đang hoạt động
đang chạy. Ứng dụng của bạn phải ở chế độ AR để nhận được nội dung truyền phát cho phép
lớp phủ. Hình ảnh xem trước của máy ảnh thực tế tăng cường sẽ hiển thị trên thiết bị
màn hình.
Sử dụng lệnh truyền tin sau đây trong trình quản lý hoạt động để bật
cho ứng dụng của bạn.
# Enables ARCore's performance overlay and saves a setting to your app's
# Android Shared Preferences, so that the overlay remains enabled in
# subsequent ARCore sessions.
# Your app must have an actively running ARCore session to receive the broadcast.
adb shell am broadcast -a com.google.ar.core.ENABLE_PERFORMANCE_OVERLAY
Bạn có thể được chuyển đến trình đơn Settings để cấp gói ARCore
quyền vẽ lớp phủ. Bạn chỉ cần thực hiện bước này một lần. Tìm
Google Play Services for AR rồi đặt nút bật/tắt quyền thành Allowed
trước khi quay lại ứng dụng của bạn.
Nếu bạn đã bật lớp phủ hiệu suất mà không cấp ARCore
quyền vẽ lớp phủ, bạn sẽ được chuyển hướng đến trình đơn Cài đặt
khi ứng dụng bắt đầu phiên ARCore mới. Trong trường hợp này, bạn nên:
cấp quyền ARCore hoặc tắt lớp phủ hiệu suất.
Làm theo các bước sau để tắt lớp phủ hiệu suất.
Mở trải nghiệm thực tế tăng cường trong ứng dụng của bạn để có một phiên ARCore đang hoạt động
đang chạy. Ứng dụng của bạn phải ở chế độ thực tế tăng cường để nhận được nội dung truyền phát vô hiệu hoá
lớp phủ. Hình ảnh xem trước của máy ảnh thực tế tăng cường sẽ hiển thị trên thiết bị
màn hình.
Sử dụng lệnh truyền tin sau đây của trình quản lý hoạt động để tắt
cho ứng dụng của bạn.
# Disables ARCore's performance overlay and saves a setting to your app's
# Android Shared Preferences, so that the overlay remains disabled in
# subsequent ARCore sessions.
# Your app must have an actively running ARCore session to receive the broadcast.
adb shell am broadcast -a com.google.ar.core.DISABLE_PERFORMANCE_OVERLAY
Bạn cũng có thể tắt lớp phủ hiệu suất bằng cách nhấn vào nút đóng
trên lớp phủ và xoá
Lựa chọn ưu tiên dùng chung trên Android của ứng dụng. Để làm việc này, có một cách để xoá
.
Diễn giải các giá trị sử dụng CPU
Trường Process CPU Usage hiển thị khoảng thời gian của CPU mà
quy trình đăng ký hiện sử dụng dưới dạng tỷ lệ phần trăm trong tổng số thiết bị
thời gian CPU hiện có. Giá trị này bao gồm khối lượng công việc ứng dụng, khối lượng công việc ARCore,
cũng như mọi thư viện khác mà ứng dụng của bạn dùng. Ví dụ: trường sẽ hiển thị
Mức sử dụng CPU 25% nếu quy trình ứng dụng bão hoà hoàn toàn một lõi CPU khi
chạy trên thiết bị 4 nhân.
Lớp phủ hiệu suất cũng cung cấp bảng phân tích mức sử dụng CPU cho từng
Các tính năng ARCore. Những thông tin chi tiết này cũng được thể hiện dưới dạng tỷ lệ phần trăm của
tổng thời gian CPU có thể sử dụng của thiết bị. Khối lượng công việc là:
Lớp phủ không hiển thị bất kỳ tính năng nào bị tắt hoặc sử dụng ít hơn
0,1% thời gian của CPU.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eARCore offers a performance overlay that displays real-time CPU and memory usage statistics for your app during AR experiences.\u003c/p\u003e\n"],["\u003cp\u003eTo enable or disable the overlay, use specific ADB commands while your app is actively running in AR mode.\u003c/p\u003e\n"],["\u003cp\u003eThe overlay requires permission to draw overlays, which can be granted in the device's settings for "Google Play Services for AR".\u003c/p\u003e\n"],["\u003cp\u003eCPU usage is shown as a percentage of total device CPU, including both app and ARCore processes, and further broken down by specific ARCore features like motion tracking and plane detection.\u003c/p\u003e\n"]]],[],null,["# ARCore performance overlay\n\nARCore can display an overlay panel with an app's performance statistics such as\nCPU and memory usage, providing a real-time overview of system resources.\n\nEnable the performance overlay\n------------------------------\n\nFollow these steps to enable the performance overlay.\n\n1. Open the AR experience in your app so that there is an active ARCore session\n running. **Your app must be in AR mode to receive the broadcast that enables\n the overlay.** The AR camera preview images should be visible on the device\n screen.\n\n2. Use the following activity manager broadcast command to enable the\n performance overlay for your app.\n\n # Enables ARCore's performance overlay and saves a setting to your app's\n # Android Shared Preferences, so that the overlay remains enabled in\n # subsequent ARCore sessions.\n\n # Your app must have an actively running ARCore session to receive the broadcast.\n adb shell am broadcast -a com.google.ar.core.ENABLE_PERFORMANCE_OVERLAY\n\n3. You may be directed to the **Settings** menu to grant the ARCore package\n permission to draw overlays. This step only needs to be performed once. Find\n **Google Play Services for AR** and set the permissions toggle to **Allowed**\n before navigating back to your app.\n\n If you have enabled the performance overlay without granting ARCore\n permission to draw overlays, you will be directed to the Settings menu each\n time the app begins a new ARCore session. In this case, you should either\n grant ARCore permission, or disable the performance overlay.\n\nDisable the performance overlay\n-------------------------------\n\nFollow these steps to disable the performance overlay.\n\n1. Open the AR experience in your app so that there is an active ARCore session\n running. **Your app must be in AR mode to receive the broadcast that disables\n the overlay.** The AR camera preview images should be visible on the device\n screen.\n\n2. Use the following activity manager broadcast command to disable the\n performance overlay for your app.\n\n # Disables ARCore's performance overlay and saves a setting to your app's\n # Android Shared Preferences, so that the overlay remains disabled in\n # subsequent ARCore sessions.\n\n # Your app must have an actively running ARCore session to receive the broadcast.\n adb shell am broadcast -a com.google.ar.core.DISABLE_PERFORMANCE_OVERLAY\n\nYou can also disable the performance overlay by tapping the close button\non the overlay and clearing\nyour app's Android Shared Preferences. One way to do this is to clear your app's\ndata.\n\nInterpreting CPU usage values\n-----------------------------\n\nThe **Process CPU Usage** field displays the amount of CPU time that the\napplication process currently uses as a percentage of the device's total\navailable CPU time. This value includes application workloads, ARCore workloads,\nand any other libraries that your app uses. For example, the field would display\n25% CPU usage if the application process fully saturates a single CPU core when\nrunning on a quad-core device.\n\nThe performance overlay also provides a CPU usage breakdown for individual\nARCore features. These breakdowns are also expressed as a percentage of the\ndevice's total available CPU time. The workloads are:\n\n- [Motion Tracking](/ar/discover/concepts#motion_tracking)\n- [Plane Detection](/ar/discover/concepts#environmental_understanding)\n\nThe overlay does not display any features that are disabled or using less than\n0.1% CPU time."]]