修改部分日志

Signed-off-by: Zhao-PengFei35 <zhaopengfei35@huawei.com>
This commit is contained in:
Zhao-PengFei35 2022-09-09 14:31:29 +08:00
parent fd396958a3
commit 1b6bf9b6d7
2 changed files with 0 additions and 8 deletions

View File

@ -102,7 +102,6 @@ bool CheckValidInfo(const EfficiencyResourceInfo &params)
napi_value ApplyEfficiencyResources(napi_env env, napi_callback_info info) napi_value ApplyEfficiencyResources(napi_env env, napi_callback_info info)
{ {
BGTASK_LOGD("start ApplyEfficiencyResources");
EfficiencyResourceInfo params; EfficiencyResourceInfo params;
napi_value result = nullptr; napi_value result = nullptr;
if (ParseParameters(env, info, params) == nullptr || !CheckValidInfo(params)) { if (ParseParameters(env, info, params) == nullptr || !CheckValidInfo(params)) {

View File

@ -29,8 +29,6 @@
#include "bundle_manager_helper.h" #include "bundle_manager_helper.h"
#include "efficiency_resource_log.h" #include "efficiency_resource_log.h"
#include <chrono>
#include <thread>
namespace OHOS { namespace OHOS {
namespace BackgroundTaskMgr { namespace BackgroundTaskMgr {
namespace { namespace {
@ -159,9 +157,7 @@ void BgEfficiencyResourcesMgr::HandlePersistenceData()
void BgEfficiencyResourcesMgr::EraseRecordIf(ResourceRecordMap &infoMap, void BgEfficiencyResourcesMgr::EraseRecordIf(ResourceRecordMap &infoMap,
const std::function<bool(ResourceRecordPair)> &fun) const std::function<bool(ResourceRecordPair)> &fun)
{ {
BGTASK_LOGI("infoMap.size(): %{public}d ", infoMap.size());
for (auto iter = infoMap.begin(); iter != infoMap.end();) { for (auto iter = infoMap.begin(); iter != infoMap.end();) {
BGTASK_LOGI("key, result %{public}d %{public}d ", iter->first, fun(*iter));
if (fun(*iter)) { if (fun(*iter)) {
infoMap.erase(iter++); infoMap.erase(iter++);
} else { } else {
@ -179,9 +175,6 @@ void BgEfficiencyResourcesMgr::CheckPersistenceData(const std::vector<AppExecFwk
runningUid.emplace(iter.uid_); runningUid.emplace(iter.uid_);
runningPid.emplace(iter.pid_); runningPid.emplace(iter.pid_);
}); });
BGTASK_LOGI("runningUid.size(): %{public}d ", runningUid.size());
BGTASK_LOGI("appResourceApplyMap_.size(): %{public}d ", appResourceApplyMap_.size());
BGTASK_LOGI("procResourceApplyMap_.size(): %{public}d ", procResourceApplyMap_.size());
auto removeUid = [&runningUid](const auto &iter) { return runningUid.find(iter.first) == runningUid.end(); }; auto removeUid = [&runningUid](const auto &iter) { return runningUid.find(iter.first) == runningUid.end(); };
EraseRecordIf(appResourceApplyMap_, removeUid); EraseRecordIf(appResourceApplyMap_, removeUid);
auto removePid = [&runningPid](const auto &iter) { return runningPid.find(iter.first) == runningPid.end(); }; auto removePid = [&runningPid](const auto &iter) { return runningPid.find(iter.first) == runningPid.end(); };