Skip to content
Snippets Groups Projects
Commit e120ef0c authored by Duncan McNamara's avatar Duncan McNamara Committed by Geoffrey Métais
Browse files

Benchmark: fix warning log count


Signed-off-by: default avatarGeoffrey Métais <geoffrey.metais@gmail.com>
parent 28f0ee78
No related branches found
No related tags found
No related merge requests found
......@@ -402,17 +402,24 @@ public class BenchActivity extends ShallowVideoPlayer {
int counter = 0;
try {
Process process = Runtime.getRuntime().exec("logcat -d");
int pid = android.os.Process.myPid();
/*Displays priority, tag, and PID of the process issuing the message from this pid*/
Process process = Runtime.getRuntime().exec("logcat -d -v brief --pid=" + pid);
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
String line;
while ((line = bufferedReader.readLine()) != null) {
if (line.contains("W VLC") || line.contains("E VLC")) {
if (line.contains("W/") || line.contains("E/")) {
if (line.contains(" late ")) {
counter += 1;
}
}
}
/* Clear logs, so that next test is not polluted by current one */
new ProcessBuilder()
.command("logcat", "-c")
.redirectErrorStream(true)
.start();
} catch (IOException ex) {
Log.e(TAG, ex.toString());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment