未验证 提交 04aef851 编写于 作者: Z zengyawen 提交者: Gitee

update zh-cn/application-dev/reference/apis/js-apis-hichecker.md.

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 53e0e9ff
......@@ -21,15 +21,15 @@ import hichecker from '@ohos.hichecker';
| 名称 | 参数类型 | 说明 |
| ---------------------------------- | -------- | ------------------------------------------------------ |
| RULE_CAUTION_PRINT_LOG | bigInt | 告警规则,当有告警时记录日志。 |
| RULE_CAUTION_TRIGGER_CRASH | bigInt | 告警规则,当有告警时让应用推出。 |
| RULE_THREAD_CHECK_SLOW_PROCESS | bigInt | 检测规则,检测是否有耗时函数被调用。 |
| RULE_CHECK_ABILITY_CONNECTION_LEAK | bigInt | 检测规则,检测是否发生ability泄露。 |
| RULE_CAUTION_PRINT_LOG | bigint | 告警规则,当有告警时记录日志。 |
| RULE_CAUTION_TRIGGER_CRASH | bigint | 告警规则,当有告警时让应用推出。 |
| RULE_THREAD_CHECK_SLOW_PROCESS | bigint | 检测规则,检测是否有耗时函数被调用。 |
| RULE_CHECK_ABILITY_CONNECTION_LEAK | bigint | 检测规则,检测是否发生ability泄露。 |
## hichecker.addRule
addRule(rule: bigInt): void
addRule(rule: bigint): void
添加一条或多条规则到系统,系统根据添加的规则进行检测或反馈。
......@@ -39,7 +39,7 @@ addRule(rule: bigInt): void
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ---------------- |
| rule | bigInt | 是 | 需要添加的规则。 |
| rule | bigint | 是 | 需要添加的规则。 |
**示例:**
......@@ -54,7 +54,7 @@ hichecker.addRule(
## hichecker.removeRule
removeRule(rule: bigInt): void
removeRule(rule: bigint): void
删除一条或多条规则,删除的规则后续将不再生效。
......@@ -64,7 +64,7 @@ removeRule(rule: bigInt): void
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ---------------- |
| rule | bigInt | 是 | 需要删除的规则。 |
| rule | bigint | 是 | 需要删除的规则。 |
**示例:**
......@@ -79,7 +79,7 @@ hichecker.removeRule(
## hichecker.getRule
getRule(): bigInt
getRule(): bigint
获取当前线程规则、进程规则、告警规则的合集。
......@@ -89,7 +89,7 @@ getRule(): bigInt
| 类型 | 说明 |
| ------ | ---------------------- |
| bigInt | 当前系统中添加的规则。 |
| bigint | 当前系统中添加的规则。 |
**示例:**
......@@ -103,7 +103,7 @@ hichecker.getRule(); // return 1n;
## hichecker.contains
contains(rule: bigInt): boolean
contains(rule: bigint): boolean
当前已添加的规则集中是否包含了某一个特定的规则,如果传入的规则级别为线程级别,则仅在当前线程中进行查询。
......@@ -113,7 +113,7 @@ contains(rule: bigInt): boolean
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------ | ---- | ---------------- |
| rule | bigInt | 是 | 需要查询的规则。 |
| rule | bigint | 是 | 需要查询的规则。 |
**返回值:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册