diff --git a/en/application-dev/reference/apis/js-apis-hichecker.md b/en/application-dev/reference/apis/js-apis-hichecker.md index 70022fd0211204446dee616640221bd394f61e7e..eef977c21d3d9248d28961a7eebe482769573119 100644 --- a/en/application-dev/reference/apis/js-apis-hichecker.md +++ b/en/application-dev/reference/apis/js-apis-hichecker.md @@ -11,21 +11,19 @@ import hichecker from '@ohos.hichecker'; ``` -## System Capabilities - -SystemCapability.HiviewDFX.HiChecker - -## Rule Constants +## Constants Provides the constants of all rule types. -| Name| Type| Description| +**System capability**: SystemCapability.HiviewDFX.HiChecker + +| Name | Type| Description | | ---------------------------------- | -------- | ------------------------------------------------------ | -| RULE_CAUTION_PRINT_LOG | BigInt | Alarm rule, which is programmed to print a log when an alarm is generated.| -| RULE_CAUTION_TRIGGER_CRASH | BigInt | Alarm rule, which is programmed to force the application to exit when an alarm is generated.| -| RULE_THREAD_CHECK_SLOW_PROCESS | BigInt | Caution rule, which is programmed to detect whether any time-consuming function is invoked.| -| RULE_CHECK_SLOW_EVENT | BigInt | Caution rule, which is programmed to detect whether the event distribution or processing time has exceeded the specified time threshold.| -| RULE_CHECK_ABILITY_CONNECTION_LEAK | BigInt | Caution rule, which is programmed to detect whether ability leakage has occurred.| +| RULE\_CAUTION\_PRINT\_LOG | BigInt | Alarm rule, which is programmed to print a log when an alarm is generated. | +| RULE\_CAUTION\_TRIGGER\_CRASH | BigInt | Alarm rule, which is programmed to force the application to exit when an alarm is generated. | +| RULE\_THREAD\_CHECK\_SLOW\_PROCESS | BigInt | Caution rule, which is programmed to detect whether any time-consuming function is invoked. | +| RULE\_CHECK\_SLOW\_EVENT | BigInt | Caution rule, which is programmed to detect whether the event distribution or processing time has exceeded the specified time threshold.| +| RULE\_CHECK\_ABILITY\_CONNECTION\_LEAK| BigInt | Caution rule, which is programmed to detect whether ability leakage has occurred. | ## hichecker.addRule @@ -34,11 +32,13 @@ addRule(rule: BigInt): void Adds one or more rules. HiChecker detects unexpected operations or gives feedback based on the added rules. +**System capability**: SystemCapability.HiviewDFX.HiChecker + **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type | Mandatory| Description | | ------ | ------ | ---- | ---------------- | -| rule | BigInt | Yes| Rule to be added.| +| rule | BigInt | Yes | Rule to be added.| **Example** @@ -57,11 +57,13 @@ removeRule(rule: BigInt): void Removes one or more rules. The removed rules will become ineffective. +**System capability**: SystemCapability.HiviewDFX.HiChecker + **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type | Mandatory| Description | | ------ | ------ | ---- | ---------------- | -| rule | BigInt | Yes| Rule to be removed.| +| rule | BigInt | Yes | Rule to be removed.| **Example** @@ -80,9 +82,11 @@ getRule(): BigInt Obtains a collection of thread, process, and alarm rules that have been added. +**System capability**: SystemCapability.HiviewDFX.HiChecker + **Return value** -| Type| Description| +| Type | Description | | ------ | ---------------------- | | BigInt | Collection of added rules.| @@ -93,7 +97,7 @@ Obtains a collection of thread, process, and alarm rules that have been added. hichecker.addRule(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS); // Obtain the collection of added rules. -hichecker.getRule(); // return 1n; +hichecker.getRule(); // Return 1n. ``` ## hichecker.contains @@ -102,15 +106,17 @@ contains(rule: BigInt): boolean Checks whether the specified rule exists in the collection of added rules. If the rule is of the thread level, this operation is performed only on the current thread. +**System capability**: SystemCapability.HiviewDFX.HiChecker + **Parameters** -| Name| Type| Mandatory| Description| +| Name| Type | Mandatory| Description | | ------ | ------ | ---- | ---------------- | -| rule | BigInt | Yes| Rule to be checked.| +| rule | BigInt | Yes | Rule to be checked.| **Return value** -| Type| Description| +| Type | Description | | ------- | ---------------------------------------------------------- | | boolean | Returns **true** if the rule exists in the collection of added rules; returns **false** otherwise.| @@ -121,6 +127,6 @@ Checks whether the specified rule exists in the collection of added rules. If th hichecker.addRule(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS); // Check whether the added rule exists in the collection of added rules. -hichecker.contains(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS); // return true; -hichecker.contains(hichecker.RULE_CAUTION_PRINT_LOG); // return false; +hichecker.contains(hichecker.RULE_THREAD_CHECK_SLOW_PROCESS); // Return true. +hichecker.contains(hichecker.RULE_CAUTION_PRINT_LOG); // Return false. ``` diff --git a/en/device-dev/subsystems/subsys-boot-appspawn-standard.md b/en/device-dev/subsystems/subsys-boot-appspawn-standard.md index 06019edbb3695df60f5a9d3c0aa8022d6f6e569e..1defe3cf035c92647a870b72f6c73c5cf3e7418c 100644 --- a/en/device-dev/subsystems/subsys-boot-appspawn-standard.md +++ b/en/device-dev/subsystems/subsys-boot-appspawn-standard.md @@ -62,7 +62,7 @@ After being started by the init process, the appspawn process waits for inter-pr
Information about the application process group to be started. Its length is specified by **gidCount**. A maximum of 64 process groups are supported. The value must be a positive number.
+Information about the application process group to be started. Its length is specified by gidCount. A maximum of 64 process groups are supported. The value must be a positive number.
|
+**Table 2** API description
+ |
|---|