/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | LogcatTimingMetricCollectorTest.java | 36 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 94 HashMap<String, Metric> metrics = new HashMap<>(); in testCollect_oneDevice_perRun() local 97 mCollector.testEnded(mTest, metrics); in testCollect_oneDevice_perRun() 98 mCollector.testRunEnded(0, metrics); in testCollect_oneDevice_perRun() 104 assertThat(metrics).hasSize(2); in testCollect_oneDevice_perRun() 105 assertThat(metrics).containsKey("metric1"); in testCollect_oneDevice_perRun() 106 assertThat(metrics).containsKey("metric2"); in testCollect_oneDevice_perRun() 108 Metric metric1 = metrics.get("metric1"); in testCollect_oneDevice_perRun() 113 Metric metric2 = metrics.get("metric2"); in testCollect_oneDevice_perRun() 129 HashMap<String, Metric> metrics = new HashMap<>(); in testCollect_multipleDevice_perRun() local [all …]
|
D | FilePullerLogCollectorTest.java | 28 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 72 Map<String, String> metrics = new HashMap<>(); in testSkipStub() local 73 metrics.put("log1", "/data/local/tmp/log1.txt"); in testSkipStub() 74 metrics.put("another_metrics", "57"); in testSkipStub() 83 listener.testEnded(test, 50L, TfMetricProtoUtil.upgradeConvert(metrics)); in testSkipStub() 101 Map<String, String> metrics = new HashMap<>(); in testPullAndLog() local 102 metrics.put("log1", "/data/local/tmp/log1.txt"); in testPullAndLog() 103 metrics.put("another_metrics", "57"); in testPullAndLog() 117 listener.testEnded(test, 50L, TfMetricProtoUtil.upgradeConvert(metrics)); in testPullAndLog() 137 Map<String, String> metrics = new HashMap<>(); in testSkipTestCollection() local [all …]
|
D | ScheduledDeviceMetricCollectorTest.java | 25 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements; 26 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 81 HashMap<String, Metric> metrics = new HashMap<>(); in testSetupAndPeriodicRunSingleDevice() local 87 mBase.testRunEnded(0l, metrics); in testSetupAndPeriodicRunSingleDevice() 91 assertTrue(metrics.containsKey("key1")); in testSetupAndPeriodicRunSingleDevice() 92 assertTrue(metrics.containsKey("key2")); in testSetupAndPeriodicRunSingleDevice() 93 assertTrue(metrics.containsKey("key3")); in testSetupAndPeriodicRunSingleDevice() 110 HashMap<String, Metric> metrics = new HashMap<>(); in testSetupAndPeriodicRunMultipleDevices() local 116 mBase.testRunEnded(0l, metrics); in testSetupAndPeriodicRunMultipleDevices() 121 assertTrue(metrics.keySet().stream().anyMatch(key -> key.startsWith("{test device 1}"))); in testSetupAndPeriodicRunMultipleDevices() [all …]
|
D | RuntimeRestartCollectorTest.java | 34 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 533 private static int getCount(Map<String, Metric> metrics) { in getCount() argument 535 metrics.entrySet() in getCount() 551 private static void ensureNoMetricWithKeySuffix(Map<String, Metric> metrics, String suffix) { in ensureNoMetricWithKeySuffix() argument 553 metrics.keySet() in ensureNoMetricWithKeySuffix() 568 Map<String, Metric> metrics, String suffix) { in getStringMetricValuesByKeySuffix() argument 569 return metrics.entrySet() in getStringMetricValuesByKeySuffix() 587 Map<String, Metric> metrics, String suffix) { in getIntMetricValuesByKeySuffix() argument 588 return getStringMetricValuesByKeySuffix(metrics, suffix) in getIntMetricValuesByKeySuffix() 599 Map<String, Metric> metrics, String suffix) { in getLongMetricValuesByKeySuffix() argument [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/logger/ |
D | TfObjectTrackerTest.java | 43 Map<String, Long> metrics = logMetric(testGroup, true, CommandOptions.class); in testNotTracking() local 44 assertTrue(metrics.isEmpty()); in testNotTracking() 52 Map<String, Long> metrics = logMetric(testGroup, true, SuiteApkInstaller.class); in testTrackingWithParents() local 53 assertEquals(3, metrics.size()); in testTrackingWithParents() 54 assertEquals(1, metrics.get(SuiteApkInstaller.class.getName()).longValue()); in testTrackingWithParents() 55 assertEquals(1, metrics.get(TestAppInstallSetup.class.getName()).longValue()); in testTrackingWithParents() 56 assertEquals(1, metrics.get(BaseTargetPreparer.class.getName()).longValue()); in testTrackingWithParents() 58 metrics = logMetric(testGroup, true, SuiteApkInstaller.class); in testTrackingWithParents() 59 assertEquals(3, metrics.size()); in testTrackingWithParents() 60 assertEquals(2, metrics.get(SuiteApkInstaller.class.getName()).longValue()); in testTrackingWithParents() [all …]
|
/tools/test/connectivity/acts_tests/tests/google/experimental/ |
D | BluetoothThroughputTest.py | 117 metrics = {} 125 metrics['data_transfer_protocol'] = self.data_transfer_type 126 metrics['data_packet_size'] = 300 127 metrics['data_throughput_min_bytes_per_second'] = int( 129 metrics['data_throughput_max_bytes_per_second'] = int( 131 metrics['data_throughput_avg_bytes_per_second'] = int(statistics.mean( 134 proto = self.bt_logger.get_results(metrics, 139 asserts.assert_true(metrics['data_throughput_min_bytes_per_second'] > 0, 151 metrics = {} 159 metrics['data_transfer_protocol'] = self.data_transfer_type [all …]
|
D | BluetoothPairAndConnectTest.py | 121 metrics = {} 155 metrics['pair_attempt_count'] = PAIR_CONNECT_ATTEMPTS 156 metrics['pair_successful_count'] = pair_connect_success 157 metrics['pair_failed_count'] = (PAIR_CONNECT_ATTEMPTS - 161 metrics['pair_max_time_millis'] = int(max(pair_times)) 162 metrics['pair_min_time_millis'] = int(min(pair_times)) 163 metrics['pair_avg_time_millis'] = int(statistics.mean(pair_times)) 166 metrics['first_connection_max_time_millis'] = int( 168 metrics['first_connection_min_time_millis'] = int( 170 metrics['first_connection_avg_time_millis'] = int( [all …]
|
D | BluetoothReconnectTest.py | 127 metrics = {} 154 metrics['connection_attempt_count'] = RECONNECTION_ATTEMPTS 155 metrics['connection_successful_count'] = connection_success 156 metrics['connection_failed_count'] = (RECONNECTION_ATTEMPTS 159 metrics['connection_max_time_millis'] = int(max(connection_times)) 160 metrics['connection_min_time_millis'] = int(min(connection_times)) 161 metrics['connection_avg_time_millis'] = int(statistics.mean( 165 metrics['connection_failure_info'] = reconnection_failures 167 proto = self.bt_logger.get_results(metrics, 172 self.log.info('Metrics: {}'.format(metrics))
|
/tools/tradefederation/contrib/src/com/android/media/tests/ |
D | VideoMultimeterTest.java | 273 Map<String, String> metrics, String keyprefix, float fps, boolean lipsync) { in getResult() argument 285 metrics.put(keyprefix + "frame_captured", nrOfDataPointsStr); in getResult() 301 return parseResult(metrics, nrOfDataPoints, allData, keyprefix, fps, lipsync); in getResult() 319 Map<String,String> metrics) throws DeviceNotAvailableException { in runMultimeterTest() argument 327 metrics = getResult(listener, metrics, keyPrefix, fps, true); in runMultimeterTest() 344 Map<String, String> metrics = new HashMap<>(); in run() local 347 runMultimeterTest(listener, metrics); in run() 351 listener.testEnded(testId, TfMetricProtoUtil.upgradeConvert(metrics)); in run() 352 listener.testRunEnded(durationMs, TfMetricProtoUtil.upgradeConvert(metrics)); in run() 361 private Map<String, String> parseResult(Map<String, String> metrics, in parseResult() argument [all …]
|
D | AudioLoopbackTestHelper.java | 620 Map<String, String> metrics, final String resultKeyPrefix) { in populateStressTestMetrics() argument 621 metrics.put(resultKeyPrefix + "total_nr_of_tests", Integer.toString(mAllResults.size())); in populateStressTestMetrics() 622 metrics.put(resultKeyPrefix + "nr_of_good_tests", Integer.toString(mGoodResults.size())); in populateStressTestMetrics() 623 metrics.put(resultKeyPrefix + "latency_max", Double.toString(mLatencyStats.mMax)); in populateStressTestMetrics() 624 metrics.put(resultKeyPrefix + "latency_min", Double.toString(mLatencyStats.mMin)); in populateStressTestMetrics() 625 metrics.put(resultKeyPrefix + "latency_mean", Double.toString(mLatencyStats.mMean)); in populateStressTestMetrics() 626 metrics.put(resultKeyPrefix + "latency_median", Double.toString(mLatencyStats.mMedian)); in populateStressTestMetrics() 627 metrics.put(resultKeyPrefix + "confidence_max", Double.toString(mConfidenceStats.mMax)); in populateStressTestMetrics() 628 metrics.put(resultKeyPrefix + "confidence_min", Double.toString(mConfidenceStats.mMin)); in populateStressTestMetrics() 629 metrics.put(resultKeyPrefix + "confidence_mean", Double.toString(mConfidenceStats.mMean)); in populateStressTestMetrics() [all …]
|
D | CameraShotToShotLatencyTest.java | 78 Map<String, String> metrics = parseOutputFile(); in run() local 79 reportMetrics(bugListener, TEST_RU, metrics); in run() 123 Map<String, String> metrics = new HashMap<String, String>(); in parseOutputFile() local 142 metrics.put(LATENCY_KEY_MEAN, m.group(3)); in parseOutputFile() 149 metrics.put(LATENCY_KEY_SD, m.group(3)); in parseOutputFile() 166 return metrics; in parseOutputFile() 176 Map<String, String> metrics) { in reportMetrics() argument 181 CLog.d(String.format("About to report metrics: %s", metrics)); in reportMetrics() 183 listener.testRunEnded(0, TfMetricProtoUtil.upgradeConvert(metrics)); in reportMetrics()
|
/tools/tradefederation/contrib/src/com/android/performance/tests/ |
D | EmmcPerformanceTest.java | 23 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 125 Map<String, String> metrics = new HashMap<>(); in run() local 127 runSequentialRead(mIterations, listener, metrics); in run() 128 runSequentialWrite(mIterations, listener, metrics); in run() 133 CLog.d("Metrics: %s", metrics.toString()); in run() 136 TfMetricProtoUtil.upgradeConvert(metrics)); in run() 144 int iterations, ITestInvocationListener listener, Map<String, String> metrics) in runSequentialRead() argument 149 runTest(SEQUENTIAL_READ_KEY, command, TestType.DD, true, iterations, listener, metrics); in runSequentialRead() 154 int iterations, ITestInvocationListener listener, Map<String, String> metrics) in runSequentialWrite() argument 159 runTest(SEQUENTIAL_WRITE_KEY, command, TestType.DD, false, iterations, listener, metrics); in runSequentialWrite() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/proto/ |
D | TfMetricProtoUtilTest.java | 20 import com.android.tradefed.metrics.proto.MetricMeasurement.DataType; 21 import com.android.tradefed.metrics.proto.MetricMeasurement.DoubleValues; 22 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements; 23 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 24 import com.android.tradefed.metrics.proto.MetricMeasurement.StringValues; 43 Map<String, Metric> metrics = new HashMap<>(); in testCompatibleConvert() local 46 metrics.put("key1", createMetric(m1)); in testCompatibleConvert() 50 metrics.put("key2", createMetric(m2)); in testCompatibleConvert() 54 metrics.put("key3", createMetric(m3)); in testCompatibleConvert() 61 metrics.put("key4", createMetric(m4)); in testCompatibleConvert() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/proto/ |
D | ProtoResultParserTest.java | 29 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 145 HashMap<String, Metric> metrics = new HashMap<String, Metric>(); in testEvents() local 146 metrics.put("metric1", TfMetricProtoUtil.stringToMetric("value1")); in testEvents() 163 mMockListener.testEnded(test2, 60L, metrics); in testEvents() 207 mTestParser.testEnded(test2, 60L, metrics); in testEvents() 365 HashMap<String, Metric> metrics = new HashMap<String, Metric>(); in testEvents_finaleProto() local 366 metrics.put("metric1", TfMetricProtoUtil.stringToMetric("value1")); in testEvents_finaleProto() 382 mMockListener.testEnded(test2, 60L, metrics); in testEvents_finaleProto() 408 mFinalTestParser.testEnded(test2, 60L, metrics); in testEvents_finaleProto() 560 HashMap<String, Metric> metrics = new HashMap<String, Metric>(); in testEvents_subprocess() local [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | HostTestTest.java | 33 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 210 @Rule public TestMetrics metrics = new TestMetrics(); field in HostTestTest.Junit4TestClass 217 metrics.addTestMetric("key", "value"); in testPass5() 223 metrics.addTestMetric("key2", "value2"); in testPass6() 225 metrics.addTestMetric("junit4-option", "true"); in testPass6() 228 metrics.addTestMetric("map-option", mapOption.values().toString()); in testPass6() 534 @Rule public TestMetrics metrics = new TestMetrics(); field in HostTestTest.OptionEscapeColonTestCase 547 metrics.addTestMetric("gcs-bucket-file", mGcsBucketFile.toURI().toString()); in testGcsBucket() 556 metrics.addTestMetric("hello", mHelloWorld); in testEscapeStrings() 557 metrics.addTestMetric("foobar", mFoobar); in testEscapeStrings() [all …]
|
D | DeviceTestCaseTest.java | 23 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 120 Map<String, String> metrics = new HashMap<>(); in testRun_suite() local 121 metrics.put("test", "value"); in testRun_suite() 122 listener.testEnded(test1, TfMetricProtoUtil.upgradeConvert(metrics)); in testRun_suite() 144 Map<String, String> metrics = new HashMap<>(); in testRun_includeFilter() local 145 metrics.put("test", "value"); in testRun_includeFilter() 146 listener.testEnded(test1, TfMetricProtoUtil.upgradeConvert(metrics)); in testRun_includeFilter() 255 Map<String, String> metrics = new HashMap<>(); in testRun_singleTest() local 256 metrics.put("test", "value"); in testRun_singleTest() 257 listener.testEnded(test1, TfMetricProtoUtil.upgradeConvert(metrics)); in testRun_singleTest()
|
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/reporter/ |
D | GameQualificationResultReporter.java | 26 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 76 … public void testEnded(TestDescription testId, long elapsedTime, HashMap<String, Metric> metrics) { in testEnded() argument 77 super.testEnded(testId, elapsedTime, metrics); in testEnded() 78 if (!metrics.isEmpty()) { in testEnded() 79 … MetricSummary summary = MetricSummary.parseRunMetrics(getInvocationContext(), metrics); in testEnded() 82 } else if (metrics.containsKey("memory_allocated")) { in testEnded() 83 … mTotalAllocated = (int) metrics.get("memory_allocated").getMeasurements().getSingleInt(); in testEnded() 306 MetricSummary metrics = entry.getValue(); in createPerformanceReport() local 314 List<LoopSummary> loopSummaries = metrics.getLoopSummaries(); in createPerformanceReport() 344 if (metrics.getLoadTimeMs() == -1) { in createPerformanceReport() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/result/ |
D | ConsoleResultReporter.java | 104 public void testRunEnded(long elapsedTimeMillis, Map<String, String> metrics) { in testRunEnded() argument 105 super.testRunEnded(elapsedTimeMillis, metrics); in testRunEnded() 106 if (metrics != null && !metrics.isEmpty()) { in testRunEnded() 113 List<String> metricKeys = new ArrayList<String>(metrics.keySet()); in testRunEnded() 116 sb.append(String.format("%s=%s\n", metricKey, metrics.get(metricKey))); in testRunEnded() 207 Map<String, String> metrics = testResult.getMetrics(); in getTestSummary() local 208 if (metrics != null && !metrics.isEmpty()) { in getTestSummary() 209 List<String> metricKeys = new ArrayList<String>(metrics.keySet()); in getTestSummary() 212 sb.append(String.format(" %s: %s\n", metricKey, metrics.get(metricKey))); in getTestSummary()
|
D | TextResultReporter.java | 21 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 57 public void testEnded(TestDescription testId, HashMap<String, Metric> metrics) { in testEnded() argument 58 super.testEnded(testId, metrics); in testEnded() 59 if (!metrics.isEmpty()) { in testEnded() 61 printer.getWriter().format("\n%s metrics: %s\n", testId, metrics); in testEnded() 67 public void testRunEnded(long elapsedTime, HashMap<String, Metric> metrics) { in testRunEnded() argument 68 super.testRunEnded(elapsedTime, metrics); in testRunEnded() 69 if (!metrics.isEmpty()) { in testRunEnded() 71 printer.getWriter().format("\nMetrics: %s\n", metrics); in testRunEnded()
|
/tools/loganalysis/test_framework/com/android/tradefed/device/metric/ |
D | LogcatTimingMetricCollector.java | 27 import com.android.tradefed.metrics.proto.MetricMeasurement.DataType; 28 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements; 29 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 128 Map<String, List<Double>> metrics = parse(logcatData); in onTestRunEnd() local 129 for (Map.Entry<String, List<Double>> entry : metrics.entrySet()) { in onTestRunEnd() 167 Map<String, List<Double>> metrics = new HashMap<>(); in parse() local 174 if (!metrics.containsKey(metricKey)) { in parse() 175 metrics.put(metricKey, new ArrayList<>()); in parse() 177 metrics.get(metricKey).add(item.getDuration()); in parse() 182 return metrics; in parse()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/device/metric/ |
D | LogcatTimingMetricCollector.java | 27 import com.android.tradefed.metrics.proto.MetricMeasurement.DataType; 28 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements; 29 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 175 Map<String, List<Double>> metrics = parse(logcatData); in collectMetrics() local 176 for (Map.Entry<String, List<Double>> entry : metrics.entrySet()) { in collectMetrics() 205 Map<String, List<Double>> metrics = new HashMap<>(); in parse() local 212 if (!metrics.containsKey(metricKey)) { in parse() 213 metrics.put(metricKey, new ArrayList<>()); in parse() 215 metrics.get(metricKey).add(item.getDuration()); in parse() 220 return metrics; in parse()
|
/tools/tradefederation/core/test_result_interfaces/com/android/tradefed/util/proto/ |
D | TfMetricProtoUtil.java | 19 import com.android.tradefed.metrics.proto.MetricMeasurement.DataType; 20 import com.android.tradefed.metrics.proto.MetricMeasurement.Directionality; 21 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements; 22 import com.android.tradefed.metrics.proto.MetricMeasurement.Measurements.MeasurementCase; 23 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 24 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric.Builder; 73 public static HashMap<String, Metric> upgradeConvert(Map<String, String> metrics) { in upgradeConvert() argument 75 for (String key : metrics.keySet()) { in upgradeConvert() 76 newFormat.put(key, stringToMetric(metrics.get(key))); in upgradeConvert()
|
/tools/tradefederation/contrib/src/com/android/regression/tests/ |
D | MetricsXmlParser.java | 74 public MetricsXmlHandler(Metrics metrics, Set<String> blocklistMetrics) { in MetricsXmlHandler() argument 75 mMetrics = metrics; in MetricsXmlHandler() 135 Metrics metrics = new Metrics(strictMode); in parse() local 138 parse(metrics, blocklistMetrics, is); in parse() 143 metrics.validate(metricXmlFiles.size()); in parse() 144 return metrics; in parse() 148 public static Metrics parse(Metrics metrics, Set<String> blocklistMetrics, InputStream is) in parse() argument 154 parser.parse(is, new MetricsXmlHandler(metrics, blocklistMetrics)); in parse() 155 return metrics; in parse()
|
/tools/asuite/atest/ |
D | atest.py | 51 from metrics import metrics 52 from metrics import metrics_base 53 from metrics import metrics_utils 694 metrics.AtestStartEvent( 748 metrics.BuildFinishEvent( 763 metrics.LocalDetectEvent( 770 metrics.LocalDetectEvent( 798 metrics.RunTestsFinishEvent( 803 metrics.RunnerFinishEvent( 828 metrics.LocalDetectEvent(
|
/tools/test/connectivity/acts/framework/tests/metrics/ |
D | core_test.py | 23 from acts.metrics.core import MetricPublisher 24 from acts.metrics.core import ProtoMetric 25 from acts.metrics.core import ProtoMetricPublisher 104 metrics = Mock() 107 self.assertRaises(NotImplementedError, lambda: publisher.publish(metrics)) 163 metrics = [Mock()] 171 publisher.publish(metrics) 181 metrics = [Mock()] 189 publisher.publish(metrics)
|