/frameworks/av/drm/libmediadrm/tests/ |
D | EventMetric_test.cpp | 28 EventMetric<int> metric("MyMetricName", "MetricAttributeName"); in TEST() local 32 metric.ExportValues( in TEST() 41 EventMetric<int> metric("MyMetricName", "MetricAttributeName"); in TEST() local 45 metric.Record(4, 7); in TEST() 46 metric.Record(5, 8); in TEST() 47 metric.Record(5, 8); in TEST() 48 metric.Record(5, 8); in TEST() 49 metric.Record(6, 8); in TEST() 50 metric.Record(6, 8); in TEST() 51 metric.Record(6, 8); in TEST() [all …]
|
D | CounterMetric_test.cpp | 30 CounterMetric<int> metric("MyMetricName", "MetricAttributeName"); in TEST_F() local 34 metric.ExportValues( in TEST_F() 43 CounterMetric<int> metric("MyMetricName", "MetricAttributeName"); in TEST_F() local 47 metric.Increment(7); in TEST_F() 48 metric.Increment(8); in TEST_F() 49 metric.Increment(8); in TEST_F() 51 metric.ExportValues( in TEST_F() 62 CounterMetric<std::string> metric("MyMetricName", "MetricAttributeName"); in TEST_F() local 66 metric.Increment("a"); in TEST_F() 67 metric.Increment("b"); in TEST_F() [all …]
|
D | DrmMetrics_test.cpp | 452 PersistableBundle metric; in TEST_F() local 453 ASSERT_TRUE(bundleMetricGroup.getPersistableBundle(String16("open_session_ok"), &metric)); in TEST_F() 455 ASSERT_TRUE(metric.getPersistableBundle(String16("[0]"), &metricInstance)); in TEST_F() 465 &metric)); in TEST_F() 466 ASSERT_TRUE(metric.getPersistableBundle(String16("[0]"), &metricInstance)); in TEST_F()
|
/frameworks/base/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/ |
D | ConfigFactory.java | 107 for (EventMetric metric : mTemplate.getEventMetricList()) { in getConfig() 108 addEventMetric(metric, i, config); in getConfig() 113 for (CountMetric metric : mTemplate.getCountMetricList()) { in getConfig() 114 addCountMetric(metric, i, bucket, config); in getConfig() 119 for (DurationMetric metric : mTemplate.getDurationMetricList()) { in getConfig() 120 addDurationMetric(metric, i, bucket, config); in getConfig() 125 for (GaugeMetric metric : mTemplate.getGaugeMetricList()) { in getConfig() 126 addGaugeMetric(metric, i, bucket, config); in getConfig() 131 for (ValueMetric metric : mTemplate.getValueMetricList()) { in getConfig() 132 addValueMetric(metric, i, bucket, config); in getConfig() [all …]
|
/frameworks/base/cmds/statsd/src/metrics/ |
D | metrics_manager_util.cpp | 308 const CountMetric& metric = config.count_metric(i); in initMetrics() local 309 if (!metric.has_what()) { in initMetrics() 310 ALOGW("cannot find \"what\" in CountMetric \"%lld\"", (long long)metric.id()); in initMetrics() 315 metricMap.insert({metric.id(), metricIndex}); in initMetrics() 317 if (!handleMetricWithLogTrackers(metric.what(), metricIndex, in initMetrics() 318 metric.has_dimensions_in_what(), in initMetrics() 325 if (metric.has_condition()) { in initMetrics() 327 metric.condition(), metricIndex, conditionTrackerMap, metric.links(), in initMetrics() 333 if (metric.links_size() > 0) { in initMetrics() 340 … new CountMetricProducer(key, metric, conditionIndex, wizard, timeBaseTimeNs, currentTimeNs); in initMetrics() [all …]
|
D | CountMetricProducer.cpp | 68 CountMetricProducer::CountMetricProducer(const ConfigKey& key, const CountMetric& metric, in CountMetricProducer() argument 72 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, wizard) { in CountMetricProducer() 73 if (metric.has_bucket()) { in CountMetricProducer() 75 TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000; in CountMetricProducer() 80 if (metric.has_dimensions_in_what()) { in CountMetricProducer() 81 translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat); in CountMetricProducer() 82 mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what()); in CountMetricProducer() 85 mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what()) || in CountMetricProducer() 86 HasPositionALL(metric.dimensions_in_condition()); in CountMetricProducer() 88 if (metric.has_dimensions_in_condition()) { in CountMetricProducer() [all …]
|
D | GaugeMetricProducer.cpp | 70 const ConfigKey& key, const GaugeMetric& metric, const int conditionIndex, in GaugeMetricProducer() argument 75 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, wizard), in GaugeMetricProducer() 83 mMinBucketSizeNs(metric.min_bucket_size_nanos()), in GaugeMetricProducer() 84 mMaxPullDelayNs(metric.max_pull_delay_sec() > 0 ? metric.max_pull_delay_sec() * NS_PER_SEC in GaugeMetricProducer() 94 mGaugeAtomsPerDimensionLimit(metric.max_num_gauge_atoms_per_bucket()), in GaugeMetricProducer() 95 mSplitBucketForAppUpgrade(metric.split_bucket_for_app_upgrade()) { in GaugeMetricProducer() 99 if (metric.has_bucket()) { in GaugeMetricProducer() 100 bucketSizeMills = TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()); in GaugeMetricProducer() 106 mSamplingType = metric.sampling_type(); in GaugeMetricProducer() 107 if (!metric.gauge_fields_filter().include_all()) { in GaugeMetricProducer() [all …]
|
D | MetricsManager.cpp | 132 for (int metric : mMetricIndexesWithActivation) { in MetricsManager() local 133 isActive |= mAllMetricProducers[metric]->isActive(); in MetricsManager() 143 for (const auto& metric : mAllMetricProducers) { in MetricsManager() local 144 if (metric->isActive()) { in MetricsManager() 371 const sp<MetricProducer>& metric = mAllMetricProducers[metricIndex]; in onLogEvent() local 372 metric->flushIfExpire(eventTimeNs); in onLogEvent() 373 if (metric->isActive()) { in onLogEvent() 409 const sp<MetricProducer>& metric = mAllMetricProducers[metricIndex]; in onLogEvent() local 410 metric->flushIfExpire(eventTimeNs); in onLogEvent() 411 if (!metric->isActive()) { in onLogEvent() [all …]
|
D | ValueMetricProducer.cpp | 77 const ConfigKey& key, const ValueMetric& metric, const int conditionIndex, in ValueMetricProducer() argument 81 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, conditionWizard), in ValueMetricProducer() 87 mMinBucketSizeNs(metric.min_bucket_size_nanos()), in ValueMetricProducer() 96 mUseAbsoluteValueOnReset(metric.use_absolute_value_on_reset()), in ValueMetricProducer() 97 mAggregationType(metric.aggregation_type()), in ValueMetricProducer() 98 mUseDiff(metric.has_use_diff() ? metric.use_diff() : (mIsPulled ? true : false)), in ValueMetricProducer() 99 mValueDirection(metric.value_direction()), in ValueMetricProducer() 100 mSkipZeroDiffOutput(metric.skip_zero_diff_output()), in ValueMetricProducer() 101 mUseZeroDefaultBase(metric.use_zero_default_base()), in ValueMetricProducer() 104 mMaxPullDelayNs(metric.max_pull_delay_sec() > 0 ? metric.max_pull_delay_sec() * NS_PER_SEC in ValueMetricProducer() [all …]
|
D | EventMetricProducer.cpp | 54 EventMetricProducer::EventMetricProducer(const ConfigKey& key, const EventMetric& metric, in EventMetricProducer() argument 58 : MetricProducer(metric.id(), key, startTimeNs, conditionIndex, wizard) { in EventMetricProducer() 59 if (metric.links().size() > 0) { in EventMetricProducer() 60 for (const auto& link : metric.links()) { in EventMetricProducer() 70 VLOG("metric %lld created. bucket size %lld start_time: %lld", (long long)metric.id(), in EventMetricProducer()
|
D | DurationMetricProducer.cpp | 66 DurationMetricProducer::DurationMetricProducer(const ConfigKey& key, const DurationMetric& metric, in DurationMetricProducer() argument 73 : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, wizard), in DurationMetricProducer() 74 mAggregationType(metric.aggregation_type()), in DurationMetricProducer() 80 if (metric.has_bucket()) { in DurationMetricProducer() 82 TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000; in DurationMetricProducer() 87 if (metric.has_dimensions_in_what()) { in DurationMetricProducer() 88 translateFieldMatcher(metric.dimensions_in_what(), &mDimensionsInWhat); in DurationMetricProducer() 89 mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what()); in DurationMetricProducer() 103 if (metric.has_dimensions_in_condition()) { in DurationMetricProducer() 104 translateFieldMatcher(metric.dimensions_in_condition(), &mDimensionsInCondition); in DurationMetricProducer() [all …]
|
/frameworks/base/cmds/statsd/tests/metrics/ |
D | DurationMetricProducer_test.cpp | 44 DurationMetric metric; in TEST() local 45 metric.set_id(1); in TEST() 46 metric.set_bucket(ONE_MINUTE); in TEST() 47 metric.set_aggregation_type(DurationMetric_AggregationType_SUM); in TEST() 51 kConfigKey, metric, -1 /*no condition*/, 1 /* start index */, 2 /* stop index */, in TEST() 64 DurationMetric metric; in TEST() local 65 metric.set_id(1); in TEST() 66 metric.set_bucket(ONE_MINUTE); in TEST() 67 metric.set_aggregation_type(DurationMetric_AggregationType_SUM); in TEST() 77 kConfigKey, metric, -1 /*no condition*/, 1 /* start index */, 2 /* stop index */, in TEST() [all …]
|
D | GaugeMetricProducer_test.cpp | 57 GaugeMetric metric; in TEST() local 58 metric.set_id(metricId); in TEST() 59 metric.set_bucket(ONE_MINUTE); in TEST() 60 metric.mutable_gauge_fields_filter()->set_include_all(false); in TEST() 61 auto gaugeFieldMatcher = metric.mutable_gauge_fields_filter()->mutable_fields(); in TEST() 78 GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard, in TEST() 91 GaugeMetric metric; in TEST() local 92 metric.set_id(metricId); in TEST() 93 metric.set_bucket(ONE_MINUTE); in TEST() 94 metric.mutable_gauge_fields_filter()->set_include_all(false); in TEST() [all …]
|
D | EventMetricProducer_test.cpp | 43 EventMetric metric; in TEST() local 44 metric.set_id(1); in TEST() 51 EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard, in TEST() 66 EventMetric metric; in TEST() local 67 metric.set_id(1); in TEST() 68 metric.set_condition(StringToId("SCREEN_ON")); in TEST() 75 EventMetricProducer eventProducer(kConfigKey, metric, 1, wizard, bucketStartTimeNs); in TEST() 95 EventMetric metric; in TEST() local 96 metric.set_id(1); in TEST() 97 metric.set_condition(StringToId("APP_IN_BACKGROUND_PER_UID_AND_SCREEN_ON")); in TEST() [all …]
|
D | CountMetricProducer_test.cpp | 41 CountMetric metric; in TEST() local 42 metric.set_id(1); in TEST() 43 metric.set_bucket(ONE_MINUTE); in TEST() 46 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard, in TEST() 60 CountMetric metric; in TEST() local 61 metric.set_id(1); in TEST() 62 metric.set_bucket(ONE_MINUTE); in TEST() 71 CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard, in TEST() 121 CountMetric metric; in TEST() local 122 metric.set_id(1); in TEST() [all …]
|
D | ValueMetricProducer_test.cpp | 93 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric) { in createValueProducerNoConditions() argument 105 kConfigKey, metric, -1 /*-1 meaning no condition*/, wizard, in createValueProducerNoConditions() 113 sp<MockStatsPullerManager>& pullerManager, ValueMetric& metric) { in createValueProducerWithCondition() argument 125 new ValueMetricProducer(kConfigKey, metric, 1, wizard, logEventMatcherIndex, in createValueProducerWithCondition() 134 ValueMetric metric; in createMetric() local 135 metric.set_id(metricId); in createMetric() 136 metric.set_bucket(ONE_MINUTE); in createMetric() 137 metric.mutable_value_field()->set_field(tagId); in createMetric() 138 metric.mutable_value_field()->add_child()->set_field(2); in createMetric() 139 metric.set_max_pull_delay_sec(INT_MAX); in createMetric() [all …]
|
/frameworks/base/cmds/statsd/benchmark/ |
D | duration_metric_benchmark.cpp | 64 auto metric = config.add_duration_metric(); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() local 65 metric->set_bucket(FIVE_MINUTES); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 66 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 67 metric->set_what(scheduledJobPredicate.id()); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 68 metric->set_condition(combinationPredicate->id()); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 69 metric->set_aggregation_type(aggregationType); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 70 auto dimensionWhat = metric->mutable_dimensions_in_what(); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 73 *metric->mutable_dimensions_in_condition() = CreateAttributionUidAndTagDimensions( 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 …]
|
/frameworks/base/cmds/statsd/tests/ |
D | MetricsManager_test.cpp | 78 CountMetric* metric = config.add_count_metric(); in buildGoodConfig() local 79 metric->set_id(3); in buildGoodConfig() 80 metric->set_what(StringToId("SCREEN_IS_ON")); in buildGoodConfig() 81 metric->set_bucket(ONE_MINUTE); in buildGoodConfig() 82 metric->mutable_dimensions_in_what()->set_field(2 /*SCREEN_STATE_CHANGE*/); in buildGoodConfig() 83 metric->mutable_dimensions_in_what()->add_child()->set_field(1); in buildGoodConfig() 129 CountMetric* metric = config.add_count_metric(); in buildAlertWithUnknownMetric() local 130 metric->set_id(3); in buildAlertWithUnknownMetric() 131 metric->set_what(StringToId("SCREEN_IS_ON")); in buildAlertWithUnknownMetric() 132 metric->set_bucket(ONE_MINUTE); in buildAlertWithUnknownMetric() [all …]
|
/frameworks/av/drm/libmediadrm/ |
D | DrmMetrics.cpp | 325 DrmFrameworkMetrics::DistributionMetric *metric = in GetSerializedMetrics() local 327 metric->set_min(stats.min); in GetSerializedMetrics() 328 metric->set_max(stats.max); in GetSerializedMetrics() 329 metric->set_mean(stats.mean); in GetSerializedMetrics() 330 metric->set_operation_count(stats.count); in GetSerializedMetrics() 331 metric->set_variance(stats.sum_squared_deviation / stats.count); in GetSerializedMetrics() 332 metric->mutable_attributes()->set_error_code(status); in GetSerializedMetrics() 337 DrmFrameworkMetrics::DistributionMetric *metric = in GetSerializedMetrics() local 339 metric->set_min(stats.min); in GetSerializedMetrics() 340 metric->set_max(stats.max); in GetSerializedMetrics() [all …]
|
/frameworks/base/cmds/statsd/tests/e2e/ |
D | DimensionInCondition_e2e_combination_OR_cond_test.cpp | 57 auto metric = config.add_count_metric(); in CreateCountMetric_NoLink_CombinationCondition_Config() local 58 metric->set_id(StringToId("ScreenBrightnessChangeMetric")); in CreateCountMetric_NoLink_CombinationCondition_Config() 59 metric->set_what(screenBrightnessChangeAtomMatcher.id()); in CreateCountMetric_NoLink_CombinationCondition_Config() 60 metric->set_condition(combinationPredicate->id()); in CreateCountMetric_NoLink_CombinationCondition_Config() 61 *metric->mutable_dimensions_in_what() = in CreateCountMetric_NoLink_CombinationCondition_Config() 63 *metric->mutable_dimensions_in_condition() = CreateAttributionUidDimensions( in CreateCountMetric_NoLink_CombinationCondition_Config() 65 metric->set_bucket(FIVE_MINUTES); in CreateCountMetric_NoLink_CombinationCondition_Config() 260 auto metric = config.add_count_metric(); in CreateCountMetric_Link_CombinationCondition() local 261 metric->set_bucket(FIVE_MINUTES); in CreateCountMetric_Link_CombinationCondition() 262 metric->set_id(StringToId("AppCrashMetric")); in CreateCountMetric_Link_CombinationCondition() [all …]
|
D | DimensionInCondition_e2e_simple_cond_test.cpp | 56 auto metric = config.add_duration_metric(); in CreateDurationMetricConfig_NoLink_SimpleCondition() local 57 metric->set_bucket(FIVE_MINUTES); in CreateDurationMetricConfig_NoLink_SimpleCondition() 58 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_SimpleCondition() 59 metric->set_what(scheduledJobPredicate.id()); in CreateDurationMetricConfig_NoLink_SimpleCondition() 60 metric->set_condition(isSyncingPredicate.id()); in CreateDurationMetricConfig_NoLink_SimpleCondition() 61 metric->set_aggregation_type(aggregationType); in CreateDurationMetricConfig_NoLink_SimpleCondition() 62 auto dimensionWhat = metric->mutable_dimensions_in_what(); in CreateDurationMetricConfig_NoLink_SimpleCondition() 65 *metric->mutable_dimensions_in_condition() = CreateAttributionUidAndTagDimensions( in CreateDurationMetricConfig_NoLink_SimpleCondition() 337 auto metric = config.add_duration_metric(); in createDurationMetric_Link_SimpleConditionConfig() local 338 metric->set_bucket(FIVE_MINUTES); in createDurationMetric_Link_SimpleConditionConfig() [all …]
|
D | DimensionInCondition_e2e_combination_AND_cond_test.cpp | 68 auto metric = config.add_duration_metric(); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() local 69 metric->set_bucket(FIVE_MINUTES); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 70 metric->set_id(StringToId("scheduledJob")); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 71 metric->set_what(scheduledJobPredicate.id()); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 72 metric->set_condition(combinationPredicate->id()); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 73 metric->set_aggregation_type(aggregationType); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 74 auto dimensionWhat = metric->mutable_dimensions_in_what(); in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 77 *metric->mutable_dimensions_in_condition() = CreateAttributionUidAndTagDimensions( in CreateDurationMetricConfig_NoLink_AND_CombinationCondition() 433 auto metric = config.add_duration_metric(); in CreateDurationMetricConfig_Link_AND_CombinationCondition() local 434 metric->set_bucket(FIVE_MINUTES); in CreateDurationMetricConfig_Link_AND_CombinationCondition() [all …]
|
/frameworks/base/tests/GamePerformance/src/android/gameperformance/ |
D | GamePerformanceTest.java | 78 for (Map.Entry<String, Double> metric : metrics.entrySet()) { in testGraphicBufferMetrics() 79 status.putDouble(metric.getKey(), metric.getValue()); in testGraphicBufferMetrics()
|
/frameworks/base/cmds/statsd/src/ |
D | active_config_list.proto | 34 // This metric should activate for remaining_ttl_nanos when we load the activations. 36 // When we load the activations, this metric should activate on next boot for the tll 51 repeated ActiveMetric metric = 3; field
|
/frameworks/av/media/libmedia/include/media/ |
D | EventMetric.h | 149 explicit EventTimer(EventMetric<AttributeType>* metric) in EventTimer() argument 150 :start_time_(systemTime()), metric_(metric) { in EventTimer()
|