mirror of
https://github.com/openharmony/security_device_auth.git
synced 2026-08-24 19:23:10 -04:00
@@ -35,7 +35,7 @@ IMPLEMENT_HC_VECTOR(PerformDataVec, PerformData*, 1)
|
||||
static bool g_isInit = false;
|
||||
static HcMutex *g_performDataMutex = NULL;
|
||||
static PerformDataVec g_performDataVec;
|
||||
static bool g_isPerformDumpEnabled = false;
|
||||
static bool g_isPerformDumpEnabled = true;
|
||||
static uint32_t g_bindClientSessionNum = 0;
|
||||
static uint32_t g_bindServerSessionNum = 0;
|
||||
static uint32_t g_authClientSessionNum = 0;
|
||||
@@ -207,21 +207,27 @@ static void DumpPerformData(int fd, PerformData *performData)
|
||||
int64_t firstConsume = 0;
|
||||
if (performData->firstStartTime != 0) {
|
||||
firstConsume = GetConsumeTimeByIndex(performData, FIRST_START_TIME);
|
||||
LOGI("firstConsume time: %" PRId64 " milliseconds", firstConsume);
|
||||
}
|
||||
int64_t secondConsume = 0;
|
||||
if (performData->secondStartTime != 0) {
|
||||
secondConsume = GetConsumeTimeByIndex(performData, SECOND_START_TIME);
|
||||
LOGI("secondConsume time: %" PRId64 " milliseconds", secondConsume);
|
||||
}
|
||||
int64_t thirdConsume = 0;
|
||||
if (performData->thirdStartTime != 0) {
|
||||
thirdConsume = GetConsumeTimeByIndex(performData, THIRD_START_TIME);
|
||||
LOGI("thirdConsume time: %" PRId64 " milliseconds", thirdConsume);
|
||||
}
|
||||
int64_t fourthConsume = 0;
|
||||
if (performData->fourthStartTime != 0) {
|
||||
fourthConsume = GetConsumeTimeByIndex(performData, FOURTH_START_TIME);
|
||||
LOGI("fourthConsume time: %" PRId64 " milliseconds", fourthConsume);
|
||||
}
|
||||
int64_t innerConsume = firstConsume + secondConsume + thirdConsume + fourthConsume;
|
||||
LOGI("innerConsume time: %" PRId64 " milliseconds", innerConsume);
|
||||
int64_t totalTime = performData->onFinishTime - performData->firstStartTime;
|
||||
LOGI("totalTime time: %" PRId64 " milliseconds", totalTime);
|
||||
char reqIdStr[MAX_REQUEST_ID_LEN] = { 0 };
|
||||
if (sprintf_s(reqIdStr, MAX_REQUEST_ID_LEN, "%lld", performData->reqId) <= 0) {
|
||||
LOGE("Failed to get requestId string!");
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "across_account_group.h"
|
||||
#include "identical_account_group.h"
|
||||
#include "peer_to_peer_group.h"
|
||||
#include "hc_time.h"
|
||||
|
||||
static bool IsGroupTypeSupported(int groupType)
|
||||
{
|
||||
@@ -508,7 +509,11 @@ static int32_t CreateGroupInner(int32_t osAccountId, int64_t requestId, const ch
|
||||
|
||||
static int32_t RequestCreateGroup(int32_t osAccountId, int64_t requestId, const char *appId, const char *createParams)
|
||||
{
|
||||
int64_t startTime = HcGetCurTimeInMillis();
|
||||
int32_t res = CreateGroupInner(osAccountId, requestId, appId, createParams);
|
||||
int64_t endTime = HcGetCurTimeInMillis();
|
||||
int64_t elapsedTime = endTime - startTime;
|
||||
LOGI("CreateGroup elapsed time: %" PRId64 " milliseconds", elapsedTime);
|
||||
DEV_AUTH_REPORT_CALL_EVENT(requestId, CREATE_GROUP_EVENT, appId, osAccountId, res);
|
||||
return res;
|
||||
}
|
||||
@@ -545,7 +550,11 @@ static int32_t DeleteGroupInner(int32_t osAccountId, int64_t requestId, const ch
|
||||
|
||||
static int32_t RequestDeleteGroup(int32_t osAccountId, int64_t requestId, const char *appId, const char *disbandParams)
|
||||
{
|
||||
int64_t startTime = HcGetCurTimeInMillis();
|
||||
int32_t res = DeleteGroupInner(osAccountId, requestId, appId, disbandParams);
|
||||
int64_t endTime = HcGetCurTimeInMillis();
|
||||
int64_t elapsedTime = endTime - startTime;
|
||||
LOGI("DeleteGroup elapsed time: %" PRId64 " milliseconds", elapsedTime);
|
||||
DEV_AUTH_REPORT_CALL_EVENT(requestId, DELETE_GROUP_EVENT, appId, osAccountId, res);
|
||||
return res;
|
||||
}
|
||||
@@ -584,7 +593,11 @@ static int32_t DeleteMemberFromGroupInner(int32_t osAccountId, int64_t requestId
|
||||
static int32_t RequestDeleteMemberFromGroup(int32_t osAccountId, int64_t requestId, const char *appId,
|
||||
const char *deleteParams)
|
||||
{
|
||||
int64_t startTime = HcGetCurTimeInMillis();
|
||||
int32_t res = DeleteMemberFromGroupInner(osAccountId, requestId, appId, deleteParams);
|
||||
int64_t endTime = HcGetCurTimeInMillis();
|
||||
int64_t elapsedTime = endTime - startTime;
|
||||
LOGI("DeleteMemberFromGroup elapsed time: %" PRId64 " milliseconds", elapsedTime);
|
||||
DEV_AUTH_REPORT_CALL_EVENT(requestId, DEL_MEMBER_EVENT, appId, osAccountId, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user