/platform_testing/libraries/collectors-helper/lyric/test/src/com/android/helpers/ |
D | LyricMemProfilerHelperTest.java | 227 Map<String, Integer> metrics = helper.processOutput(memInfoStringList, dmabufDumpString); in testParsePid() local 229 assertThat(metrics).containsKey("nativeHeap"); in testParsePid() 230 assertThat(metrics).containsKey("totalPss"); in testParsePid() 231 assertThat(metrics).containsKey("dmabuf"); in testParsePid() 233 assertThat(metrics).containsKey("CameraProviderNativeHeap"); in testParsePid() 234 assertThat(metrics).containsKey("CameraProviderTotalPss"); in testParsePid() 235 assertThat(metrics).containsKey("CameraProviderDmabuf"); in testParsePid() 237 assertThat(metrics).containsKey("CameraServerNativeHeap"); in testParsePid() 238 assertThat(metrics).containsKey("CameraServerTotalPss"); in testParsePid() 239 assertThat(metrics).containsKey("CameraServerDmabuf"); in testParsePid() [all …]
|
D | LyricCpuUtilizationHelperTest.java | 59 Map<String, Double> metrics = LyricCpuUtilizationHelper.processOutput(testString); in testProcessOutput() local 62 assertThat(metrics.get(String.format(METRIC_KEY, node, "number_of_invocations"))) in testProcessOutput() 65 assertThat(metrics.get(String.format(METRIC_KEY, node, "user_time"))) in testProcessOutput() 68 assertThat(metrics.get(String.format(METRIC_KEY, node, "user_time"))) in testProcessOutput() 71 assertThat(metrics.get(String.format(METRIC_KEY, node, "user_time_max"))) in testProcessOutput() 74 assertThat(metrics.get(String.format(METRIC_KEY, node, "user_time_min"))) in testProcessOutput() 77 assertThat(metrics.get(String.format(METRIC_KEY, node, "system_time"))) in testProcessOutput() 80 assertThat(metrics.get(String.format(METRIC_KEY, node, "system_time_max"))) in testProcessOutput() 83 assertThat(metrics.get(String.format(METRIC_KEY, node, "system_time_min"))) in testProcessOutput() 86 assertThat(metrics.get(String.format(METRIC_KEY, node, "wall_time"))) in testProcessOutput() [all …]
|
/platform_testing/libraries/collectors-helper/memory/test/src/com/android/helpers/tests/ |
D | HeapDumpHelperTest.java | 64 Map<String, String> metrics = mHeapDumpHelper.getMetrics(); in testHeapDumpCollectionNoProcess() local 65 assertTrue(metrics.size() == 2); in testHeapDumpCollectionNoProcess() 66 assertTrue(metrics.get("managed_heapdump_empty_files_count").equalsIgnoreCase("0")); in testHeapDumpCollectionNoProcess() 67 assertTrue(metrics.get("native_heapdump_empty_files_count").equalsIgnoreCase("0")); in testHeapDumpCollectionNoProcess() 74 Map<String, String> metrics = mHeapDumpHelper.getMetrics(); in testSuccessfulHeapDumpCollection() local 75 assertTrue(metrics.size() == 3); in testSuccessfulHeapDumpCollection() 76 assertTrue(metrics.get("managed_heapdump_empty_files_count").equalsIgnoreCase("0")); in testSuccessfulHeapDumpCollection() 77 assertTrue(metrics.get("native_heapdump_empty_files_count").equalsIgnoreCase("0")); in testSuccessfulHeapDumpCollection() 79 metrics.get("managed_heapdump_file_1") in testSuccessfulHeapDumpCollection() 90 Map<String, String> metrics = mHeapDumpHelper.getMetrics(); in testHeapCollectionProcessWithSpecialChars() local [all …]
|
D | MemLeaksHelperTest.java | 146 Map<String, Long> metrics = mMemLeaksHelper.getMetrics(); in testGetMetricsNoIncrease() local 148 assertFalse(metrics.isEmpty()); in testGetMetricsNoIncrease() 149 assertTrue(metrics.containsKey(mMemLeaksHelper.PROC_MEM_BYTES + "com.android.chrome")); in testGetMetricsNoIncrease() 150 assertTrue(metrics.get(mMemLeaksHelper.PROC_MEM_BYTES + "com.android.chrome").equals(0L)); in testGetMetricsNoIncrease() 151 assertTrue(metrics.containsKey(mMemLeaksHelper.PROC_ALLOCATIONS + "com.android.chrome")); in testGetMetricsNoIncrease() 152 assertTrue(metrics.get(mMemLeaksHelper.PROC_ALLOCATIONS + "com.android.chrome").equals(0L)); in testGetMetricsNoIncrease() 320 Map<String, Long> metrics = mMemLeaksHelper.getMetrics(); in testGetMetricsHasIncrease() local 322 assertFalse(metrics.isEmpty()); in testGetMetricsHasIncrease() 323 assertTrue(metrics.containsKey(mMemLeaksHelper.PROC_MEM_BYTES + "com.android.chrome")); in testGetMetricsHasIncrease() 325 metrics.get(mMemLeaksHelper.PROC_MEM_BYTES + "com.android.chrome").equals(1000L)); in testGetMetricsHasIncrease() [all …]
|
D | ShowmapSnapshotHelperTest.java | 134 Map<String, String> metrics = mShowmapSnapshotHelper.getMetrics(); in testEmptyProcessName() local 135 assertTrue(metrics.isEmpty()); in testEmptyProcessName() 192 Map<String, String> metrics = mShowmapSnapshotHelper.getMetrics(); in testGetMetrics_MixedProcess() local 193 assertFalse(metrics.isEmpty()); in testGetMetrics_MixedProcess() 196 metrics.containsKey( in testGetMetrics_MixedProcess() 204 metrics.containsKey( in testGetMetrics_MixedProcess() 212 assertTrue(metrics.containsKey(ShowmapSnapshotHelper.OUTPUT_FILE_PATH_KEY)); in testGetMetrics_MixedProcess() 224 Map<String, String> metrics = mShowmapSnapshotHelper.getMetrics(); in testGetMetrics_CachedProcess() local 225 assertFalse(metrics.isEmpty()); in testGetMetrics_CachedProcess() 228 metrics.containsKey( in testGetMetrics_CachedProcess() [all …]
|
D | PinnerHelperTest.java | 90 Map<String, String> metrics = mPinnerHelper.getMetrics(); in testPinnerSnapshotDumpFile() local 91 assertTrue(metrics.size() > 2); in testPinnerSnapshotDumpFile() 92 assertTrue(metrics.containsKey(PinnerHelper.OUTPUT_FILE_PATH_KEY)); in testPinnerSnapshotDumpFile() 102 Map<String, String> metrics = mPinnerHelper.getMetrics(); in testPinnerTotalFileSizeMetric() local 103 assertTrue(metrics.size() > 2); in testPinnerTotalFileSizeMetric() 104 assertTrue(metrics.containsKey(PinnerHelper.TOTAL_SIZE_BYTES_KEY)); in testPinnerTotalFileSizeMetric() 114 Map<String, String> metrics = mPinnerHelper.getMetrics(); in testValidateTotalFileSizeCount() local 115 int totalFilesCount = metrics.entrySet().stream().filter( in testValidateTotalFileSizeCount() 121 .parseInt(metrics.get(PinnerHelper.TOTAL_FILE_COUNT_KEY))); in testValidateTotalFileSizeCount()
|
/platform_testing/libraries/collectors-helper/generic/test/src/com/android/helpers/tests/ |
D | GenericExecutableCollectorHelperTest.java | 119 Map<String, String> metrics = mGenericExecutableCollectorHelper.getMetrics(); in testMultipleGoodFiles() local 121 assertFalse(metrics.isEmpty()); in testMultipleGoodFiles() 123 metrics.containsKey(sTestFile1NamePrefix + "DockObserver_binder_threads_in_use")); in testMultipleGoodFiles() 125 metrics.containsKey(sTestFile1NamePrefix + "DockObserver_binder_threads_started")); in testMultipleGoodFiles() 126 assertTrue(metrics.containsKey(sTestFile1NamePrefix + "DockObserver_client_count")); in testMultipleGoodFiles() 128 metrics.get(sTestFile1NamePrefix + "SurfaceFlinger_binder_threads_in_use"), "0"); in testMultipleGoodFiles() 130 metrics.get(sTestFile1NamePrefix + "SurfaceFlinger_binder_threads_started"), "5"); in testMultipleGoodFiles() 131 assertEquals(metrics.get(sTestFile1NamePrefix + "SurfaceFlinger_client_count"), "8"); in testMultipleGoodFiles() 134 metrics.containsKey( in testMultipleGoodFiles() 138 metrics.containsKey( in testMultipleGoodFiles() [all …]
|
/platform_testing/libraries/collectors-helper/jank/test/src/com/android/helpers/ |
D | SfStatsCollectionHelperTest.java | 151 Map<String, Double> metrics = mHelper.getMetrics(); in testCollect_valuesMatch() local 153 metrics.get( in testCollect_valuesMatch() 160 metrics.get( in testCollect_valuesMatch() 167 metrics.get( in testCollect_valuesMatch() 174 metrics.get( in testCollect_valuesMatch() 181 metrics.get( in testCollect_valuesMatch() 188 metrics.get( in testCollect_valuesMatch() 195 metrics.get( in testCollect_valuesMatch() 202 metrics.get( in testCollect_valuesMatch() 209 metrics.get( in testCollect_valuesMatch() [all …]
|
D | JankCollectionHelperTest.java | 115 Map<String, Double> metrics = mHelper.getMetrics(); in testCollect_valuesMatch() local 116 assertThat(metrics.get(buildMetricKey("pkg1", TOTAL_FRAMES.getMetricId()))) in testCollect_valuesMatch() 118 assertThat(metrics.get(buildMetricKey("pkg1", JANKY_FRAMES_COUNT.getMetricId()))) in testCollect_valuesMatch() 120 assertThat(metrics.get(buildMetricKey("pkg1", JANKY_FRAMES_PRCNT.getMetricId()))) in testCollect_valuesMatch() 122 assertThat(metrics.get(buildMetricKey("pkg1", JANKY_FRAMES_LEGACY_COUNT.getMetricId()))) in testCollect_valuesMatch() 124 assertThat(metrics.get(buildMetricKey("pkg1", JANKY_FRAMES_LEGACY_PRCNT.getMetricId()))) in testCollect_valuesMatch() 126 assertThat(metrics.get(buildMetricKey("pkg1", FRAME_TIME_50TH.getMetricId()))) in testCollect_valuesMatch() 128 assertThat(metrics.get(buildMetricKey("pkg1", FRAME_TIME_90TH.getMetricId()))) in testCollect_valuesMatch() 130 assertThat(metrics.get(buildMetricKey("pkg1", FRAME_TIME_95TH.getMetricId()))) in testCollect_valuesMatch() 132 assertThat(metrics.get(buildMetricKey("pkg1", FRAME_TIME_99TH.getMetricId()))) in testCollect_valuesMatch() [all …]
|
/platform_testing/libraries/collectors-helper/lyric/src/com/android/helpers/ |
D | LyricCpuUtilizationHelper.java | 93 Map<String, Double> metrics = new HashMap<>(); in processOutput() local 96 metrics.putAll(processMatch(matcher)); in processOutput() 98 return metrics; in processOutput() 102 Map<String, Double> metrics = new HashMap<>(); in processMatch() local 104 metrics.put( in processMatch() 107 metrics.put(String.format(METRIC_KEY, node, "system_time"), parseTime(matcher.group(3))); in processMatch() 108 metrics.put( in processMatch() 110 metrics.put( in processMatch() 112 metrics.put(String.format(METRIC_KEY, node, "user_time"), parseTime(matcher.group(6))); in processMatch() 113 metrics.put(String.format(METRIC_KEY, node, "user_time_max"), parseTime(matcher.group(7))); in processMatch() [all …]
|
D | LyricMemProfilerHelper.java | 241 Map<String, Integer> metrics = processOutput(memInfoStringList, dmabufDumpString); in getMetrics() local 245 metrics.put( in getMetrics() 248 metrics.put( in getMetrics() 251 metrics.put("max" + mMetricNameList[i] + "Dmabuf", mMaxCameraDmabufList[i]); in getMetrics() 253 metrics.put("maxNativeHeap", mMaxCameraMemInfoList[0].mNativeHeap); in getMetrics() 254 metrics.put("maxTotalPss", mMaxCameraMemInfoList[0].mTotalPss); in getMetrics() 255 metrics.put("maxDmabuf", mMaxCameraDmabufList[0]); in getMetrics() 257 metrics.put("maxTotalCameraDmabuf", mMaxTotalCameraDmabuf); in getMetrics() 258 metrics.put("maxTotalCameraMemory", mMaxTotalCameraMemory); in getMetrics() 260 return metrics; in getMetrics() [all …]
|
/platform_testing/tests/automotive/health/boottime/src/android/boottime/postprocessor/ |
D | DmesgPostProcessor.java | 30 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 104 ArrayListMultimap<String, Double> metrics = ArrayListMultimap.create(); in processDmesgLogs() local 112 metrics.putAll( in processDmesgLogs() 118 metrics.putAll( in processDmesgLogs() 122 metrics.putAll( in processDmesgLogs() 133 analyzeBootLoaderTimingInfo(metrics.get(DMESG_BOOT_COMPLETE_TIME)); in processDmesgLogs() 134 metrics.putAll(bootLoaderTimingInfos); in processDmesgLogs() 136 return buildTfMetrics(metrics.asMap()); in processDmesgLogs() 149 Map<String, Double> metrics = new HashMap<>(); in analyzeDmesgServiceInfo() local 161 metrics.put(key, value); in analyzeDmesgServiceInfo() [all …]
|
D | LogcatPostProcessor.java | 25 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 124 ArrayListMultimap<String, Double> metrics = ArrayListMultimap.create(); in processLogcatLogs() local 129 metrics.putAll(Multimaps.forMap(granularBootMetricsMap)); in processLogcatLogs() 133 metrics.putAll(Multimaps.forMap(customBootMetricMap)); in processLogcatLogs() 145 return buildTfMetrics(metrics.asMap()); in processLogcatLogs() 153 Map<String, Double> metrics = new HashMap<>(); in analyzeGranularBootInfo() local 184 metrics.put(fullCompName, time); in analyzeGranularBootInfo() 192 return metrics; in analyzeGranularBootInfo() 197 Map<String, Double> metrics = new HashMap<>(); in analyzeCustomBootInfo() local 207 return metrics; in analyzeCustomBootInfo() [all …]
|
/platform_testing/tests/example/perf/src/android/test/example/helloworldperformance/ |
D | HelloWorldPerformanceTest.java | 19 import com.android.tradefed.metrics.proto.MetricMeasurement.DataType; 20 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements; 21 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 32 @Rule public TestMetrics metrics = new TestMetrics(); field in HelloWorldPerformanceTest 38 metrics.addTestMetric( in testHelloWorld() 48 metrics.addTestMetric( in testHalloWelt()
|
/platform_testing/libraries/collectors-helper/memory/src/com/android/helpers/ |
D | DumpsysMeminfoHelper.java | 76 Map<String, Long> metrics = new HashMap<>(); in getMetrics() local 84 metrics.putAll(parseMetrics(processName, rawOutput)); in getMetrics() 87 metrics.putAll(parseObjectCountMetrics(processName, rawOutput)); in getMetrics() 103 metrics.putAll(parseObjectCountMetrics(processName, rawOutput)); in getMetrics() 106 return metrics; in getMetrics() 129 Map<String, Long> metrics = new HashMap<>(); in parseMetrics() local 134 putHeapMetrics(metrics, processMemory.nativeHeap, NATIVE_HEAP, processName); in parseMetrics() 135 putHeapMetrics(metrics, processMemory.dalvikHeap, DALVIK_HEAP, processName); in parseMetrics() 137 metrics, in parseMetrics() 146 return metrics; in parseMetrics() [all …]
|
D | ProcessShowmapHelper.java | 143 ShowmapMetrics[] metrics = new ShowmapMetrics[processNames.length]; in sampleMemoryOfProcesses() local 145 metrics[i] = sampleMemory(processNames[i]); in sampleMemoryOfProcesses() 147 return metrics; in sampleMemoryOfProcesses() 177 ShowmapMetrics metrics = new ShowmapMetrics(); in sampleMemory() local 191 metrics.vss = sc.nextLong(); in sampleMemory() 192 metrics.rss = sc.nextLong(); in sampleMemory() 193 metrics.pss = sc.nextLong(); in sampleMemory() 198 return metrics; in sampleMemory()
|
/platform_testing/libraries/system-helpers/device-helper/src/android/system/helpers/ |
D | DeviceHelper.java | 60 DisplayMetrics metrics = new DisplayMetrics(); in isTablet() local 61 wm.getDefaultDisplay().getMetrics(metrics); in isTablet() 65 int screenDensity = metrics.densityDpi; in isTablet() 67 metrics.widthPixels, metrics.heightPixels); in isTablet() 69 metrics.widthPixels, metrics.heightPixels); in isTablet()
|
/platform_testing/libraries/screenshot/src/androidTest/java/platform/test/screenshot/ |
D | DeviceEmulationRuleTest.kt | 64 val metrics = DisplayMetrics() in <lambda>() constant 65 wm.defaultDisplay.getRealMetrics(metrics) in <lambda>() 68 assertThat(metrics.densityDpi).isEqualTo(90) in <lambda>() 69 assertThat(metrics.widthPixels).isEqualTo(500) in <lambda>() 70 assertThat(metrics.heightPixels).isEqualTo(400) in <lambda>()
|
/platform_testing/tests/jank/UbSystemUiJankTests/src/android/platform/systemui/tests/jank/ |
D | LauncherJankTests.java | 101 public void afterTestOpenAllAppsContainer(Bundle metrics) throws IOException { in afterTestOpenAllAppsContainer() argument 105 getClass().getSimpleName(), getName()), RESULTS_FILE, metrics); in afterTestOpenAllAppsContainer() 106 super.afterTest(metrics); in afterTestOpenAllAppsContainer() 115 public void afterTestAllAppsContainerSwipe(Bundle metrics) throws IOException { in afterTestAllAppsContainerSwipe() argument 119 getClass().getSimpleName(), getName()), RESULTS_FILE, metrics); in afterTestAllAppsContainerSwipe() 120 super.afterTest(metrics); in afterTestAllAppsContainerSwipe() 141 public void afterTestHomeScreenSwipe(Bundle metrics) throws IOException { in afterTestHomeScreenSwipe() argument 145 getClass().getSimpleName(), getName()), RESULTS_FILE, metrics); in afterTestHomeScreenSwipe() 146 super.afterTest(metrics); in afterTestHomeScreenSwipe() 167 public void afterTestWidgetsContainerFling(Bundle metrics) throws IOException { in afterTestWidgetsContainerFling() argument [all …]
|
D | SystemUiJankTests.java | 175 public void forceStopPackages(Bundle metrics) throws IOException { in forceStopPackages() argument 181 getClass().getSimpleName(), getName()), RESULTS_FILE, metrics); in forceStopPackages() 182 super.afterTest(metrics); in forceStopPackages() 405 public void afterNotificationListPull(Bundle metrics) throws Exception { in afterNotificationListPull() argument 410 getClass().getSimpleName(), getName()), RESULTS_FILE, metrics); in afterNotificationListPull() 411 super.afterTest(metrics); in afterNotificationListPull() 437 public void afterNotificationListScroll(Bundle metrics) throws Exception { in afterNotificationListScroll() argument 445 getClass().getSimpleName(), getName()), RESULTS_FILE, metrics); in afterNotificationListScroll() 446 super.afterTest(metrics); in afterNotificationListScroll() 495 public void afterQuickSettings(Bundle metrics) throws Exception { in afterQuickSettings() argument [all …]
|
/platform_testing/libraries/device-collectors/src/main/platform-collectors/res/statsd-configs/ |
D | README.md | 7 A config tells statsd what metrics to collect from the device during a test. For example, 8 `app-start` will instruct statsd to collect app startup metrics. 12 To check in config(s) for a new set of metrics, follow these steps: 14 1. Create a directory under this directory for the new metrics (e.g. `app-start`). 16 suffixes if there are multiple configs related to the overarching metrics, with `.pb` extension.
|
/platform_testing/libraries/collectors-helper/app/src/com/android/helpers/ |
D | AppVersionHelper.java | 58 Map<String, Long> metrics = new HashMap<>(); in getMetrics() local 64 metrics.put(constructKey(METRIC_PREFIX, pkgInfo.packageName), in getMetrics() 72 metrics.put(constructKey(METRIC_PREFIX, pkg), in getMetrics() 81 return metrics; in getMetrics()
|
/platform_testing/libraries/collectors-helper/system/test/src/com/android/helpers/tests/ |
D | TimingHelperTest.java | 110 Map<String, Integer> metrics = helper.getMetrics(); in testGetMetrics() local 111 assertEquals(3, metrics.size()); in testGetMetrics() 112 assertTrue(metrics.get("total-bugreport-duration").equals(183122)); in testGetMetrics() 113 assertTrue(metrics.get("bugreport-compress-duration").equals(1631)); in testGetMetrics() 114 assertTrue(metrics.get("total-test-duration").equals(413824)); in testGetMetrics()
|
D | BugReportDurationHelperTest.java | 138 Map<String, Double> metrics = helper.getMetrics(); in testGetMetrics() local 139 assertEquals(9, metrics.size()); in testGetMetrics() 140 assertEquals(44.619, metrics.get("bugreport-duration-dumpstate_board()"), DELTA); in testGetMetrics() 141 assertEquals(21.397, metrics.get("bugreport-duration-dumpsys"), DELTA); in testGetMetrics() 142 assertEquals(0.022, metrics.get("bugreport-duration-dumpsys-critical-proto"), DELTA); in testGetMetrics() 143 assertEquals(0.051, metrics.get("bugreport-dumpsys-duration-SurfaceFlinger"), DELTA); in testGetMetrics() 144 assertEquals(24.741, metrics.get("bugreport-dumpsys-duration-meminfo"), DELTA); in testGetMetrics() 145 assertEquals(103, metrics.get("bugreport-dumpstate_board-duration-dump_display"), DELTA); in testGetMetrics() 146 assertEquals(12532, metrics.get("bugreport-dumpstate_board-duration-dump_modemlog"), DELTA); in testGetMetrics() 148 7705, metrics.get("bugreport-dumpstate_board-duration-dump_thermal.sh"), DELTA); in testGetMetrics() [all …]
|
/platform_testing/libraries/collectors-helper/system/src/com/android/helpers/ |
D | DumpsysServiceHelper.java | 69 Map<String, String> metrics = new HashMap<>(); in getMetrics() local 72 metrics.put(String.format(DUMPSYS_SERVICE_KEY, serviceName), outputPath); in getMetrics() 74 return metrics; in getMetrics()
|