• Home
Name Date Size #Lines LOC

..--

AppScope/12-May-2024-3734

entry/12-May-2024-860704

screenshots/device/12-May-2024-

README.mdD12-May-20241.3 KiB3417

README_zh.mdD12-May-20241.1 KiB3418

build-profile.json5D12-May-20241 KiB4341

hvigorfile.jsD12-May-2024168 21

package.jsonD12-May-2024368 1818

README.md

1# HiDebug
2
3### Introduction
4
5This sample shows how to use HiDebug APIs to obtain the memory usage of an application. The display effect is as follows:
6
7![](screenshots/device/index.png) ![](screenshots/device/data.png)
8
9### Concepts
10
11**HiDebug**: a module that allows you to obtain the memory usage of an application, including the static heap memory (native heap) and proportional set size (PSS) occupied by the application process. It also allows you to export VM memory slices and collect VM CPU profiling data.
12
13**Stack**: a component that provides a stack container where child components are successively stacked and the latter one overwrites the previous one.
14
15**@Builder**: a decorator used for a method to define the declarative UI description of a component and quickly generate multiple layouts in a custom component.
16
17### Required Permissions
18
19N/A
20
21### Usage
22
231. Touch the **Debug** icon in the upper right corner of the page. The debugging information page is displayed, showing the memory usage of the application.
24
252. Touch the **Debug** icon again. The debugging information page disappears.
26
27### Constraints
28
291. This sample can only be run on standard-system devices.
30
312. This sample is based on the stage model, which is supported from API version 9.
32
333. DevEco Studio 3.0 Beta4 (Build version: 3.0.0.992, built on July 14, 2022) must be used.
34

README_zh.md

1# Debug
2
3### 概要简介
4
5本示例通过使用hidebug,获取当前应用内存使用情况。实现效果如下:
6
7![](screenshots/device/index.png) ![](screenshots/device/data.png)
8
9### 相关概念
10
11Debug调试:获取应用内存的使用情况,包括应用进程的静态堆内存(native heap)信息、应用进程内存占用PSS(Proportional Set Size)信息等; 可以完成虚拟机内存切片导出,虚拟机CPU
12Profiling采集等操作。
13
14Stack:堆叠容器,子组件按照顺序依次入栈,后一个子组件覆盖前一个子组件。
15
16@Builder:@Builder装饰的方法用于定义组件的声明式UI描述,在一个自定义组件内快速生成多个布局内容。
17
18### 相关权限
19
20不涉及。
21
22### 使用说明
23
241.点击界面右上方Debug图标,弹出Debug信息界面,显示当前应用内存使用情况。
25
262.再次点击右上方Debug图标,Debug信息界面消失。
27
28### 约束与限制
29
301.本示例仅支持标准系统上运行。
31
322.本示例为Stage模型,从API version 9开始支持。
33
343.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。