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

Commit 903d16e8 authored by Steven Terrell's avatar Steven Terrell
Browse files

Bring Internal and Public Histogram Buckets Inline

There was an issue mapping frame overruns that exceeded 1000ms, this was
due to the internal PendingJankStats containing one extra bucket for
histogram data vs what was available in the public
RelativeFrameTimeHistogram.

This change brings the bucket counts between the internal and public
objects inline and ensure the test that was failing is now passing.

Bug: 402159276
Test: atest CoreAppJankTests, CtsAppJankTestCases
Flag: EXEMPT bugfix
Change-Id: Ifaa1a18dd43792e0258c6b7818d41da8051d9738
parent 04b421bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -366,7 +366,7 @@ public class JankDataProcessor {
                30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
                30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
                Integer.MAX_VALUE
                Integer.MAX_VALUE
        };
        };
        private final int[] mFrameOverrunBuckets = new int[sFrameOverrunHistogramBounds.length];
        private final int[] mFrameOverrunBuckets = new int[sFrameOverrunHistogramBounds.length - 1];


        // Histogram of frame duration overruns encoded in predetermined buckets.
        // Histogram of frame duration overruns encoded in predetermined buckets.
        public PendingJankStat() {
        public PendingJankStat() {
@@ -511,7 +511,7 @@ public class JankDataProcessor {
            if (overrunTime <= 1000) {
            if (overrunTime <= 1000) {
                return (overrunTime - 200) / 100 + 43;
                return (overrunTime - 200) / 100 + 43;
            }
            }
            return sFrameOverrunHistogramBounds.length - 1;
            return mFrameOverrunBuckets.length - 1;
        }
        }


    }
    }