/tools/test/connectivity/acts/framework/tests/metrics/ |
D | core_test.py | 42 metric = ProtoMetric(name = self.TEST_NAME, data=self.data) 43 self.assertEqual(metric.name, self.TEST_NAME) 44 self.assertEqual(metric.data, self.data) 50 metric = ProtoMetric(name=self.TEST_NAME, data=self.data) 53 metric.get_binary() 59 metric = ProtoMetric(name=self.TEST_NAME, data=self.data) 61 metric.get_ascii() 67 metric = ProtoMetric(name=self.TEST_NAME, data=self.data) 72 metric.get_descriptor_binary() 80 metric = ProtoMetric(name=self.TEST_NAME, data=self.data) [all …]
|
/tools/test/connectivity/acts/framework/tests/metrics/loggers/ |
D | blackbox_test.py | 187 self.metric = BlackboxMetricLogger.for_test_case('my_metric') 190 self.metric.metric_value = result 196 metric = self.__get_only_arg(args_list[0])[0] 197 self.assertEqual(metric.name, 'blackbox_my_metric') 198 self.assertEqual(metric.data.test_identifier, 'MyTest#test_case') 199 self.assertEqual(metric.data.metric_key, 'MyTest#test_case.my_metric') 200 self.assertEqual(metric.data.metric_value, result) 224 self.assertEqual({metric.name 225 for metric in metrics}, 227 self.assertEqual({metric.data.test_identifier [all …]
|
/tools/test/connectivity/acts/framework/acts/metrics/ |
D | core.py | 153 for metric in metrics: 154 self._publish_single(metric) 158 def _publish_single(self, metric): argument 173 self.write_binary(metric, output_path) 175 self.write_ascii(metric, output_path) 177 self.write_descriptor_binary(metric, output_path) 179 self.write_descriptor_ascii(metric, output_path) 181 def write_binary(self, metric, output_path): argument 189 output_path, metric.name, self.BINARY_EXTENSION) 190 dump_string_to_file(metric.get_binary(), filename, mode='wb') [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/ |
D | UnitTests.java | 95 import com.android.tradefed.device.metric.AtraceCollectorTest; 96 import com.android.tradefed.device.metric.AtraceRunMetricCollectorTest; 97 import com.android.tradefed.device.metric.AutoLogCollectorTest; 98 import com.android.tradefed.device.metric.BaseDeviceMetricCollectorTest; 99 import com.android.tradefed.device.metric.BuddyInfoMetricCollectorTest; 100 import com.android.tradefed.device.metric.BugreportzMetricCollectorTest; 101 import com.android.tradefed.device.metric.BugreportzOnFailureCollectorTest; 102 import com.android.tradefed.device.metric.DebugHostLogOnFailureCollectorTest; 103 import com.android.tradefed.device.metric.DeviceMetricDataTest; 104 import com.android.tradefed.device.metric.DumpHeapCollectorTest; [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/device/metric/ |
D | ProcessMaxMemoryCollector.java | 16 package com.android.tradefed.device.metric; 135 Metric.Builder metric = Metric.newBuilder(); in onEnd() local 136 metric.setMeasurements( in onEnd() 140 metric.setUnit("kB").setType(DataType.RAW); in onEnd() 141 runData.addMetricForDevice(device, "PSS#" + values.getKey(), metric); in onEnd() 147 Metric.Builder metric = Metric.newBuilder(); in onEnd() local 148 metric.setMeasurements( in onEnd() 152 metric.setUnit("kB").setType(DataType.RAW); in onEnd() 153 runData.addMetricForDevice(device, "USS#" + values.getKey(), metric); in onEnd() 160 Metric.Builder metric = Metric.newBuilder(); in onEnd() local [all …]
|
D | TemperatureCollector.java | 16 package com.android.tradefed.device.metric; 130 Metric.Builder metric = Metric.newBuilder(); in onEnd() local 131 metric.setMeasurements( in onEnd() 133 metric.setUnit(CELCIUS_UNIT).setType(DataType.RAW); in onEnd() 134 runData.addMetricForDevice(device, "temperature", metric); in onEnd() 139 Metric.Builder metric = Metric.newBuilder(); in onEnd() local 140 metric.setMeasurements(Measurements.newBuilder().setSingleDouble(maxTemp).build()); in onEnd() 142 metric.setUnit(CELCIUS_UNIT).setType(DataType.PROCESSED); in onEnd() 143 runData.addMetricForDevice(device, "max_temperature", metric); in onEnd() 147 Metric.Builder metric = Metric.newBuilder(); in onEnd() local [all …]
|
D | AtraceRunMetricCollector.java | 17 package com.android.tradefed.device.metric; 165 String[] metric = line.split(METRIC_SEPARATOR); in aggregateMetrics() local 166 if (!resultAggregatorMap.containsKey(metric[0].trim())) { in aggregateMetrics() 168 resultStats.add(Double.parseDouble(metric[1].trim())); in aggregateMetrics() 169 resultAggregatorMap.put(metric[0].trim(), resultStats); in aggregateMetrics() 171 resultAggregatorMap.get(metric[0].trim()).add( in aggregateMetrics() 172 Double.parseDouble(metric[1].trim())); in aggregateMetrics()
|
D | PerfettoPullerMetricCollector.java | 16 package com.android.tradefed.device.metric; 239 for (String metric : metrics) { in processMetricFile() 240 Pair<String, String> kv = splitKeyValue(metric); in processMetricFile() 249 CLog.e("Output %s not in the expected format.", metric); in processMetricFile()
|
/tools/test/connectivity/acts/framework/acts/test_utils/bt/loggers/ |
D | bluetooth_metric_logger.py | 29 for metric in dir(proto): 30 if metric in dct: 31 if (isinstance(dct[metric], dict) and 32 isinstance(getattr(proto, metric), message.Message)): 33 recursive_assign(getattr(proto, metric), dct[metric]) 35 setattr(proto, metric, dct[metric]) 118 for metric in dir(pri_device_proto): 119 if metric in pri_config: 120 setattr(pri_device_proto, metric, pri_config[metric]) 125 for metric in dir(conn_device_proto): [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | NativeCodeCoverageListenerTest.java | 114 Map<String, String> metric = new HashMap<>(); in test_logsCoverageZip() local 115 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in test_logsCoverageZip() 146 Map<String, String> metric = new HashMap<>(); in testNoCoverageFiles_logsEmptyZip() local 147 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testNoCoverageFiles_logsEmptyZip() 176 Map<String, String> metric = new HashMap<>(); in testCoverageFlushAllProcesses_flushAllCommandCalled() local 177 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testCoverageFlushAllProcesses_flushAllCommandCalled() 201 Map<String, String> metric = new HashMap<>(); in testCoverageFlushSpecificProcesses_flushCommandCalled() local 202 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testCoverageFlushSpecificProcesses_flushCommandCalled() 218 Map<String, String> metric = new HashMap<>(); in testFailure_unableToPullFile() local 221 ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testFailure_unableToPullFile() [all …]
|
D | JavaCodeCoverageListenerTest.java | 257 Map<String, String> metric = new HashMap<>(); in testMerge_producesSingleMeasurement() local 258 metric.put("coverageFilePath", DEVICE_PATH); in testMerge_producesSingleMeasurement() 265 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testMerge_producesSingleMeasurement() 267 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testMerge_producesSingleMeasurement() 319 Map<String, String> metric = new HashMap<>(); in testCoverageFlush_producesMultipleMeasurements() local 320 metric.put("coverageFilePath", DEVICE_PATH); in testCoverageFlush_producesMultipleMeasurements() 321 mCodeCoverageListener.testRunEnded(ELAPSED_TIME, TfMetricProtoUtil.upgradeConvert(metric)); in testCoverageFlush_producesMultipleMeasurements()
|
/tools/acloud/internal/lib/ |
D | gcompute_client.py | 232 def GetMetricQuota(regions_info, zone, metric): argument 247 if quota["metric"] == metric: 249 logger.info("Can't get %s quota info from zone(%s)", metric, zone) 264 for metric in _METRICS: 265 quota = self.GetMetricQuota(regions_info, zone, metric) 268 "Can't query the metric(%s) in zone(%s)", metric, zone) 270 if quota[_LIMIT] - quota[_USAGE] < _REQUIRE_METRICS[metric]: 272 "The metric(%s) is over limit in zone(%s)", metric, zone) 1451 for metric in self.MACHINE_SIZE_METRICS: 1452 if metric not in machine_info_1 or metric not in machine_info_2: [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/postprocessor/ |
D | PerfettoGenericPostProcessor.java | 274 for (Map.Entry<String, Metric.Builder> metric : processPerfettoMetrics.entrySet()) { in replacePrefix() 277 if (metric.getKey().startsWith(replaceEntry.getKey())) { in replacePrefix() 278 String newKey = metric.getKey().replaceFirst(replaceEntry.getKey(), in replacePrefix() 280 finalMetrics.put(newKey, metric.getValue()); in replacePrefix() 287 finalMetrics.put(metric.getKey(), metric.getValue()); in replacePrefix() 304 for (Map.Entry<String, Metric.Builder> metric : processPerfettoMetrics.entrySet()) { in replaceAllMetricPrefix() 305 String newKey = String.format("%s_%s", mAllMetricPrefix, metric.getKey()); in replaceAllMetricPrefix() 306 finalMetrics.put(newKey, metric.getValue()); in replaceAllMetricPrefix() 307 CLog.d("Perfetto trace metric: key: %s value: %s", newKey, metric.getValue()); in replaceAllMetricPrefix()
|
/tools/test/connectivity/acts_tests/tests/google/gnss/ |
D | AGNSSPerformanceTest.py | 157 metric = val['avg'] 159 metric = val 161 if thresholds[key]['min'] < metric < thresholds[key]['max']: 163 'values.'.format(key, metric)) 166 '{}).'.format(key, metric, 173 self.ttf_metric.metric_value = metric 175 self.pos_error_metric.metric_value = metric 177 self.sensitivity_metric.metric_value = metric
|
/tools/tradefederation/contrib/src/com/android/media/tests/ |
D | CameraPerformanceTest.java | 124 for (Map.Entry<String, String> metric : testMetrics.entrySet()) { in handleMetricsOnTestEnded() 125 getAggregatedMetrics().put(test.getTestName(), metric.getValue()); in handleMetricsOnTestEnded() 158 for (Map.Entry<String, String> metric : metrics.entrySet()) { in parseResult() 159 String testMethod = metric.getKey(); in parseResult() 160 String testResult = metric.getValue(); in parseResult() 284 for (CtsMetric metric : metrics) { in filter() 287 if (metric.matches(testMethod, kpiName)) { in filter() 288 filtered.put(metric.schemaKey, metric.value); in filter()
|
D | Camera2LatencyTest.java | 82 for (Map.Entry<String, String> metric : testMetrics.entrySet()) { in parseResults() 83 Matcher matcher = STATS_REGEX.matcher(metric.getValue()); in parseResults() 85 String keyName = String.format("%s_%s", testName, metric.getKey()); in parseResults() 88 CLog.w(String.format("Stats not in correct format: %s", metric.getValue())); in parseResults()
|
D | CameraShotLatencyTest.java | 79 for (Map.Entry<String, String> metric : testMetrics.entrySet()) { in parseResults() 80 Matcher matcher = STATS_REGEX.matcher(metric.getValue()); in parseResults() 83 String keyName = String.format("%s_%s", testName, metric.getKey()); in parseResults() 86 CLog.w(String.format("Stats not in correct format: %s", metric.getValue())); in parseResults()
|
D | CameraBurstStartupTest.java | 70 for (Map.Entry<String, String> metric : testMetrics.entrySet()) { in parseResults() 71 Matcher matcher = STATS_REGEX.matcher(metric.getValue()); in parseResults() 75 String keyName = String.format("%s_%s", testName, metric.getKey()); in parseResults() 78 CLog.w(String.format("Stats not in correct format: %s", metric.getValue())); in parseResults()
|
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/metric/ |
D | GameQualificationFpsCollector.java | 16 package com.android.game.qualification.metric; 18 import static com.android.game.qualification.metric.MetricSummary.TimeType.PRESENT; 19 import static com.android.game.qualification.metric.MetricSummary.TimeType.READY; 24 import com.android.tradefed.device.metric.DeviceMetricData; 213 for(GameQualificationMetric metric : mElapsedTimes) in processTimestampsSlice() 215 long presentTime = metric.getActualPresentTime(); in processTimestampsSlice() 216 long readyTime = metric.getFrameReadyTime(); in processTimestampsSlice()
|
D | LoopSummary.java | 1 package com.android.game.qualification.metric; 5 import com.android.tradefed.device.metric.DeviceMetricData; 291 String metric, in getMetricDoubleValue() argument 294 getActualMetricKey(context, type, runIndex, metric)); in getMetricDoubleValue() 305 String metric, in getMetricLongValue() argument 308 getActualMetricKey(context, type, runIndex, metric)); in getMetricLongValue()
|
D | BaseGameQualificationMetricCollector.java | 17 package com.android.game.qualification.metric; 24 import com.android.tradefed.device.metric.BaseDeviceMetricCollector; 25 import com.android.tradefed.device.metric.DeviceMetricData;
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | DeviceMetricData.java | 16 package com.android.tradefed.device.metric; 53 public void addMetric(String key, Metric.Builder metric) { in addMetric() argument 62 Metric m = metric.build(); in addMetric() 74 public void addMetricForDevice(ITestDevice device, String key, Metric.Builder metric) { in addMetricForDevice() argument 83 Metric m = metric.build(); in addMetricForDevice()
|
/tools/test/connectivity/acts/framework/acts/metrics/loggers/ |
D | bounded_metrics.py | 40 def add(self, metric, value, lower_limit=None, upper_limit=None, unit=None): argument 57 bounded_metric.metric = metric 65 self._metric_map[metric] = bounded_metric
|
/tools/test/graphicsbenchmark/performance_tests/hostside/test/com/android/game/qualification/metric/ |
D | MetricSummaryTest.java | 16 package com.android.game.qualification.metric; 18 import static com.android.game.qualification.metric.MetricSummary.TimeType.PRESENT; 19 import static com.android.game.qualification.metric.MetricSummary.TimeType.READY; 25 import com.android.tradefed.device.metric.DeviceMetricData;
|
/tools/tradefederation/core/src/com/android/tradefed/postprocessor/ |
D | AveragePostProcessor.java | 40 Metric metric = rawMetrics.get(key); in processRunMetricsAndLogs() local 41 Measurements measure = metric.getMeasurements(); in processRunMetricsAndLogs() 52 newMetrics.put(key + AVERAGE_KEY_TAG, createAvgMetric(avg, metric)); in processRunMetricsAndLogs() 63 newMetrics.put(key + AVERAGE_KEY_TAG, createAvgMetric(avg, metric)); in processRunMetricsAndLogs()
|