Description[Telemetry] Fix C-State stat reading for Note 3 and S5.
On some Android devices, the sysfs-based C-State info contains extra blank
lines which will cause an exception in C-State stat parser in Android platform
backend if the power metric and a Monsoon Power Monitor is in use. More
precisely, /sys/devices/system/cpu/cpu*/cpuidle/state*/name contains two
trailing newlines on at least Samsung Galaxy Note 3 and S5.
This patch filters out these blank lines from the sysfs output and fixes nearby
style.
BUG=421008
TEST=SysfsPowerMonitorMonitorTest.testGetCpuStateForAndroidDevices
Committed: https://crrev.com/a30ca3cd77a8a33b839c59973c414692b19f872b
Cr-Commit-Position: refs/heads/master@{#300347}
Patch Set 1 #Patch Set 2 : Unit test for SysfsPowerMonitor.GetCpuState #
Total comments: 1
Patch Set 3 : Call AndroidPlatformBackend.ParseCStateSample in test #Patch Set 4 : More descriptive test name #
Messages
Total messages: 21 (7 generated)
|