powerstats: Introduce AoC timed data provider
Reading data from an AoC sysfs node by getline takes 1 second. In total there are 17 AoC sysfs nodes that must be read. The worst case is taking 17 seconds long that is greater than dumpsys timeout. Therefore, we need the timeout mechanism to ignore the AoC power stats reporting when AoC latency exceeds the allowed time. Bug: 219630658 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: Ic5c2a0b36728153fd2e2593599a8f2bcdb50ace4 Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
parent
4cf26f2c2d
commit
391f601be6
3 changed files with 186 additions and 2 deletions
|
@ -33,7 +33,7 @@ class AocStateResidencyDataProvider : public PowerStats::IStateResidencyDataProv
|
|||
std::unordered_map<std::string, std::vector<StateResidency>> *residencies) override;
|
||||
std::unordered_map<std::string, std::vector<State>> getInfo() override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
std::unordered_map<std::string /* entity name */,
|
||||
std::vector<std::unique_ptr<GenericStateResidencyDataProvider>> /* providers */> mProviders;
|
||||
};
|
||||
|
@ -42,4 +42,4 @@ class AocStateResidencyDataProvider : public PowerStats::IStateResidencyDataProv
|
|||
} // namespace power
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
||||
} // namespace aidl
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue