Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
8faf2a8c
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
8faf2a8c
编写于
3月 16, 2023
作者:
Z
zengyawen
提交者:
Gitee
3月 16, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update zh-cn/application-dev/reference/apis/js-apis-hidebug.md.
Signed-off-by:
N
zengyawen
<
zengyawen1@huawei.com
>
上级
f8f15619
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
77 addition
and
78 deletion
+77
-78
zh-cn/application-dev/reference/apis/js-apis-hidebug.md
zh-cn/application-dev/reference/apis/js-apis-hidebug.md
+77
-78
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-hidebug.md
浏览文件 @
8faf2a8c
...
@@ -19,8 +19,6 @@ getNativeHeapSize(): bigint
...
@@ -19,8 +19,6 @@ getNativeHeapSize(): bigint
获取本应用堆内存的总大小。
获取本应用堆内存的总大小。
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**返回值:**
**返回值:**
...
@@ -42,8 +40,6 @@ getNativeHeapAllocatedSize(): bigint
...
@@ -42,8 +40,6 @@ getNativeHeapAllocatedSize(): bigint
获取本应用堆内存的已分配内存大小。
获取本应用堆内存的已分配内存大小。
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**返回值:**
**返回值:**
...
@@ -65,8 +61,6 @@ getNativeHeapFreeSize(): bigint
...
@@ -65,8 +61,6 @@ getNativeHeapFreeSize(): bigint
获取本应用堆内存的空闲内存大小。
获取本应用堆内存的空闲内存大小。
本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**返回值:**
**返回值:**
...
@@ -163,76 +157,6 @@ getCpuUsage(): number
...
@@ -163,76 +157,6 @@ getCpuUsage(): number
let
cpuUsage
=
hidebug
.
getCpuUsage
();
let
cpuUsage
=
hidebug
.
getCpuUsage
();
```
```
## hidebug.startProfiling<sup>(deprecated)</sup>
startProfiling(filename : string) : void
> **说明:** 从 API Version 9 开始废弃,建议使用[hidebug.startJsCpuProfiling](#hidebugstartjscpuprofiling9)替代。
启动虚拟机Profiling方法跟踪,
`startProfiling()`
方法的调用需要与
`stopProfiling()`
方法的调用一一对应,先开启后关闭,严禁使用
`start->start->stop`
,
`start->stop->stop`
,
`start->start->stop->stop`
等类似的顺序调用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| filename | string | 是 | 用户自定义的profiling文件名,根据传入的
`filename`
,将在应用的
`files`
目录生成
`filename.json`
文件。 |
**示例:**
```
js
hidebug
.
startProfiling
(
"
cpuprofiler-20220216
"
);
// code block
// ...
// code block
hidebug
.
stopProfiling
();
```
## hidebug.stopProfiling<sup>(deprecated)</sup>
stopProfiling() : void
> **说明:** 从 API Version 9 开始废弃,建议使用[hidebug.stopJsCpuProfiling](#hidebugstopjscpuprofiling9)替代。
停止虚拟机Profiling方法跟踪,
`stopProfiling()`
方法的调用需要与
`startProfiling()`
方法的调用一一对应,先开启后关闭,严禁使用
`start->start->stop`
,
`start->stop->stop`
,
`start->start->stop->stop`
等类似的顺序调用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**示例:**
```
js
hidebug
.
startProfiling
(
"
cpuprofiler-20220216
"
);
// code block
// ...
// code block
hidebug
.
stopProfiling
();
```
## hidebug.dumpHeapData<sup>(deprecated)</sup>
dumpHeapData(filename : string) : void
> **说明:** 从 API Version 9 开始废弃,建议使用[hidebug.dumpJsHeapData](#hidebugdumpjsheapdata9)替代。
虚拟机堆导出。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| filename | string | 是 | 用户自定义的虚拟机堆文件名,根据传入的
`filename`
,将在应用的
`files`
目录生成
`filename.heapsnapshot`
文件。 |
**示例:**
```
js
hidebug
.
dumpHeapData
(
"
heap-20220216
"
);
```
## hidebug.getServiceDump<sup>9+<sup>
## hidebug.getServiceDump<sup>9+<sup>
getServiceDump(serviceid : number, fd : number, args : Array
\<
string>) : void
getServiceDump(serviceid : number, fd : number, args : Array
\<
string>) : void
...
@@ -251,7 +175,6 @@ getServiceDump(serviceid : number, fd : number, args : Array\<string>) : void
...
@@ -251,7 +175,6 @@ getServiceDump(serviceid : number, fd : number, args : Array\<string>) : void
| fd | number | 是 | 文件描述符,该接口会往该fd中写入数据。|
| fd | number | 是 | 文件描述符,该接口会往该fd中写入数据。|
| args | Array
\<
string> | 是 | 系统服务的Dump接口所对应的参数列表。|
| args | Array
\<
string> | 是 | 系统服务的Dump接口所对应的参数列表。|
**示例:**
**示例:**
```
js
```
js
...
@@ -359,4 +282,80 @@ try {
...
@@ -359,4 +282,80 @@ try {
console
.
info
(
error
.
code
)
console
.
info
(
error
.
code
)
console
.
info
(
error
.
message
)
console
.
info
(
error
.
message
)
}
}
```
```
\ No newline at end of file
## hidebug.startProfiling<sup>(deprecated)</sup>
startProfiling(filename : string) : void
> **说明:**
>
> 从 API version 9 开始废弃,建议使用[hidebug.startJsCpuProfiling](#hidebugstartjscpuprofiling9)替代。
启动虚拟机Profiling方法跟踪,
`startProfiling()`
方法的调用需要与
`stopProfiling()`
方法的调用一一对应,先开启后关闭,严禁使用
`start->start->stop`
,
`start->stop->stop`
,
`start->start->stop->stop`
等类似的顺序调用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| filename | string | 是 | 用户自定义的profiling文件名,根据传入的
`filename`
,将在应用的
`files`
目录生成
`filename.json`
文件。 |
**示例:**
```
js
hidebug
.
startProfiling
(
"
cpuprofiler-20220216
"
);
// code block
// ...
// code block
hidebug
.
stopProfiling
();
```
## hidebug.stopProfiling<sup>(deprecated)</sup>
stopProfiling() : void
> **说明:**
>
> 从 API version 9 开始废弃,建议使用[hidebug.stopJsCpuProfiling](#hidebugstopjscpuprofiling9)替代。
停止虚拟机Profiling方法跟踪,
`stopProfiling()`
方法的调用需要与
`startProfiling()`
方法的调用一一对应,先开启后关闭,严禁使用
`start->start->stop`
,
`start->stop->stop`
,
`start->start->stop->stop`
等类似的顺序调用。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**示例:**
```
js
hidebug
.
startProfiling
(
"
cpuprofiler-20220216
"
);
// code block
// ...
// code block
hidebug
.
stopProfiling
();
```
## hidebug.dumpHeapData<sup>(deprecated)</sup>
dumpHeapData(filename : string) : void
> **说明:**
>
> 从 API version 9 开始废弃,建议使用[hidebug.dumpJsHeapData](#hidebugdumpjsheapdata9)替代。
虚拟机堆导出。
**系统能力:**
SystemCapability.HiviewDFX.HiProfiler.HiDebug
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | ------ | ---- | ------------------------------------------------------------ |
| filename | string | 是 | 用户自定义的虚拟机堆文件名,根据传入的
`filename`
,将在应用的
`files`
目录生成
`filename.heapsnapshot`
文件。 |
**示例:**
```
js
hidebug
.
dumpHeapData
(
"
heap-20220216
"
);
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录