/base/powermgr/battery_statistics/test/unittest/src/servicetest/mock/ |
D | stats_service_test_mock_parcel.cpp | 27 static sptr<BatteryStatsService> g_statsService = nullptr; variable 34 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 35 g_statsService->OnStart(); in SetUpTestCase() 38 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 44 g_statsService->OnStop(); in TearDownTestCase()
|
/base/powermgr/battery_statistics/test/unittest/src/servicetest/ |
D | stats_service_subscriber_test.cpp | 41 static sptr<BatteryStatsService> g_statsService = nullptr; variable 49 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 50 g_statsService->OnStart(); in SetUpTestCase() 52 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 53 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 56 if (g_statsService->subscriberPtr_ == nullptr) { in SetUpTestCase() 59 g_statsService->subscriberPtr_ = std::make_shared<BatteryStatsSubscriber>(subscribeInfo); in SetUpTestCase() 63 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 69 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 70 g_statsService->subscriberPtr_ = nullptr; in TearDownTestCase() [all …]
|
D | stats_service_alarm_test.cpp | 34 static sptr<BatteryStatsService> g_statsService = nullptr; variable 41 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 42 g_statsService->OnStart(); in SetUpTestCase() 44 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 45 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 49 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 55 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 56 g_statsService->OnStop(); in TearDownTestCase()
|
D | stats_service_audio_test.cpp | 34 static sptr<BatteryStatsService> g_statsService = nullptr; variable 41 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 42 g_statsService->OnStart(); in SetUpTestCase() 44 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 45 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 49 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 55 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 56 g_statsService->OnStop(); in TearDownTestCase()
|
D | stats_service_dump_test.cpp | 37 static sptr<BatteryStatsService> g_statsService = nullptr; variable 45 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 46 g_statsService->OnStart(); in SetUpTestCase() 47 g_statsService->isBootCompleted_ = true; in SetUpTestCase() 49 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 50 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 54 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 61 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 62 g_statsService->OnStop(); in TearDownTestCase()
|
D | stats_service_location_test.cpp | 34 static sptr<BatteryStatsService> g_statsService = nullptr; variable 41 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 42 g_statsService->OnStart(); in SetUpTestCase() 44 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 45 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 49 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 55 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 56 g_statsService->OnStop(); in TearDownTestCase()
|
D | stats_service_powermgr_test.cpp | 37 static sptr<BatteryStatsService> g_statsService = nullptr; variable 44 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 45 g_statsService->OnStart(); in SetUpTestCase() 47 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 48 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 52 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 58 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 59 g_statsService->OnStop(); in TearDownTestCase()
|
D | stats_service_display_test.cpp | 36 static sptr<BatteryStatsService> g_statsService = nullptr; variable 65 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 66 g_statsService->OnStart(); in SetUpTestCase() 68 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 69 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 73 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 82 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 83 g_statsService->OnStop(); in TearDownTestCase()
|
D | stats_service_wifi_test.cpp | 35 static sptr<BatteryStatsService> g_statsService = nullptr; variable 42 g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); in SetUpTestCase() 43 g_statsService->OnStart(); in SetUpTestCase() 45 if (g_statsService->listenerPtr_ == nullptr) { in SetUpTestCase() 46 g_statsService->listenerPtr_ = std::make_shared<BatteryStatsListener>(); in SetUpTestCase() 50 g_statsServiceProxy = std::make_shared<StatsServiceTestProxy>(g_statsService); in SetUpTestCase() 56 g_statsService->listenerPtr_ = nullptr; in TearDownTestCase() 57 g_statsService->OnStop(); in TearDownTestCase()
|
/base/powermgr/battery_statistics/services/native/src/entities/ |
D | cpu_entity.cpp | 24 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 106 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_CPU_ACTIVE); in CalculateCpuActivePower() 126 for (uint16_t i = 0; i < g_statsService->GetBatteryStatsParser()->GetClusterNum(); i++) { in CalculateCpuClusterPower() 128 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_CPU_CLUSTER, i); in CalculateCpuClusterPower() 148 for (uint16_t i = 0; i < g_statsService->GetBatteryStatsParser()->GetClusterNum(); i++) { in CalculateCpuSpeedPower() 149 for (uint16_t j = 0; j < g_statsService->GetBatteryStatsParser()->GetSpeedNum(i); j++) { in CalculateCpuSpeedPower() 152 …double cpuSpeedAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(statType, j); in CalculateCpuSpeedPower()
|
D | uid_entity.cpp | 31 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 64 auto core = g_statsService->GetBatteryStatsCore(); in CalculateForConnectivity() 77 auto core = g_statsService->GetBatteryStatsCore(); in CalculateForCommon() 118 auto core = g_statsService->GetBatteryStatsCore(); in Calculate() 162 auto core = g_statsService->GetBatteryStatsCore(); in GetPowerForConnectivity() 176 auto core = g_statsService->GetBatteryStatsCore(); in GetPowerForCommon() 255 auto core = g_statsService->GetBatteryStatsCore(); in DumpForBluetooth() 269 auto core = g_statsService->GetBatteryStatsCore(); in DumpForCommon() 322 auto core = g_statsService->GetBatteryStatsCore(); in DumpInfo()
|
D | idle_entity.cpp | 24 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 66 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_CPU_SUSPEND); in CalculateCpuSuspendPower() 77 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_CPU_IDLE); in CalculateCpuIdlePower()
|
D | wifi_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 37 …auto wifiOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURR… in Calculate() 42 …auto wifiScanAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CU… in Calculate()
|
D | screen_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 81 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SCREEN_ON); in Calculate() 86 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SCREEN_BRIGHTNESS); in Calculate()
|
D | bluetooth_entity.cpp | 31 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 54 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); in CalculateBtPower() 61 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); in CalculateBtPower() 94 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); in CalculateBtPowerForApp() 101 …g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_SCAN); in CalculateBtPowerForApp() 430 auto core = g_statsService->GetBatteryStatsCore(); in GetBluetoothUidPower()
|
D | alarm_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 50 …auto alarmOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CUR… in Calculate()
|
D | gnss_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 53 …auto gnssOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURR… in Calculate()
|
D | audio_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 57 …auto audioOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CUR… in Calculate()
|
D | flashlight_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 54 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_FLASHLIGHT_ON); in Calculate()
|
D | wakelock_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 54 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_CPU_AWAKE); in Calculate()
|
D | phone_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 104 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_RADIO_ON, i); in Calculate() 114 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_RADIO_DATA, i); in Calculate()
|
D | sensor_entity.cpp | 26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 69 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_GRAVITY); in CalculateGravity() 88 … g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_PROXIMITY); in CalculateProximity()
|
D | camera_entity.cpp | 24 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 51 …auto cameraOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CU… in Calculate()
|
D | user_entity.cpp | 27 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
|
/base/powermgr/battery_statistics/services/native/src/ |
D | cpu_time_reader.cpp | 33 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable 231 … g_statsService->GetBatteryStatsCore()->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_APP); in ReadUidCpuActiveTime() 314 …auto uidEntity = g_statsService->GetBatteryStatsCore()->GetEntity(BatteryStatsInfo::CONSUMPTION_TY… in ReadUidCpuClusterTime() 367 auto parser = g_statsService->GetBatteryStatsParser(); in ReadFreqTimeIncrement() 398 auto parser = g_statsService->GetBatteryStatsParser(); in DistributeFreqTime() 414 auto parser = g_statsService->GetBatteryStatsParser(); in AddFreqTimeToUid() 452 … g_statsService->GetBatteryStatsCore()->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_APP); in ReadUidCpuFreqTime() 536 … g_statsService->GetBatteryStatsCore()->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_APP); in ReadUidCpuTime()
|