告警清理:重复实现提取

Signed-off-by: niuyuan <niuyuan@huawei.com>
This commit is contained in:
niuyuan
2023-08-26 15:42:25 +08:00
committed by pengfojin
parent 1fa83d8af6
commit c0e6f829e8
11 changed files with 280 additions and 454 deletions
+1 -6
View File
@@ -20,6 +20,7 @@
#include "napi/native_api.h"
#include "napi/native_node_api.h"
#include "syscap_interface.h"
#include "context_tool.h"
namespace OHOS {
EXTERN_C_START
@@ -28,12 +29,6 @@ constexpr size_t PCID_MAIN_U32 = OS_SYSCAP_U32_NUM + 2;
constexpr size_t U32_TO_STR_MAX_LEN = 11;
constexpr size_t KEY_BUFFER_SIZE = 32;
#define PRINT_ERR(...) \
do { \
printf("ERROR: [%s: %d] -> ", __FILE__, __LINE__); \
printf(__VA_ARGS__); \
} while (0)
#define GET_PARAMS(env, info, num) \
size_t argc = num; \
napi_value argv[num] = {0}; \