Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f1707975 authored by Lakshman Annadorai's avatar Lakshman Annadorai
Browse files

Read current CPU frequencies and populate CpuInfo.

- CPU time in state file provides information on the time spent by CPU
  cores in a specific frequency since system bootup. This time is
  monotonically increasing since system bootup.
- Use the time in state information to calculate the average frequency
  of a CPU core between two polling periods.
- The unit tests require test files to read the CPU info. The test files
  in the test APK are not accessible by the implementation. Thus, copy
  the test files from the APK into the test app's cache directory during
  setup and remove them from the cache directory during teardown.

Test: atest CpuInfoReaderTest
Bug: 217422127
Bug: 242722241

(cherry-picked from commit c1057fef03d755e35e6d6723480dc7a9cbbeb3c8)

Change-Id: Iadb234a56b48dcba3c8dc77411b175de5046ce89
parent 8f733bee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment