summaryrefslogtreecommitdiff
path: root/src/com/android/loganalysis/parser/EventsLogParser.java
diff options
context:
space:
mode:
authorgopinath <gelanchezhian@google.com>2017-05-11 10:27:03 -0700
committergopinath <gelanchezhian@google.com>2017-05-11 10:27:03 -0700
commitc4e23f7a010ba8e2fe7fdd3778b01d486ed8b77a (patch)
treee99f5d46156b20b1c009ebd9e73e2283139b64da /src/com/android/loganalysis/parser/EventsLogParser.java
parentb2b068af021e41755d43d1285fc16a7dc479abc1 (diff)
downloadloganalysis-c4e23f7a010ba8e2fe7fdd3778b01d486ed8b77a.tar.gz
Parser to handle only transition delay info.
Tests : java -cp out/host/linux-x86/framework/loganalysis-tests.jar:out/host/linux-x86/framework/loganalysis.jar org.junit.runner.JUnitCore com.android.loganalysis.UnitTests OK (253 tests) run google/template/local --template:map test performance/app-transitions --cold-apps Calculator --hot-apps Calculator --pre-launch-apps Calculator --apps-to-recents Calculator --hot-apps-from-recents Calculator --hot-apps-from-recents Calculator --launch-iteration 2 --no-bugreport-on-invocation-ended --alt-dir /usr/local/google/home/gelanchezhian/Desktop/local Test Sponge link: https://sponge.corp.google.com/invocation?tab=host_log.txt&show=&id=cd595d48-4beb-4bbf-86b0-7b17b4ae82a6&searchFor=&sortBy=STATUS Change-Id: I61163d67630e54f29248d56c2de1faf4dec45b41
Diffstat (limited to 'src/com/android/loganalysis/parser/EventsLogParser.java')
-rw-r--r--src/com/android/loganalysis/parser/EventsLogParser.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/loganalysis/parser/EventsLogParser.java b/src/com/android/loganalysis/parser/EventsLogParser.java
index 6620cd6..33afb2f 100644
--- a/src/com/android/loganalysis/parser/EventsLogParser.java
+++ b/src/com/android/loganalysis/parser/EventsLogParser.java
@@ -39,10 +39,17 @@ public class EventsLogParser implements IParser {
// 01-01 01:38:44.863 1037 1111 I sysui_multi_action:
// [319,64,321,64,322,99,325,5951,757,761,758,9,759,4,806,com.google.android.gm,871,
// com.google.android.gm.welcome.WelcomeTourActivity,905,0]
- private static final Pattern TRANSITION_DELAY = Pattern.compile(
+ private static final Pattern TRANSITION_STARTING_DELAY = Pattern.compile(
String.format("%s%s", EVENTS_PREFIX, "I sysui_multi_action: \\[319,(.*),321,(.*)"
+ ",322,(.*),806,(.*),871,(.*),905.*\\]$"));
+ // 01-01 01:38:44.863 1037 1111 I sysui_multi_action:
+ // [319,64,322,99,325,5951,757,761,758,9,759,4,806,com.google.android.gm,871,
+ // com.google.android.gm.welcome.WelcomeTourActivity,905,0]
+ private static final Pattern TRANSITION_DELAY = Pattern.compile(
+ String.format("%s%s", EVENTS_PREFIX, "I sysui_multi_action: \\[319,(.*),322,(.*)"
+ + ",806,(.*),871,(.*),905.*\\]$"));
+
// 08-21 17:53:53.876 1053 2135 I sysui_latency: [1,50]
private static final Pattern ACTION_LATENCY = Pattern.compile(
String.format("%s%s", EVENTS_PREFIX, "I sysui_latency: \\[(?<action>.*),"
@@ -67,12 +74,17 @@ public class EventsLogParser implements IParser {
String line;
while ((line = input.readLine()) != null) {
Matcher match = null;
- if (((match = matches(TRANSITION_DELAY, line)) != null)) {
+ if (((match = matches(TRANSITION_STARTING_DELAY, line)) != null)) {
TransitionDelayItem delayItem = new TransitionDelayItem();
delayItem.setComponentName(match.group(4) + "/" + match.group(5));
delayItem.setTransitionDelay(Long.parseLong(match.group(1)));
delayItem.setStartingWindowDelay(Long.parseLong(match.group(2)));
transitionDelayItems.add(delayItem);
+ } else if (((match = matches(TRANSITION_DELAY, line)) != null)) {
+ TransitionDelayItem delayItem = new TransitionDelayItem();
+ delayItem.setComponentName(match.group(3) + "/" + match.group(4));
+ delayItem.setTransitionDelay(Long.parseLong(match.group(1)));
+ transitionDelayItems.add(delayItem);
}
}
return transitionDelayItems;