Home
last modified time | relevance | path

Searched refs:item (Results 1 – 25 of 229) sorted by relevance

12345678910

/tools/loganalysis/tests/src/com/android/loganalysis/parser/
DCompactMemInfoParserTest.java18 import com.android.loganalysis.item.CompactMemInfoItem;
34 CompactMemInfoItem item = new CompactMemInfoParser().parse(input); in testSingleProcLineWithSwapHasActivities() local
36 assertEquals(1, item.getPids().size()); in testSingleProcLineWithSwapHasActivities()
37 assertEquals("com.google.android.youtube1", item.getName(2964)); in testSingleProcLineWithSwapHasActivities()
38 assertEquals(19345, item.getPss(2964)); in testSingleProcLineWithSwapHasActivities()
39 assertEquals(1005, item.getSwap(2964)); in testSingleProcLineWithSwapHasActivities()
40 assertEquals("cached", item.getType(2964)); in testSingleProcLineWithSwapHasActivities()
41 assertEquals(true, item.hasActivities(2964)); in testSingleProcLineWithSwapHasActivities()
47 CompactMemInfoItem item = new CompactMemInfoParser().parse(input); in testSingleProcLineWithoutSwapHasActivities() local
49 assertEquals(1, item.getPids().size()); in testSingleProcLineWithoutSwapHasActivities()
[all …]
DTopParserTest.java18 import com.android.loganalysis.item.TopItem;
42 TopItem item = new TopParser().parse(inputBlock); in testTopParser() local
44 assertEquals(150, item.getUser()); in testTopParser()
45 assertEquals(50, item.getNice()); in testTopParser()
46 assertEquals(200, item.getSystem()); in testTopParser()
47 assertEquals(510, item.getIdle()); in testTopParser()
48 assertEquals(60, item.getIow()); in testTopParser()
49 assertEquals(5, item.getIrq()); in testTopParser()
50 assertEquals(25, item.getSirq()); in testTopParser()
51 assertEquals(1000, item.getTotal()); in testTopParser()
[all …]
DMemInfoParserTest.java18 import com.android.loganalysis.item.MemInfoItem;
44 MemInfoItem item = new MemInfoParser().parse(inputBlock); in testMemInfoParser() local
46 assertEquals(6, item.size()); in testMemInfoParser()
47 assertEquals((Long)353332l, item.get("MemTotal")); in testMemInfoParser()
48 assertEquals((Long)65420l, item.get("MemFree")); in testMemInfoParser()
49 assertEquals((Long)20800l, item.get("Buffers")); in testMemInfoParser()
50 assertEquals((Long)86204l, item.get("Cached")); in testMemInfoParser()
51 assertEquals((Long)0l, item.get("SwapCached")); in testMemInfoParser()
52 assertEquals((Long)34359640152l, item.get("Long")); in testMemInfoParser()
53 assertNull(item.get("ExtraLongIgnore")); in testMemInfoParser()
[all …]
DCpuInfoParserTest.java18 import com.android.loganalysis.item.CpuInfoItem;
30 CpuInfoItem item = new CpuInfoParser().parse(input); in testSingleLine() local
32 assertEquals(1, item.getPids().size()); in testSingleLine()
33 assertEquals("surfaceflinger", item.getName(170)); in testSingleLine()
34 assertEquals(0.1, item.getPercent(170), 0.0001); in testSingleLine()
44 CpuInfoItem item = new CpuInfoParser().parse(input); in testMultipleLines() local
46 assertEquals(4, item.getPids().size()); in testMultipleLines()
47 assertEquals("system_server", item.getName(489)); in testMultipleLines()
48 assertEquals(57.0, item.getPercent(489), 0.0001); in testMultipleLines()
49 assertEquals("surfaceflinger", item.getName(170)); in testMultipleLines()
[all …]
DQtaguidParserTest.java18 import com.android.loganalysis.item.QtaguidItem;
30 QtaguidItem item = new QtaguidParser().parse(input); in testSingleLine() local
32 assertEquals(1, item.getUids().size()); in testSingleLine()
33 assertEquals(111661, item.getRxBytes(10009)); in testSingleLine()
34 assertEquals(258252, item.getTxBytes(10009)); in testSingleLine()
40 QtaguidItem item = new QtaguidParser().parse(input); in testMalformedLine() local
42 assertEquals(0, item.getUids().size()); in testMalformedLine()
68 QtaguidItem item = new QtaguidParser().parse(input); in testMultipleLines() local
69 assertEquals(9, item.getUids().size()); in testMultipleLines()
70 assertEquals(24165890, item.getRxBytes(10009)); in testMultipleLines()
[all …]
DDvmLockSampleParserTest.java18 import com.android.loganalysis.item.DvmLockSampleItem;
35 DvmLockSampleItem item = new DvmLockSampleParser().parse(input); in testSingleDvmLine() local
36 … assertEquals("android.support.test.aupt", item.getAttribute(DvmLockSampleItem.PROCESS_NAME)); in testSingleDvmLine()
37 assertEquals(Boolean.FALSE, item.getAttribute(DvmLockSampleItem.SENSITIVITY_FLAG)); in testSingleDvmLine()
38 …assertEquals("Instr: android.support.test.aupt", item.getAttribute(DvmLockSampleItem.WAITING_THREA… in testSingleDvmLine()
39 assertEquals(75, item.getAttribute(DvmLockSampleItem.WAIT_TIME)); in testSingleDvmLine()
40 … assertEquals("AccessibilityCache.java", item.getAttribute(DvmLockSampleItem.WAITING_SOURCE_FILE)); in testSingleDvmLine()
41 assertEquals(256, item.getAttribute(DvmLockSampleItem.WAITING_SOURCE_LINE)); in testSingleDvmLine()
42 … assertEquals("AccessibilityCache.java", item.getAttribute(DvmLockSampleItem.OWNER_FILE_NAME)); in testSingleDvmLine()
43 assertEquals(96, item.getAttribute(DvmLockSampleItem.OWNER_ACQUIRE_SOURCE_LINE)); in testSingleDvmLine()
[all …]
DKernelLogParserTest.java18 import com.android.loganalysis.item.KernelLogItem;
19 import com.android.loganalysis.item.LowMemoryKillerItem;
20 import com.android.loganalysis.item.MiscKernelLogItem;
21 import com.android.loganalysis.item.PageAllocationFailureItem;
22 import com.android.loganalysis.item.SELinuxItem;
50 MiscKernelLogItem item = kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).get(0); in testParseLastKmsg() local
51 assertEquals(1.0, item.getEventTime(), 0.0000005); in testParseLastKmsg()
52 assertEquals("[ 0.000000] Start", item.getPreamble()); in testParseLastKmsg()
53 assertEquals("Kernel panic", item.getStack()); in testParseLastKmsg()
72 MiscKernelLogItem item = kernelLog.getMiscEvents(KernelLogParser.KERNEL_RESET).get(0); in testParseDmesg() local
[all …]
/tools/loganalysis/src/com/android/loganalysis/parser/
DTopParser.java18 import com.android.loganalysis.item.TopItem;
52 TopItem item = new TopItem(); in parse() local
53 item.setText(text); in parse()
58 item.setUser(Integer.parseInt(m.group(1))); in parse()
59 item.setNice(Integer.parseInt(m.group(2))); in parse()
60 item.setSystem(Integer.parseInt(m.group(3))); in parse()
61 item.setIdle(Integer.parseInt(m.group(4))); in parse()
62 item.setIow(Integer.parseInt(m.group(5))); in parse()
63 item.setIrq(Integer.parseInt(m.group(6))); in parse()
64 item.setSirq(Integer.parseInt(m.group(7))); in parse()
[all …]
DBugreportParser.java18 import com.android.loganalysis.item.ActivityServiceItem;
19 import com.android.loganalysis.item.AnrItem;
20 import com.android.loganalysis.item.BugreportItem;
21 import com.android.loganalysis.item.BugreportItem.CommandLineItem;
22 import com.android.loganalysis.item.DumpsysItem;
23 import com.android.loganalysis.item.IItem;
24 import com.android.loganalysis.item.KernelLogItem;
25 import com.android.loganalysis.item.LogcatItem;
26 import com.android.loganalysis.item.MemInfoItem;
27 import com.android.loganalysis.item.MiscKernelLogItem;
[all …]
DBatteryDischargeStatsInfoParser.java19 import com.android.loganalysis.item.BatteryDischargeStatsInfoItem;
95 BatteryDischargeStatsInfoItem item = new BatteryDischargeStatsInfoItem(); in parse() local
96 item.setDischargeDuration(totalDuration); in parse()
97 item.setDischargePercentage(dischargePercent); in parse()
98 item.setMaxPercentage(maxPercent); in parse()
99 item.setMinPercentage(minPercent); in parse()
102 return item; in parse()
106 item.setProjectedBatteryLife((projectionDuration * 100) / projectionDischargePercent); in parse()
107 return item; in parse()
DQtaguidParser.java18 import com.android.loganalysis.item.QtaguidItem;
41 QtaguidItem item = new QtaguidItem(); in parse() local
53 if (item.contains(uid)) { in parse()
54 item.updateRow(uid, rxBytes, txBytes); in parse()
56 item.addRow(uid, rxBytes, txBytes); in parse()
63 return item; in parse()
DDumpsysProcessMeminfoParser.java18 import com.android.loganalysis.item.DumpsysProcessMeminfoItem;
44 DumpsysProcessMeminfoItem item = new DumpsysProcessMeminfoItem(); in parse() local
49 item.setPid(Integer.parseInt(m.group(2))); in parse()
53 item.setProcessName(m.group(3)); in parse()
57 Map<String, Long> nativeData = item.get(DumpsysProcessMeminfoItem.NATIVE); in parse()
58 Map<String, Long> dalvikData = item.get(DumpsysProcessMeminfoItem.DALVIK); in parse()
59 Map<String, Long> otherData = item.get(DumpsysProcessMeminfoItem.OTHER); in parse()
60 Map<String, Long> totalData = item.get(DumpsysProcessMeminfoItem.TOTAL); in parse()
81 item.put(curLabel, curData); in parse()
87 return item; in parse()
DCompactMemInfoParser.java18 import com.android.loganalysis.item.CompactMemInfoItem;
53 CompactMemInfoItem item = new CompactMemInfoItem(); in parse() local
67 item.addPid(pid, name, type, pss, swap, activities); in parse()
78 item.setLostRam(lostRam); in parse()
88 item.setFreeRam(Long.parseLong(m.group(2))); in parse()
98 item.setTotalZram(Long.parseLong(m.group(1))); in parse()
99 item.setFreeSwapZram(Long.parseLong(m.group(3))); in parse()
109 item.setTuningLevel(Long.parseLong(m.group(3))); in parse()
116 return item; in parse()
DDumpsysWifiStatsParser.java18 import com.android.loganalysis.item.DumpsysWifiStatsItem;
57 DumpsysWifiStatsItem item = new DumpsysWifiStatsItem(); in parse() local
77 item.setNumWifiScan(numWifiScans); in parse()
78 item.setNumWifiDisconnect(numWifiDisconnects); in parse()
79 item.setNumWifiAssociation(numWifiAssociations); in parse()
80 return item; in parse()
/tools/loganalysis/tests/src/com/android/loganalysis/item/
DDvmLockSampleItemTest.java16 package com.android.loganalysis.item;
31 DvmLockSampleItem item = new DvmLockSampleItem(); in testToJson() local
33 item.setAttribute(DvmLockSampleItem.PROCESS_NAME, "android.support.test.aupt"); in testToJson()
34 item.setAttribute(DvmLockSampleItem.SENSITIVITY_FLAG, false); in testToJson()
35item.setAttribute(DvmLockSampleItem.WAITING_THREAD_NAME, "Instr: android.support.test.aupt"); in testToJson()
36 item.setAttribute(DvmLockSampleItem.WAIT_TIME, 75); in testToJson()
37 item.setAttribute(DvmLockSampleItem.WAITING_SOURCE_FILE, "AccessibilityCache.java"); in testToJson()
38 item.setAttribute(DvmLockSampleItem.WAITING_SOURCE_LINE, 256); in testToJson()
39 item.setAttribute(DvmLockSampleItem.OWNER_FILE_NAME, "-"); in testToJson()
40 item.setAttribute(DvmLockSampleItem.OWNER_ACQUIRE_SOURCE_LINE, 96); in testToJson()
[all …]
DGenericItemTest.java16 package com.android.loganalysis.item;
161 GenericItem item = new GenericItem(ATTRIBUTES); in testAttributes() local
163 assertNull(item.getAttribute("string")); in testAttributes()
164 assertNull(item.getAttribute("integer")); in testAttributes()
166 item.setAttribute("string", mStringAttribute); in testAttributes()
167 item.setAttribute("integer", mIntegerAttribute); in testAttributes()
169 assertEquals(mStringAttribute, item.getAttribute("string")); in testAttributes()
170 assertEquals(mIntegerAttribute, item.getAttribute("integer")); in testAttributes()
172 item.setAttribute("string", null); in testAttributes()
173 item.setAttribute("integer", null); in testAttributes()
[all …]
DLocationDumpsItemTest.java16 package com.android.loganalysis.item;
18 import com.android.loganalysis.item.LocationDumpsItem.LocationInfoItem;
35 LocationDumpsItem item = new LocationDumpsItem(); in testToJson() local
36 item.addLocationClient("com.google.android.gms", 500, 60, 1000, "PRIORITY_ACCURACY", 45); in testToJson()
37 item.addLocationClient("com.google.android.maps", 0, 0, 0, "PRIORITY_ACCURACY", 55); in testToJson()
40 JSONObject output = new JSONObject(item.toJson().toString()); in testToJson()
67 LocationDumpsItem item = new LocationDumpsItem(); in testGetLocationDumps() local
68 item.addLocationClient("com.google.android.gms", 500, 60, 1000, "PRIORITY_ACCURACY", 45); in testGetLocationDumps()
70 assertEquals(item.getLocationClients().size(), 1); in testGetLocationDumps()
71 LocationInfoItem client = item.getLocationClients().iterator().next(); in testGetLocationDumps()
DMonkeyLogItemTest.java16 package com.android.loganalysis.item;
32 MonkeyLogItem item = new MonkeyLogItem(); in testToJson() local
33 item.addCategory("category1"); in testToJson()
34 item.addCategory("category2"); in testToJson()
35 item.addPackage("package1"); in testToJson()
36 item.addPackage("package2"); in testToJson()
37 item.addPackage("package3"); in testToJson()
40 JSONObject output = new JSONObject(item.toJson().toString()); in testToJson()
DSmartMonkeyLogItemTest.java16 package com.android.loganalysis.item;
34 SmartMonkeyLogItem item = new SmartMonkeyLogItem(); in testToJson() local
35 item.addApplication("application1"); in testToJson()
36 item.addPackage("package1"); in testToJson()
37 item.addAnrTime(new Date()); in testToJson()
38 item.addCrashTime(new Date()); in testToJson()
41 JSONObject output = new JSONObject(item.toJson().toString()); in testToJson()
DSystemPropsItemTest.java16 package com.android.loganalysis.item;
32 SystemPropsItem item = new SystemPropsItem(); in testToJson() local
33 item.put("foo", "123"); in testToJson()
34 item.put("bar", "456"); in testToJson()
35 item.setText("[foo]: [123]\n[bar]: [456]"); in testToJson()
38 JSONObject output = new JSONObject(item.toJson().toString()); in testToJson()
DMemInfoItemTest.java16 package com.android.loganalysis.item;
32 MemInfoItem item = new MemInfoItem(); in testToJson() local
33 item.put("foo", 123l); in testToJson()
34 item.put("bar", 456l); in testToJson()
35 item.setText("foo: 123 kB\nbar: 456 kB"); in testToJson()
38 JSONObject output = new JSONObject(item.toJson().toString()); in testToJson()
/tools/loganalysis/src/com/android/loganalysis/item/
DKernelLogItem.java16 package com.android.loganalysis.item;
111 for (MiscKernelLogItem item : getEvents()) { in getMiscEvents()
112 if (item.getCategory().equals(category)) { in getMiscEvents()
113 items.add(item); in getMiscEvents()
124 for (MiscKernelLogItem item : getEvents()) { in getSELinuxEvents()
125 if (item instanceof SELinuxItem) { in getSELinuxEvents()
126 items.add((SELinuxItem)item); in getSELinuxEvents()
137 for (MiscKernelLogItem item : getEvents()) { in getLowMemoryKillerEvents()
138 if (item instanceof LowMemoryKillerItem) { in getLowMemoryKillerEvents()
139 items.add((LowMemoryKillerItem)item); in getLowMemoryKillerEvents()
[all …]
DLogcatItem.java16 package com.android.loganalysis.item;
103 for (IItem item : getEvents()) { in getAnrs()
104 if (item instanceof AnrItem) { in getAnrs()
105 anrs.add((AnrItem) item); in getAnrs()
116 for (IItem item : getEvents()) { in getJavaCrashes()
117 if (item instanceof JavaCrashItem) { in getJavaCrashes()
118 jcs.add((JavaCrashItem) item); in getJavaCrashes()
129 for (IItem item : getEvents()) { in getNativeCrashes()
130 if (item instanceof NativeCrashItem) { in getNativeCrashes()
131 ncs.add((NativeCrashItem) item); in getNativeCrashes()
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/
DConvertJarsToSignatureFiles.kt76 override fun visitItem(item: Item) { in <lambda>()
77 unmarkRecent(item) in <lambda>()
78 super.visitItem(item) in <lambda>()
201 val item = codebase.findClass(classNode, MATCH_ALL) in <lambda>() constant
202 if (item != null && !item.deprecated) { in <lambda>()
203 item.deprecated = true in <lambda>()
204 progress("Turned deprecation on for $item") in <lambda>()
214 val item = codebase.findMethod(classNode, methodNode, MATCH_ALL) in <lambda>() constant
215 if (item != null && !item.deprecated) { in <lambda>()
216 item.deprecated = true in <lambda>()
[all …]
DNullnessMigration.kt98 fun hasNullnessInformation(item: Item): Boolean { in hasNullnessInformation()
99 return isNullable(item) || isNonNull(item) in hasNullnessInformation()
102 fun findNullnessAnnotation(item: Item): AnnotationItem? { in findNullnessAnnotation()
103 return item.modifiers.annotations().firstOrNull { it.isNullnessAnnotation() } in findNullnessAnnotation()
106 fun isNullable(item: Item): Boolean { in isNullable()
107 return item.modifiers.annotations().any { it.isNullable() } in isNullable()
110 private fun isNonNull(item: Item): Boolean { in isNonNull()
111 return item.modifiers.annotations().any { it.isNonNull() } in isNonNull()

12345678910