Home
last modified time | relevance | path

Searched refs:g_statsService (Results 1 – 25 of 30) sorted by relevance

12

/base/powermgr/battery_statistics/test/unittest/src/servicetest/mock/
Dstats_service_test_mock_parcel.cpp27 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/
Dstats_service_subscriber_test.cpp41 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 …]
Dstats_service_alarm_test.cpp34 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()
Dstats_service_audio_test.cpp34 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()
Dstats_service_dump_test.cpp37 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()
Dstats_service_location_test.cpp34 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()
Dstats_service_powermgr_test.cpp37 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()
Dstats_service_display_test.cpp36 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()
Dstats_service_wifi_test.cpp35 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/
Dcpu_entity.cpp24 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()
128g_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()
Duid_entity.cpp31 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()
Didle_entity.cpp24 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()
Dwifi_entity.cpp26 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()
Dscreen_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
81 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SCREEN_ON); in Calculate()
86g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SCREEN_BRIGHTNESS); in Calculate()
Dbluetooth_entity.cpp31 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
54g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); in CalculateBtPower()
61g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); in CalculateBtPower()
94g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); in CalculateBtPowerForApp()
101g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_SCAN); in CalculateBtPowerForApp()
430 auto core = g_statsService->GetBatteryStatsCore(); in GetBluetoothUidPower()
Dalarm_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
50 …auto alarmOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CUR… in Calculate()
Dgnss_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
53 …auto gnssOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURR… in Calculate()
Daudio_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
57 …auto audioOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CUR… in Calculate()
Dflashlight_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
54g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_FLASHLIGHT_ON); in Calculate()
Dwakelock_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
54 g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_CPU_AWAKE); in Calculate()
Dphone_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
104g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_RADIO_ON, i); in Calculate()
114g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_RADIO_DATA, i); in Calculate()
Dsensor_entity.cpp26 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
69g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_GRAVITY); in CalculateGravity()
88g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_PROXIMITY); in CalculateProximity()
Dcamera_entity.cpp24 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
51 …auto cameraOnAverageMa = g_statsService->GetBatteryStatsParser()->GetAveragePowerMa(StatsUtils::CU… in Calculate()
Duser_entity.cpp27 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
/base/powermgr/battery_statistics/services/native/src/
Dcpu_time_reader.cpp33 auto g_statsService = DelayedStatsSpSingleton<BatteryStatsService>::GetInstance(); variable
231g_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()
452g_statsService->GetBatteryStatsCore()->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_APP); in ReadUidCpuFreqTime()
536g_statsService->GetBatteryStatsCore()->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_APP); in ReadUidCpuTime()

12