mirror of
https://gitee.com/openharmony/request_request
synced 2024-11-23 06:49:58 +00:00
修改hisysevent事件名称
Signed-off-by: anyueling <anyueling@huawei.com>
This commit is contained in:
parent
9f447143dd
commit
d0d973460a
@ -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);
|
||||
}
|
||||
|
@ -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";
|
||||
|
@ -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_);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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}
|
||||
|
@ -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";
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user