Throttle fetching RPM stats
RPM stats are expensive to fetch. However, updateRpmStatsLocked can get called over and over again. E.g. if BatteryStatsService.getStatistics is called multiple times in quick succession, the RPM stats would be fetched repeatedly. Because it is expensive, if therefore makes sense to throttle it to ensure that the fetching is not done too frequently. The data last fetched is cached. When asked to update, it will only actually do so if it is sufficiently old. Bug: 62549421 Bug: 65629008 Test: manual Change-Id: I6b7530d203deb9ad5bfb3415336a0de6a55bd89b
Loading
Please register or sign in to comment