/packages/modules/StatsD/statsd/src/metrics/parsing_utils/ |
D | metrics_manager_util.cpp | 196 const StatsdConfig& config, const MessageLite& metric, const int64_t id, in getMetricProtoHash() argument 199 if (!metric.SerializeToString(&serializedMetric)) { in getMetricProtoHash() 499 const int64_t currentTimeNs, const CountMetric& metric, const int metricIndex, in createCountMetricProducerAndUpdateMetadata() argument 514 if (!metric.has_id() || !metric.has_what()) { in createCountMetricProducerAndUpdateMetadata() 515 ALOGE("cannot find metric id or \"what\" in CountMetric \"%lld\"", (long long)metric.id()); in createCountMetricProducerAndUpdateMetadata() 517 InvalidConfigReason(INVALID_CONFIG_REASON_METRIC_MISSING_ID_OR_WHAT, metric.id()); in createCountMetricProducerAndUpdateMetadata() 522 metric.what(), metric.id(), metricIndex, metric.has_dimensions_in_what(), in createCountMetricProducerAndUpdateMetadata() 529 if (metric.has_condition()) { in createCountMetricProducerAndUpdateMetadata() 531 metric.condition(), metric.id(), metricIndex, conditionTrackerMap, metric.links(), in createCountMetricProducerAndUpdateMetadata() 537 if (metric.links_size() > 0) { in createCountMetricProducerAndUpdateMetadata() [all …]
|
D | config_update_utils.cpp | 499 const StatsdConfig& config, const MessageLite& metric, const int64_t metricId, in determineMetricUpdateStatus() argument 519 getMetricProtoHash(config, metric, metricId, metricToActivationMap, metricHash); in determineMetricUpdateStatus() 580 const CountMetric& metric = config.count_metric(i); in determineAllMetricUpdateStatuses() local 582 if (metric.has_condition()) { in determineAllMetricUpdateStatuses() 583 conditionDependencies.insert(metric.condition()); in determineAllMetricUpdateStatuses() 586 config, metric, metric.id(), METRIC_TYPE_COUNT, {metric.what()}, in determineAllMetricUpdateStatuses() 587 conditionDependencies, metric.slice_by_state(), metric.links(), in determineAllMetricUpdateStatuses() 595 const DurationMetric& metric = config.duration_metric(i); in determineAllMetricUpdateStatuses() local 596 set<int64_t> conditionDependencies({metric.what()}); in determineAllMetricUpdateStatuses() 597 if (metric.has_condition()) { in determineAllMetricUpdateStatuses() [all …]
|
/packages/modules/StatsD/statsd/tests/metrics/parsing_utils/ |
D | metrics_manager_util_test.cpp | 127 CountMetric* metric = config.add_count_metric(); in buildAlertWithUnknownMetric() local 128 metric->set_id(3); in buildAlertWithUnknownMetric() 129 metric->set_what(StringToId("ScreenTurnedOn")); in buildAlertWithUnknownMetric() 130 metric->set_bucket(ONE_MINUTE); in buildAlertWithUnknownMetric() 131 metric->mutable_dimensions_in_what()->set_field(SCREEN_STATE_ATOM_ID); in buildAlertWithUnknownMetric() 132 metric->mutable_dimensions_in_what()->add_child()->set_field(1); in buildAlertWithUnknownMetric() 173 CountMetric* metric = config.add_count_metric(); in buildMissingPredicate() local 174 metric->set_id(3); in buildMissingPredicate() 175 metric->set_what(StringToId("SCREEN_EVENT")); in buildMissingPredicate() 176 metric->set_bucket(ONE_MINUTE); in buildMissingPredicate() [all …]
|
/packages/modules/StatsD/statsd/tests/metrics/ |
D | DurationMetricProducer_test.cpp | 68 DurationMetric metric; in TEST() local 69 metric.set_id(1); in TEST() 70 metric.set_bucket(ONE_MINUTE); in TEST() 71 metric.set_aggregation_type(DurationMetric_AggregationType_SUM); in TEST() 77 kConfigKey, metric, -1 /*no condition*/, {}, -1 /*what index not needed*/, in TEST() 91 DurationMetric metric; in TEST() local 92 metric.set_id(1); in TEST() 93 metric.set_bucket(ONE_MINUTE); in TEST() 94 metric.set_aggregation_type(DurationMetric_AggregationType_SUM); in TEST() 106 kConfigKey, metric, -1 /*no condition*/, {}, -1 /*what index not needed*/, in TEST() [all …]
|
D | KllMetricProducer_test.cpp | 104 static sp<KllMetricProducer> createKllProducerNoConditions(const KllMetric& metric) { in createKllProducerNoConditions() argument 105 return createKllProducer(metric); in createKllProducerNoConditions() 109 const KllMetric& metric, const ConditionState& initialCondition) { in createKllProducerWithCondition() argument 110 return createKllProducer(metric, initialCondition); in createKllProducerWithCondition() 114 const KllMetric& metric, optional<ConditionState> initialCondition = nullopt, in createKllProducer() argument 121 TimeUnitToBucketSizeInMillisGuardrailed(kConfigKey.GetUid(), metric.bucket())); 123 HasPositionANY(metric.dimensions_in_what()); 125 ShouldUseNestedDimensions(metric.dimensions_in_what()); 128 translateFieldMatcher(metric.kll_field(), &fieldMatchers); 142 kConfigKey, metric, protoHash, {/*pullAtomId=*/-1, /*pullerManager=*/nullptr}, [all …]
|
D | GaugeMetricProducer_test.cpp | 86 GaugeMetric metric; in TEST() local 87 metric.set_id(metricId); in TEST() 88 metric.set_bucket(ONE_MINUTE); in TEST() 89 metric.mutable_gauge_fields_filter()->set_include_all(false); in TEST() 90 auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields(); in TEST() 105 GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 117 GaugeMetric metric; in TEST() local 118 metric.set_id(metricId); in TEST() 119 metric.set_bucket(ONE_MINUTE); in TEST() 120 metric.mutable_gauge_fields_filter()->set_include_all(false); in TEST() [all …]
|
D | CountMetricProducer_test.cpp | 73 CountMetric metric; in TEST() local 74 metric.set_id(1); in TEST() 75 metric.set_bucket(ONE_MINUTE); in TEST() 79 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 94 CountMetric metric; in TEST() local 95 metric.set_id(1); in TEST() 96 metric.set_bucket(ONE_MINUTE); in TEST() 100 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST() 157 CountMetric metric; in TEST() local 158 metric.set_id(1); in TEST() [all …]
|
D | RestrictedEventMetricProducer_test.cpp | 55 EventMetric metric; in TEST_F() local 56 metric.set_id(metricId1); in TEST_F() 58 RestrictedEventMetricProducer producer(configKey, metric, in TEST_F() 89 EventMetric metric; in TEST_F() local 90 metric.set_id(metricId2); in TEST_F() 92 RestrictedEventMetricProducer producer(configKey, metric, in TEST_F() 131 EventMetric metric; in TEST_F() local 132 metric.set_id(metricId1); in TEST_F() 133 metric.set_condition(StringToId("SCREEN_ON")); in TEST_F() 135 RestrictedEventMetricProducer producer(configKey, metric, in TEST_F() [all …]
|
D | EventMetricProducer_test.cpp | 73 EventMetric metric; in TEST_F() local 74 metric.set_id(1); in TEST_F() 85 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, in TEST_F() 110 EventMetric metric; in TEST_F() local 111 metric.set_id(1); in TEST_F() 112 metric.set_condition(StringToId("SCREEN_ON")); in TEST_F() 123 EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/, in TEST_F() 154 EventMetric metric; in TEST_F() local 155 metric.set_id(1); in TEST_F() 156 metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON")); in TEST_F() [all …]
|
D | NumericValueMetricProducer_test.cpp | 109 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric, in createValueProducerNoConditions() argument 111 return createValueProducer(pullerManager, metric, pullAtomId); in createValueProducerNoConditions() 115 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric, in createValueProducerWithCondition() argument 117 return createValueProducer(pullerManager, metric, pullAtomId, in createValueProducerWithCondition() 122 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric, in createValueProducerWithState() argument 126 return createValueProducer(pullerManager, metric, pullAtomId, in createValueProducerWithState() 132 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric, in createValueProducerWithConditionAndState() argument 136 return createValueProducer(pullerManager, metric, pullAtomId, in createValueProducerWithConditionAndState() 142 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric, in createValueProducerWithSampling() argument 145 pullerManager, metric, pullAtomId, /*conditionAfterFirstBucketPrepared=*/nullopt, in createValueProducerWithSampling() [all …]
|
/packages/modules/Bluetooth/system/blueberry/utils/ |
D | metrics_utils.py | 47 for metric in device_metrics_dict: 48 if metric in message_fields: 49 setattr(device_message, metric, device_metrics_dict[metric]) 51 logging.info('%s is not a valid metric field.', metric) 69 for metric in device_metrics_dict: 70 if metric in message_fields: 71 setattr(device_message, metric, device_metrics_dict[metric]) 73 logging.warning('%s is not a valid metric field.', metric) 86 for metric in test_metrics_dict: 87 if metric in message_fields: [all …]
|
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/impl/ |
D | CobaltLoggerImpl.java | 99 metric -> in logOccurrence() 101 metric, count, eventCodes, currentTimeMillis), in logOccurrence() 123 metric -> in logString() 125 metric, stringValue, eventCodes, currentTimeMillis), in logString() 130 MetricDefinition metric, long count, List<Integer> eventCodes, long currentTimeMillis) { in loggerEnabledLogOccurrence() argument 132 if (mReleaseStage.getNumber() > metric.getMetaData().getMaxReleaseStageValue()) { in loggerEnabledLogOccurrence() 138 logNumberToReports(metric, count, eventVector, currentTimeMillis))) in loggerEnabledLogOccurrence() 142 x -> recordFailureAndRethrow(metric.getId(), x), in loggerEnabledLogOccurrence() 147 MetricDefinition metric, in loggerEnabledLogString() argument 152 if (mReleaseStage.getNumber() > metric.getMetaData().getMaxReleaseStageValue()) { in loggerEnabledLogString() [all …]
|
/packages/modules/OnDevicePersonalization/tests/federatedcomputetests/src/com/android/federatedcompute/services/statsd/ |
D | FederatedComputeStatsdLoggerTest.java | 29 ExampleIteratorLatency metric = in logWithRateLimit_1QPS() local 39 assertTrue(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_1QPS() 40 assertFalse(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_1QPS() 42 assertTrue(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_1QPS() 47 ExampleIteratorLatency metric = in logWithRateLimit_3QPS() local 57 assertTrue(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_3QPS() 58 assertFalse(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_3QPS() 60 assertTrue(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_3QPS() 61 assertFalse(logger.recordExampleIteratorLatencyMetrics(metric)); in logWithRateLimit_3QPS()
|
/packages/modules/AdServices/adservices/libraries/cobalt/tests/src/com/android/cobalt/observations/ |
D | PrivateIndexCalculationsTest.java | 246 MetricDefinition metric = in testEventVectorToIndex_oneEventCode_correctIndex() local 253 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(5), metric)) in testEventVectorToIndex_oneEventCode_correctIndex() 255 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(6), metric)) in testEventVectorToIndex_oneEventCode_correctIndex() 261 MetricDefinition metric = in testEventVectorToIndex_oneEventCodeWithMax_correctIndex() local 265 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(5), metric)) in testEventVectorToIndex_oneEventCodeWithMax_correctIndex() 267 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(6), metric)) in testEventVectorToIndex_oneEventCodeWithMax_correctIndex() 273 MetricDefinition metric = in testEventVectorToIndex_twoEventCodes_correctIndex() local 284 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(5, 5), metric)) in testEventVectorToIndex_twoEventCodes_correctIndex() 286 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(6, 5), metric)) in testEventVectorToIndex_twoEventCodes_correctIndex() 288 assertThat(PrivateIndexCalculations.eventVectorToIndex(EventVector.create(5, 6), metric)) in testEventVectorToIndex_twoEventCodes_correctIndex() [all …]
|
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/observations/ |
D | ObservationGeneratorFactory.java | 74 MetricDefinition metric, ReportDefinition report, int dayIndex) { in getObservationGenerator() argument 77 return getNonPrivateObservationGenerator(metric, report, dayIndex); in getObservationGenerator() 79 return getPrivateObservationGenerator(metric, report); in getObservationGenerator() 87 MetricDefinition metric, ReportDefinition report, int dayIndex) { in getNonPrivateObservationGenerator() argument 95 metric.getId(), in getNonPrivateObservationGenerator() 104 (long) metric.getId(), in getNonPrivateObservationGenerator() 112 metric.getId(), in getNonPrivateObservationGenerator() 121 MetricDefinition metric, ReportDefinition report) { in getPrivateObservationGenerator() argument 128 new PrivateIntegerEncoder(mSecureRandom, metric, report), in getPrivateObservationGenerator() 131 metric, in getPrivateObservationGenerator()
|
/packages/modules/AdServices/adservices/libraries/cobalt/tests/src/com/android/cobalt/registry/ |
D | RegistryValidatorTest.java | 128 MetricDefinition metric = MetricDefinition.newBuilder().setMetricType(OCCURRENCE).build(); in testIsValidReportTypeAndPrivacyMechanism_privateFleetwideOccurrenceCounts() local 134 assertThat(RegistryValidator.isValidReportTypeAndPrivacyMechanism(metric, report)).isTrue(); in testIsValidReportTypeAndPrivacyMechanism_privateFleetwideOccurrenceCounts() 139 MetricDefinition metric = MetricDefinition.newBuilder().setMetricType(OCCURRENCE).build(); in tetIsValidReportTypeAndPrivacyMechanism_deIdFleetwideOccurrenceCounts() local 145 assertThat(RegistryValidator.isValidReportTypeAndPrivacyMechanism(metric, report)).isTrue(); in tetIsValidReportTypeAndPrivacyMechanism_deIdFleetwideOccurrenceCounts() 150 MetricDefinition metric = MetricDefinition.newBuilder().setMetricType(STRING).build(); in testIsValidReportTypeAndPrivacyMechanism_deIdStringCounts() local 156 assertThat(RegistryValidator.isValidReportTypeAndPrivacyMechanism(metric, report)).isTrue(); in testIsValidReportTypeAndPrivacyMechanism_deIdStringCounts() 162 MetricDefinition metric = MetricDefinition.newBuilder().setMetricType(OCCURRENCE).build(); in testIsValidReportTypeAndPrivacyMechanism_fleetwideOccurrenceCounts_unsetIntegerBuckets() local 168 assertThat(RegistryValidator.isValidReportTypeAndPrivacyMechanism(metric, report)).isTrue(); in testIsValidReportTypeAndPrivacyMechanism_fleetwideOccurrenceCounts_unsetIntegerBuckets() 171 metric, in testIsValidReportTypeAndPrivacyMechanism_fleetwideOccurrenceCounts_unsetIntegerBuckets() 183 MetricDefinition metric = MetricDefinition.newBuilder().setMetricType(STRING).build(); in testIsValidReportTypeAndPrivacyMechanism_stringCounts_defaultIntegerBuckets() local [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/cobalt/ |
D | CobaltRegistryLoaderTest.java | 64 for (MetricDefinition metric : registry.getMetrics()) { in testGetRegistry_unsupportedFeaturesNotInRegistry() 65 for (ReportDefinition report : metric.getReportsList()) { in testGetRegistry_unsupportedFeaturesNotInRegistry() 66 assertThat(RegistryValidator.isValidReportTypeAndPrivacyMechanism(metric, report)) in testGetRegistry_unsupportedFeaturesNotInRegistry() 96 for (MetricDefinition metric : registry.getMetrics()) { in testGetRegistry_metricDimensions() 97 if (metric.getId() == TOPICS_METRICS_ID) { in testGetRegistry_metricDimensions() 99 .that(metric.getMetricDimensions(TOPIC_DIMENSION_IDX).getEventCodesCount()) in testGetRegistry_metricDimensions() 102 if (metric.getId() == PACKAGE_API_ERRORS_ID) { in testGetRegistry_metricDimensions() 104 .that(metric.getMetricDimensions(API_DIMENSION_IDX).getEventCodesCount()) in testGetRegistry_metricDimensions() 107 .that(metric.getMetricDimensions(ERROR_DIMENSION_IDX).getEventCodesCount()) in testGetRegistry_metricDimensions()
|
/packages/modules/StatsD/statsd/src/metrics/ |
D | GaugeMetricProducer.cpp | 78 const ConfigKey& key, const GaugeMetric& metric, const int conditionIndex, in GaugeMetricProducer() argument 88 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard, in GaugeMetricProducer() 90 /*stateGroupMap=*/{}, getAppUpgradeBucketSplit(metric), 99 mMinBucketSizeNs(metric.min_bucket_size_nanos()), 100 mSamplingType(metric.sampling_type()), 101 mMaxPullDelayNs(metric.max_pull_delay_sec() > 0 ? metric.max_pull_delay_sec() * NS_PER_SEC 105 mGaugeAtomsPerDimensionLimit(metric.max_num_gauge_atoms_per_bucket()), 107 mSamplingPercentage(metric.sampling_percentage()), 108 mPullProbability(metric.pull_probability()) { 112 if (metric.has_bucket()) { [all …]
|
D | CountMetricProducer.cpp | 74 const ConfigKey& key, const CountMetric& metric, const int conditionIndex, in CountMetricProducer() argument 82 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard, in CountMetricProducer() 84 stateGroupMap, getAppUpgradeBucketSplit(metric), configMetadataProvider), in CountMetricProducer() 87 StatsdStats::clampDimensionKeySizeLimit(metric.max_dimensions_per_bucket())) { in CountMetricProducer() 88 if (metric.has_bucket()) { in CountMetricProducer() 90 TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000; in CountMetricProducer() 95 if (metric.has_dimensions_in_what()) { in CountMetricProducer() 96 translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat); in CountMetricProducer() 97 mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what()); in CountMetricProducer() 100 mShouldUseNestedDimensions = ShouldUseNestedDimensions(metric.dimensions_in_what()); in CountMetricProducer() [all …]
|
D | DurationMetricProducer.cpp | 72 const ConfigKey& key, const DurationMetric& metric, const int conditionIndex, in DurationMetricProducer() argument 82 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard, in DurationMetricProducer() 84 stateGroupMap, getAppUpgradeBucketSplit(metric), configMetadataProvider), in DurationMetricProducer() 85 mAggregationType(metric.aggregation_type()), in DurationMetricProducer() 92 StatsdStats::clampDimensionKeySizeLimit(metric.max_dimensions_per_bucket())) { in DurationMetricProducer() 93 if (metric.has_bucket()) { in DurationMetricProducer() 95 TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000; in DurationMetricProducer() 100 if (metric.has_threshold()) { in DurationMetricProducer() 101 mUploadThreshold = metric.threshold(); in DurationMetricProducer() 104 if (metric.has_dimensions_in_what()) { in DurationMetricProducer() [all …]
|
D | EventMetricProducer.cpp | 63 const ConfigKey& key, const EventMetric& metric, const int conditionIndex, in EventMetricProducer() argument 71 : MetricProducer(metric.id(), key, startTimeNs, conditionIndex, initialConditionCache, wizard, in EventMetricProducer() 74 mSamplingPercentage(metric.sampling_percentage()) { in EventMetricProducer() 75 if (metric.links().size() > 0) { in EventMetricProducer() 76 for (const auto& link : metric.links()) { in EventMetricProducer() 118 const EventMetric& metric = config.event_metric(configIndex); in onConfigUpdatedLocked() local 122 metric.what(), mMetricId, metricIndex, false, allAtomMatchingTrackers, in onConfigUpdatedLocked() 128 if (metric.has_condition()) { in onConfigUpdatedLocked() 130 metric.condition(), mMetricId, metricIndex, conditionTrackerMap, metric.links(), in onConfigUpdatedLocked()
|
/packages/modules/RemoteKeyProvisioning/app/src/com/android/rkpdapp/service/ |
D | RegistrationBinder.java | 232 RkpdClientOperation metric = RkpdClientOperation.getKey(mClientUid, in getKeyThreadWorker() local 236 metric.setResult(RkpdClientOperation.Result.SUCCESS); in getKeyThreadWorker() 239 metric.setResult(RkpdClientOperation.Result.CANCELED); in getKeyThreadWorker() 243 final byte mappedError = mapToGetKeyError(e, metric); in getKeyThreadWorker() 254 metric.close(); in getKeyThreadWorker() 262 private byte mapToGetKeyError(RkpdException e, RkpdClientOperation metric) { in mapToGetKeyError() argument 265 metric.setResult(RkpdClientOperation.Result.ERROR_PENDING_INTERNET_CONNECTIVITY); in mapToGetKeyError() 269 metric.setResult(RkpdClientOperation.Result.ERROR_PERMANENT); in mapToGetKeyError() 273 metric.setResult(RkpdClientOperation.Result.ERROR_INTERNAL); in mapToGetKeyError() 289 try (RkpdClientOperation metric = RkpdClientOperation.cancelGetKey(mClientUid, in cancelGetKey() argument [all …]
|
D | RemoteProvisioningService.java | 62 RkpdClientOperation metric = RkpdClientOperation.getRegistration(callerUid, irpcName); in getRegistration() local 63 try (metric) { in getRegistration() argument 66 metric.setResult(RkpdClientOperation.Result.RKP_UNSUPPORTED); in getRegistration() 84 metric.setResult(RkpdClientOperation.Result.ERROR_INVALID_HAL); in getRegistration() 93 metric.setResult(RkpdClientOperation.Result.SUCCESS); in getRegistration() 97 metric.setResult(RkpdClientOperation.Result.ERROR_INTERNAL); in getRegistration()
|
/packages/modules/StatsD/statsd/benchmark/ |
D | duration_metric_benchmark.cpp | 65 auto metric = config.add_duration_metric(); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() local 66 metric->set_bucket(FIVE_MINUTES); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 67 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 68 metric->set_what(scheduledJobPredicate.id()); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 69 metric->set_condition(combinationPredicate->id()); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 70 metric->set_aggregation_type(aggregationType); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 71 auto dimensionWhat = metric->mutable_dimensions_in_what(); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 74 *metric->mutable_dimensions_in_condition() = in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 113 auto metric = config.add_duration_metric(); in CreateDurationMetricConfig_Link_AND_CombinationCondition() local 114 metric->set_bucket(FIVE_MINUTES); in CreateDurationMetricConfig_Link_AND_CombinationCondition() [all …]
|
/packages/modules/AdServices/adservices/libraries/cobalt/tests/src/com/android/cobalt/domain/ |
D | ProjectTest.java | 57 MetricDefinition metric = MetricDefinition.newBuilder().setId(METRIC_ID).build(); in create_populatesIdsAndMetrics_withNonEmptyMetrics() local 59 ProjectConfig.newBuilder().setProjectId(PROJECT_ID).addMetrics(metric).build(); in create_populatesIdsAndMetrics_withNonEmptyMetrics() 69 assertThat(project).isEqualTo(Project.create(CUSTOMER_ID, PROJECT_ID, List.of(metric))); in create_populatesIdsAndMetrics_withNonEmptyMetrics() 92 MetricDefinition metric = MetricDefinition.newBuilder().setId(METRIC_ID).build(); in create_moreThanOneCustomer_throwsIllegalArgumentException() local 94 ProjectConfig.newBuilder().setProjectId(PROJECT_ID).addMetrics(metric).build(); in create_moreThanOneCustomer_throwsIllegalArgumentException() 114 MetricDefinition metric = MetricDefinition.newBuilder().setId(METRIC_ID).build(); in create_moreThanOneProject_throwsIllegalArgumentException() local 116 ProjectConfig.newBuilder().setProjectId(PROJECT_ID).addMetrics(metric).build(); in create_moreThanOneProject_throwsIllegalArgumentException()
|