From d0d973460aac7f64674c831ff5d913e50591f02b Mon Sep 17 00:00:00 2001 From: anyueling Date: Sat, 24 Dec 2022 15:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9hisysevent=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: anyueling --- download/dfx/event/fault/task_fault.cpp | 4 ++-- download/dfx/event/fault/task_fault.h | 4 ++-- download/dfx/event/statistics/task_statistics.cpp | 2 +- download/dfx/event/statistics/task_statistics.h | 2 +- hisysevent.yaml | 6 +++--- upload/frameworks/libs/include/upload_task.h | 2 +- upload/frameworks/libs/src/upload_task.cpp | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/download/dfx/event/fault/task_fault.cpp b/download/dfx/event/fault/task_fault.cpp index e7767abe..7a4f7c54 100644 --- a/download/dfx/event/fault/task_fault.cpp +++ b/download/dfx/event/fault/task_fault.cpp @@ -26,13 +26,13 @@ TaskFault &TaskFault::GetInstance() void TaskFault::ReportServiceStartFault(int error) const { - HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, REQUEST_SERVICE_START_FAULT, + HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, SERVICE_START_FAULT, OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, ERROR_INFO, error); } void TaskFault::ReportTaskFault(int error) const { - HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, REQUEST_TASK_FAULT, + HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, TASK_FAULT, OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, TASKS_TYPE, DOWNLOAD, TOTAL_FILE_NUM, 1, FAIL_FILE_NUM, 1, SUCCESS_FILE_NUM, 0, ERROR_INFO, error); } diff --git a/download/dfx/event/fault/task_fault.h b/download/dfx/event/fault/task_fault.h index 45a15d0d..2561efc0 100644 --- a/download/dfx/event/fault/task_fault.h +++ b/download/dfx/event/fault/task_fault.h @@ -30,8 +30,8 @@ private: TaskFault &operator=(const TaskFault &) = delete; TaskFault &operator=(TaskFault &&) = delete; - static constexpr const char *REQUEST_SERVICE_START_FAULT = "REQUEST_SERVICE_START_FAULT"; - static constexpr const char *REQUEST_TASK_FAULT = "REQUEST_TASK_FAULT"; + static constexpr const char *SERVICE_START_FAULT = "SERVICE_START_FAULT"; + static constexpr const char *TASK_FAULT = "TASK_FAULT"; static constexpr const char *TASKS_TYPE = "TASKS_TYPE"; static constexpr const char *DOWNLOAD = "DOWNLOAD"; static constexpr const char *TOTAL_FILE_NUM = "TOTAL_FILE_NUM"; diff --git a/download/dfx/event/statistics/task_statistics.cpp b/download/dfx/event/statistics/task_statistics.cpp index 815ea24d..c55d2904 100644 --- a/download/dfx/event/statistics/task_statistics.cpp +++ b/download/dfx/event/statistics/task_statistics.cpp @@ -60,7 +60,7 @@ int32_t TaskStatistics::GetNextReportInterval() const void TaskStatistics::ReportStatistics() const { - HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, REQUEST_TASK_INFO_STATISTICS, + HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, TASK_INFO_STATISTICS, OHOS::HiviewDFX::HiSysEvent::EventType::STATISTIC, TASKS_SIZE, &dayTasksSize_, TASKS_NUMBER, &dayTasksNumber_); } diff --git a/download/dfx/event/statistics/task_statistics.h b/download/dfx/event/statistics/task_statistics.h index ca9f500e..377fc45c 100644 --- a/download/dfx/event/statistics/task_statistics.h +++ b/download/dfx/event/statistics/task_statistics.h @@ -37,7 +37,7 @@ private: int32_t GetNextReportInterval() const; void ReportStatistics() const; private: - static constexpr const char *REQUEST_TASK_INFO_STATISTICS = "REQUEST_TASK_INFO_STATISTICS"; + static constexpr const char *TASK_INFO_STATISTICS = "TASK_INFO_STATISTICS"; static constexpr const char *TASKS_SIZE = "TASKS_SIZE"; static constexpr const char *TASKS_NUMBER = "TASKS_NUMBER"; static constexpr int32_t ONE_DAY_SEC = 24 * 3600; diff --git a/hisysevent.yaml b/hisysevent.yaml index 3fb5fb20..e3617593 100644 --- a/hisysevent.yaml +++ b/hisysevent.yaml @@ -39,11 +39,11 @@ domain: REQUEST -REQUEST_SERVICE_START_FAULT: +SERVICE_START_FAULT: __BASE: {type: FAULT, level: CRITICAL, desc: The download service start fail } ERROR_INFO: {type: INT32, desc: Error code } -REQUEST_TASK_FAULT: +TASK_FAULT: __BASE: {type: FAULT, level: MINOR, desc: The request task fail } TASK_TYPE: {type: STRING, desc: Task type} TOTAL_FILE_NUM: {type: UINT32, desc: Total number of documents } @@ -51,7 +51,7 @@ REQUEST_TASK_FAULT: SUCCESS_FILE_NUM: {type: UINT32, desc: Number of successful files } ERROR_INFO: {type: INT32, desc: Error code } -REQUEST_TASK_INFO_STATISTICS: +TASK_INFO_STATISTICS: __BASE: {type: STATISTIC, level: MINOR, desc: Statistics of download tasks } TASKS_SIZE: {type: UINT64, desc: Download tasks size} TASKS_NUMBER: {type: UINT32, desc: Download tasks number} diff --git a/upload/frameworks/libs/include/upload_task.h b/upload/frameworks/libs/include/upload_task.h index f8d39754..2b6b4610 100644 --- a/upload/frameworks/libs/include/upload_task.h +++ b/upload/frameworks/libs/include/upload_task.h @@ -73,7 +73,7 @@ private: std::shared_ptr uploadConfig_; std::unique_ptr thread_; - static constexpr const char *REQUEST_TASK_FAULT = "REQUEST_TASK_FAULT"; + static constexpr const char *TASK_FAULT = "TASK_FAULT"; static constexpr const char *TASKS_TYPE = "TASKS_TYPE"; static constexpr const char *UPLOAD = "UPLOAD"; static constexpr const char *TOTAL_FILE_NUM = "TOTAL_FILE_NUM"; diff --git a/upload/frameworks/libs/src/upload_task.cpp b/upload/frameworks/libs/src/upload_task.cpp index 66747567..f0ce977d 100644 --- a/upload/frameworks/libs/src/upload_task.cpp +++ b/upload/frameworks/libs/src/upload_task.cpp @@ -264,7 +264,7 @@ void UploadTask::ReportTaskFault(uint32_t ret) const failCount++; } } - HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, REQUEST_TASK_FAULT, + HiSysEventWrite(OHOS::HiviewDFX::HiSysEvent::Domain::REQUEST, TASK_FAULT, OHOS::HiviewDFX::HiSysEvent::EventType::FAULT, TASKS_TYPE, UPLOAD, TOTAL_FILE_NUM, fileDatas_.size(), FAIL_FILE_NUM, failCount, SUCCESS_FILE_NUM, successCount, ERROR_INFO, static_cast(ret)); }