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

Commit a850e7fa authored by Yu Shan Emily Lau's avatar Yu Shan Emily Lau Committed by Android (Google) Code Review
Browse files

Merge "Fix the media memeory stress test. The media memory stress test used...

Merge "Fix the media memeory stress test. The media memory stress test used the ps mediaserver to capture the memory usage of mediaserver. As the media.log is enabled recently, when runnign the ps mediaserver, it will show both entries. The fix is simply skip the first two lines and parse the laste output." into jb-mr2-dev
parents 0a4962ad 780dc88d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -101,7 +101,9 @@ public class MediaTestUtil {
            Log.v(TAG, e.toString());
        }
        String[] poList = memoryUsage.split("\r|\n|\r\n");
        String memusage = poList[1].concat("\n");
        // Skip the first two lines since there
        // is a new media.log introudced recently.
        String memusage = poList[2].concat("\n");
        return memusage;
    }

+9 −1
Original line number Diff line number Diff line
@@ -328,7 +328,15 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase2<Med
            Log.v(TAG, e.toString());
        }
        String[] poList = memoryUsage.split("\r|\n|\r\n");
        String memusage = poList[1].concat("\n");
        // A new media.log is enabled with ro.test_harness is set.
        // The output of "ps mediaserver" will include the
        // media.log process in the first line. Update the parsing
        // to only read the thrid line.
        // Smaple ps mediaserver output:
        // USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
        // media     131   1     13676  4796  ffffffff 400b1bd0 S media.log
        // media     219   131   37768  6892  ffffffff 400b236c S /system/bin/mediaserver
        String memusage = poList[2].concat("\n");
        return memusage;
    }