1# Battery Statistics<a name="EN-US_TOPIC_0000001115047353"></a>
2
3-   [Introduction](#section11660541593)
4-   [Directory Structure](#section19472752217)
5-   [Repositories Involved](#section63151229062)
6
7## Introduction<a name="section11660541593"></a>
8
9The battery statistics module provides the following functions:
10
111. Software power consumption statistics: collects statistics on power consumption of each application or software. The power consumption is measured by Uid. Software power consumption includes but is not limited to the following items: CPU power consumption, running lock power consumption, mobile wireless power consumption, Wi-Fi power consumption, GNSS power consumption, sensor power consumption, camera power consumption, flashlight power consumption, etc.
122. Hardware power consumption statistics: collects statistics on power consumption of the hardware. Power consumption beyond software power consumption belongs to hardware power consumption. It includes but is not limited to the following items: user power consumption, call power consumption, screen power consumption, Wi-Fi power consumption, and Bluetooth power consumption.
13
14**Figure 1**  Architecture of the battery statistics module<a name="fig106301571239"></a>
15
16![](figures/power-management-subsystem-architecture.png "Architecture of the power management subsystem")
17
18## Directory Structure<a name="section19472752217"></a>
19
20```
21/base/powermgr/battery_statistics
22├── figures                     # Architecture
23├── frameworks                  # Framework layer
24│   ├── napi                  	# NAPI layer
25│   └── native                  # Native layer
26├── interfaces                  # API layer
27│   └── inner_api               # Internal APIs
28├── sa_profile                  # SA profile
29└── services                    # Service layer
30│   ├── native                  # Native layer
31│   ├── profile                 # Configuration file for average power consumption
32│   └── zidl                    # Zidl API layer
33├── test                        # Test cases
34│   ├── fuzztest                # Fuzz test
35│   ├── unittest                # Unit test
36│   ├── systemtest              # System test
37│   └── utils                   # Test tools
38└── utils                       # Utilities
39```
40
41
42
43## Repositories Involved<a name="section63151229062"></a>
44
45[Power Management Subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/power-management.md)
46
47[powermgr_power_manager](https://gitee.com/openharmony/powermgr_power_manager)
48
49[powermgr_display_manager](https://gitee.com/openharmony/powermgr_display_manager)
50
51[powermgr_battery_manager](https://gitee.com/openharmony/powermgr_battery_manager)
52
53[powermgr_thermal_manager](https://gitee.com/openharmony/powermgr_thermal_manager)
54
55**powermgr_battery_statistics**
56
57[powermgr_battery_lite](https://gitee.com/openharmony/powermgr_battery_lite)
58
59[powermgr_powermgr_lite](https://gitee.com/openharmony/powermgr_powermgr_lite)
60