修改hisysevent事件名称

Signed-off-by: anyueling <anyueling@huawei.com>
This commit is contained in:
anyueling 2022-12-24 15:43:30 +08:00
parent 9f447143dd
commit d0d973460a
7 changed files with 11 additions and 11 deletions

View File

@ -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);
}

View File

@ -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";

View File

@ -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_);
}

View File

@ -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;

View File

@ -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}

View File

@ -73,7 +73,7 @@ private:
std::shared_ptr<UploadConfig> uploadConfig_;
std::unique_ptr<std::thread> 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";

View File

@ -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<int>(ret));
}