mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-19 06:47:09 +00:00
change app_cold_start and app_warm_start socperf timing
Signed-off-by: HaoyangT <tonghaoyang1@huawei.com>
This commit is contained in:
parent
b210060d93
commit
c43918a626
@ -877,6 +877,18 @@ void AbilityManagerService::ReportAbilitStartInfoToRSS(const AppExecFwk::Ability
|
||||
#ifdef RESOURCE_SCHEDULE_SERVICE_ENABLE
|
||||
if (abilityInfo.type == AppExecFwk::AbilityType::PAGE &&
|
||||
abilityInfo.launchMode != AppExecFwk::LaunchMode::SPECIFIED) {
|
||||
std::vector<AppExecFwk::RunningProcessInfo> runningProcessInfos;
|
||||
int ret = IN_PROCESS_CALL(GetProcessRunningInfos(runningProcessInfos));
|
||||
if (ret != ERR_OK) {
|
||||
return;
|
||||
}
|
||||
bool isColdStart = true;
|
||||
for (auto const &info : runningProcessInfos) {
|
||||
if (info.uid_ == abilityInfo.applicationInfo.uid) {
|
||||
isColdStart = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
std::unordered_map<std::string, std::string> eventParams {
|
||||
{ "name", "ability_start" },
|
||||
{ "uid", std::to_string(abilityInfo.applicationInfo.uid) },
|
||||
@ -884,7 +896,7 @@ void AbilityManagerService::ReportAbilitStartInfoToRSS(const AppExecFwk::Ability
|
||||
{ "abilityName", abilityInfo.name }
|
||||
};
|
||||
ResourceSchedule::ResSchedClient::GetInstance().ReportData(
|
||||
ResourceSchedule::ResType::RES_TYPE_APP_ABILITY_START, 0, eventParams);
|
||||
ResourceSchedule::ResType::RES_TYPE_APP_ABILITY_START, isColdStart ? 1 : 0, eventParams);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user