diff options
author | gopinath <gelanchezhian@google.com> | 2017-05-11 10:27:03 -0700 |
---|---|---|
committer | Gopinath Elanchezhian <gelanchezhian@google.com> | 2017-05-11 21:31:25 +0000 |
commit | 2ce9264380033a07c4a5b6104cc65406f5a5c090 (patch) | |
tree | af21f4778c34361899c07c2857788269908b873e /src | |
parent | 4348cc0f92b088ab3b58001e1b370b69b86577a2 (diff) | |
download | loganalysis-2ce9264380033a07c4a5b6104cc65406f5a5c090.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')
-rw-r--r-- | src/com/android/loganalysis/parser/EventsLogParser.java | 16 |
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; |