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

Commit 06b6689d authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove unused pooled lambda methods

Those methods have not been used for a long time. And the
regular lambda is already good in performance.

Also fix the test:
 - Log pattern in new platform is changed.
   (need to append "/data/anr/" manually)
 - Format line endings.

Bug: 120160274
Test: atest LambdaPerfTest
Change-Id: I761fc3a75a3c740a530b8e377b67afd5decb5503
parent 112acdd7
Loading
Loading
Loading
Loading
+0 −501

File changed.

Preview size limit exceeded, changes collapsed.

+458 −454
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ public class LambdaPerfTest {

    @Test
    public void test2PrimitiveParamsConsumer() {
        // Not in Integer#IntegerCache (-128~127) for autoboxing, that will create new object.
        // Not in Integer#IntegerCache (-128~127) for autoboxing, that may create new object.
        mTaskId = 12345;
        mTime = 54321;

@@ -239,6 +239,7 @@ public class LambdaPerfTest {
        SystemClock.sleep(DELAY_AFTER_BENCH_MS);
        final GcStatus endStatus = getGcStatus();
        final GcInfo info = startStatus.calculateGcTime(endStatus, title, mTestResults);
        mTestResults.putFloat("[" + title + "-execution-time]", elapsed);
        Log.i(TAG, mMethodName + "_" + title + " execution time: "
                + elapsed + "ms (avg=" + String.format("%.5f", elapsed / TEST_ITERATIONS) + "ms)"
                + " GC time: " + String.format("%.3f", info.mTotalGcTime) + "ms"
@@ -284,6 +285,9 @@ public class LambdaPerfTest {
            final int pos = log.indexOf(pattern);
            if (pos > 0) {
                dump = log.substring(pattern.length() + pos);
                if (!dump.startsWith("/data/anr/")) {
                    dump = "/data/anr/" + dump;
                }
                break;
            }
        }