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

Commit 2d938f36 authored by Misha Wagner's avatar Misha Wagner
Browse files

Fix issue with filtering threads with low CPU usage in KernelCpuThreadReader

Also remove banned word from KernelCpuThreadReader to unblock commit.

Test: Existing unit tests

Change-Id: Iba872e8b48d81bef782f1cd51a22149520d78b4f
parent 6d9f995c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -198,8 +198,8 @@ public class KernelCpuThreadReader {
     *
     * <p>This function will crawl through all process {@code proc} directories found by the pattern
     * {@code /proc/[0-9]*}, and then check the UID using {@code /proc/$PID/status}. This takes
     * approximately 500ms on a Pixel 2. Therefore, this method can be computationally expensive,
     * and should not be called more than once an hour.
     * approximately 500ms on a 2017 device. Therefore, this method can be computationally
     * expensive, and should not be called more than once an hour.
     *
     * <p>Data is only collected for UIDs passing the predicate supplied in {@link
     * #setUidPredicate}.
@@ -283,7 +283,7 @@ public class KernelCpuThreadReader {
                if (threadCpuUsage == null) {
                    continue;
                }
                if (mMinimumTotalCpuUsageMillis < totalCpuUsage(threadCpuUsage.usageTimesMillis)) {
                if (mMinimumTotalCpuUsageMillis > totalCpuUsage(threadCpuUsage.usageTimesMillis)) {
                    if (filteredThreadsCpuUsage == null) {
                        filteredThreadsCpuUsage = new int[mFrequenciesKhz.length];
                    }