/packages/modules/StatsD/statsd/benchmark/ |
D | db_benchmark.cpp | 30 int64_t metricId = 0; in BM_insertAtomsIntoDbTablesNewConnection() local 41 for (int metricId = 0; metricId < state.range(0); ++metricId) { in BM_insertAtomsIntoDbTablesNewConnection() local 44 createTableIfNeeded(key, metricId, *event.get()); in BM_insertAtomsIntoDbTablesNewConnection() 46 insert(key, metricId, logEvents, err); in BM_insertAtomsIntoDbTablesNewConnection() 62 int64_t metricId = 0; in BM_insertAtomsIntoDbTablesReuseConnection() local 74 for (int metricId = 0; metricId < state.range(0); ++metricId) { in BM_insertAtomsIntoDbTablesReuseConnection() local 76 deleteTable(key, metricId); in BM_insertAtomsIntoDbTablesReuseConnection() 77 createTableIfNeeded(key, metricId, *event.get()); in BM_insertAtomsIntoDbTablesReuseConnection() 79 insert(key, metricId, logEvents, err); in BM_insertAtomsIntoDbTablesReuseConnection() 96 int64_t metricId = 0; in BM_createDbTables() local [all …]
|
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/data/ |
D | DaoBuildingBlocks.java | 158 reportKey.metricId(), in updateAggregateValue() 191 long metricId, in updateAggregateValue() argument 223 long metricId, in updateSystemProfileHash() argument 257 long metricId, in updateSystemProfileHashAndAggregateValue() argument 296 reportKey.metricId(), in queryOneSystemProfileAndAggregateValue() 332 long metricId, in queryOneSystemProfileAndAggregateValue() argument 351 reportKey.metricId(), in queryCountEventVectors() 395 long metricId, in queryStringListIndex() argument 417 reportKey.metricId(), in queryStringListIndex() 447 long customerId, long projectId, long metricId, long reportId, int dayIndex); in queryStringHashList() argument [all …]
|
D | ReportKey.java | 49 public abstract long metricId(); in metricId() method in ReportKey 63 public static ReportKey create(long customerId, long projectId, long metricId, long reportId) { in create() argument 64 return new AutoValue_ReportKey(customerId, projectId, metricId, reportId); in create()
|
/packages/modules/StatsD/statsd/tests/utils/ |
D | DbUtils_test.cpp | 38 const int64_t metricId = 111; variable 78 EXPECT_TRUE(createTableIfNeeded(key, metricId, logEvent)); in TEST_F() 80 EXPECT_TRUE(insert(key, metricId, events, err)); in TEST_F() 104 EXPECT_TRUE(createTableIfNeeded(key, metricId, logEvent)); in TEST_F() 106 EXPECT_TRUE(insert(key, metricId, events, err)); in TEST_F() 159 EXPECT_TRUE(createTableIfNeeded(key, metricId, logEvent)); in TEST_F() 161 EXPECT_TRUE(insert(key, metricId, events, err)); in TEST_F() 185 EXPECT_TRUE(createTableIfNeeded(key, metricId, logEvent)); in TEST_F() 187 EXPECT_TRUE(insert(key, metricId, events, err)); in TEST_F() 217 EXPECT_TRUE(createTableIfNeeded(key, metricId, logEvent1)); in TEST_F() [all …]
|
/packages/modules/AdServices/adservices/libraries/cobalt/tests/src/com/android/cobalt/impl/ |
D | CobaltLoggerImplTest.java | 84 MULTIPLE_REPORTS_1.metricId(), 98 .setId((int) ONE_REPORT.metricId()) 109 .setId((int) MULTIPLE_REPORTS_1.metricId()) 125 .setId((int) STRING_REPORT.metricId()) 136 .setId((int) MULTIPLE_STRING_REPORTS_1.metricId()) 202 ONE_REPORT.metricId(), in logOccurrence_oneLog_storedInDb() 224 ONE_REPORT.metricId(), in logOccurrence_multipleLogCalls_aggregatedInDb() 229 ONE_REPORT.metricId(), in logOccurrence_multipleLogCalls_aggregatedInDb() 234 ONE_REPORT.metricId(), in logOccurrence_multipleLogCalls_aggregatedInDb() 264 MULTIPLE_REPORTS_1.metricId(), in logOccurrence_multipleReports_storedInDb() [all …]
|
/packages/modules/StatsD/statsd/src/utils/ |
D | DbUtils.cpp | 99 static string getCreateSqlString(const int64_t metricId, const LogEvent& event) { in getCreateSqlString() argument 101 reformatMetricId(metricId).c_str()); in getCreateSqlString() 132 string reformatMetricId(const int64_t metricId) { in reformatMetricId() argument 133 return metricId < 0 ? StringPrintf("n%lld", (long long)metricId * -1) in reformatMetricId() 134 : StringPrintf("%lld", (long long)metricId); in reformatMetricId() 137 bool createTableIfNeeded(const ConfigKey& key, const int64_t metricId, const LogEvent& event) { in createTableIfNeeded() argument 146 string zSql = getCreateSqlString(metricId, event); in createTableIfNeeded() 156 bool isEventCompatible(const ConfigKey& key, const int64_t metricId, const LogEvent& event) { in isEventCompatible() argument 163 string zSql = StringPrintf("PRAGMA table_info(metric_%s);", reformatMetricId(metricId).c_str()); in isEventCompatible() 169 ALOGE("Failed to check table schema for metric %lld: %s", (long long)metricId, err.c_str()); in isEventCompatible() [all …]
|
D | DbUtils.h | 39 string reformatMetricId(const int64_t metricId); 42 bool createTableIfNeeded(const ConfigKey& key, int64_t metricId, const LogEvent& event); 47 bool isEventCompatible(const ConfigKey& key, int64_t metricId, const LogEvent& event); 50 bool deleteTable(const ConfigKey& key, int64_t metricId); 66 bool insert(const ConfigKey& key, int64_t metricId, const vector<LogEvent>& events, string& error); 69 bool insert(sqlite3* db, int64_t metricId, const vector<LogEvent>& events, string& error); 77 bool flushTtl(sqlite3* db, int64_t metricId, int64_t ttlWallClockNs);
|
/packages/modules/StatsD/statsd/src/guardrail/ |
D | StatsdStats.h | 37 std::optional<int64_t> metricId; member 46 InvalidConfigReason(InvalidConfigReasonEnum reason, int64_t metricId) in InvalidConfigReason() 47 : reason(reason), metricId(metricId){}; in InvalidConfigReason() 49 return (this->reason == other.reason) && (this->metricId == other.metricId) && 581 void noteHardDimensionLimitReached(int64_t metricId); 586 void noteLateLogEventSkipped(int64_t metricId); 591 void noteSkippedForwardBuckets(int64_t metricId); 596 void noteBadValueType(int64_t metricId); 601 void noteBucketDropped(int64_t metricId); 606 void noteConditionChangeInNextBucket(int64_t metricId); [all …]
|
D | StatsdStats.cpp | 815 void StatsdStats::noteHardDimensionLimitReached(int64_t metricId) { in noteHardDimensionLimitReached() argument 817 getAtomMetricStats(metricId).hardDimensionLimitReached++; in noteHardDimensionLimitReached() 820 void StatsdStats::noteLateLogEventSkipped(int64_t metricId) { in noteLateLogEventSkipped() argument 822 getAtomMetricStats(metricId).lateLogEventSkipped++; in noteLateLogEventSkipped() 825 void StatsdStats::noteSkippedForwardBuckets(int64_t metricId) { in noteSkippedForwardBuckets() argument 827 getAtomMetricStats(metricId).skippedForwardBuckets++; in noteSkippedForwardBuckets() 830 void StatsdStats::noteBadValueType(int64_t metricId) { in noteBadValueType() argument 832 getAtomMetricStats(metricId).badValueType++; in noteBadValueType() 835 void StatsdStats::noteBucketDropped(int64_t metricId) { in noteBucketDropped() argument 837 getAtomMetricStats(metricId).bucketDropped++; in noteBucketDropped() [all …]
|
/packages/modules/StatsD/statsd/tests/metrics/ |
D | MaxDurationTracker_test.cpp | 43 const int64_t metricId = 123; variable 66 int64_t metricId = 1; in TEST() local 67 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 103 int64_t metricId = 1; in TEST() local 104 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 139 int64_t metricId = 1; in TEST() local 140 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, false, bucketStartTimeNs, in TEST() 179 int64_t metricId = 1; in TEST() local 180 MaxDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, -1, true, bucketStartTimeNs, in TEST() 226 int64_t metricId = 1; in TEST() local [all …]
|
D | OringDurationTracker_test.cpp | 41 const int64_t metricId = 123; variable 65 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 98 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 131 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 162 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 207 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 247 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, false, in TEST() 286 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 328 OringDurationTracker tracker(kConfigKey, metricId, eventKey, wizard, 1, true, bucketStartTimeNs, in TEST() 393 OringDurationTracker tracker(kConfigKey, metricId, DEFAULT_METRIC_DIMENSION_KEY, wizard, 1, in TEST() [all …]
|
D | GaugeMetricProducer_test.cpp | 49 const int64_t metricId = 123; variable 87 metric.set_id(metricId); in TEST() 118 metric.set_id(metricId); in TEST() 218 metric.set_id(metricId); in TEST_P() 225 alert.set_metric_id(metricId); in TEST_P() 305 metric.set_id(metricId); in TEST_P() 383 metric.set_id(metricId); in TEST() 432 metric.set_id(metricId); in TEST() 585 metric.set_id(metricId); in TEST() 605 alert.set_metric_id(metricId); in TEST() [all …]
|
/packages/modules/StatsD/statsd/tests/e2e/ |
D | RestrictedConfig_e2e_test.cpp | 32 int64_t metricId; variable 41 metricId = eventMetric.id(); in CreateConfigWithOneMetric() 51 metricId = eventMetric.id(); in CreateConfigWithTwoMetrics() 131 void verifyRestrictedData(int32_t expectedNumOfMetrics, int64_t metricIdToVerify = metricId, in verifyRestrictedData() 252 query << "SELECT * FROM metric_" << dbutils::reformatMetricId(metricId); in TEST_F() 267 verifyRestrictedData(logEvents.size(), metricId, true); in TEST_F() 295 EXPECT_THAT(receivedMetricIds, UnorderedElementsAre(metricId)); in TEST_F() 302 EXPECT_THAT(receivedMetricIds, UnorderedElementsAre(metricId, anotherMetricId)); in TEST_F() 318 EXPECT_THAT(receivedMetricIds, UnorderedElementsAre(metricId)); in TEST_F() 338 EXPECT_THAT(returnedMetricIds, UnorderedElementsAre(metricId, anotherMetricId)); in TEST_F() [all …]
|
D | ValueMetric_pull_e2e_test.cpp | 34 const int64_t metricId = 123456; variable 49 valueMetric->set_id(metricId); in CreateStatsdConfig() 105 valueMetric1->set_id(metricId); in CreateStatsdConfigWithStates() 461 metric_activation->set_metric_id(metricId); in TEST() 663 int64_t metricId = 123456; in TEST() local 665 valueMetric->set_id(metricId); in TEST() 716 int64_t metricId = 123456; in TEST() local 718 valueMetric->set_id(metricId); in TEST() 775 int64_t metricId = 123456; in TEST() local 777 valueMetric->set_id(metricId); in TEST() [all …]
|
/packages/modules/StatsD/statsd/tests/metrics/parsing_utils/ |
D | metrics_manager_util_test.cpp | 504 int64_t metricId = 1; in TEST_F() local 506 metric_activation1->set_metric_id(metricId); in TEST_F() 509 metric_activation2->set_metric_id(metricId); in TEST_F() 513 InvalidConfigReason(INVALID_CONFIG_REASON_METRIC_HAS_MULTIPLE_ACTIVATIONS, metricId)); in TEST_F() 518 int64_t metricId = 1; in TEST_F() local 520 metric->set_id(metricId); in TEST_F() 523 InvalidConfigReason(INVALID_CONFIG_REASON_METRIC_MISSING_ID_OR_WHAT, metricId)); in TEST_F() 543 int64_t metricId = 1; in TEST_F() local 545 metric->set_id(metricId); in TEST_F() 548 InvalidConfigReason(INVALID_CONFIG_REASON_METRIC_MISSING_ID_OR_WHAT, metricId)); in TEST_F() [all …]
|
/packages/services/Car/service/src/com/android/car/logging/ |
D | SystemHistogramFactory.java | 26 public Histogram newUniformHistogram(String metricId, int binCount, in newUniformHistogram() argument 28 return new Histogram(metricId, new Histogram.UniformOptions( in newUniformHistogram() 33 public Histogram newScaledRangeHistogram(String metricId, int binCount, in newScaledRangeHistogram() argument 35 return new Histogram(metricId, new Histogram.ScaledRangeOptions( in newScaledRangeHistogram()
|
D | HistogramFactoryInterface.java | 43 Histogram newUniformHistogram(String metricId, @IntRange(from = 1) int binCount, in newUniformHistogram() argument 59 Histogram newScaledRangeHistogram(String metricId, @IntRange(from = 1) int binCount, in newScaledRangeHistogram() argument
|
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/impl/ |
D | CobaltLoggerImpl.java | 80 long metricId, long count, List<Integer> eventCodes) { in logOccurrence() argument 95 MetricType.OCCURRENCE, metricId, eventCodes); in logOccurrence() 107 long metricId, String stringValue, List<Integer> eventCodes) { in logString() argument 120 validateEventAndGetMetric(MetricType.STRING, metricId, eventCodes), in logString() 167 private Void recordFailureAndRethrow(long metricId, RuntimeException x) { in recordFailureAndRethrow() argument 174 metricId), in recordFailureAndRethrow() 263 MetricType metricType, long metricId, List<Integer> eventCodes) { in validateEventAndGetMetric() argument 270 if (metric.getId() == metricId) { in validateEventAndGetMetric() 276 checkArgument(foundMetric != null, "failed to find metric with ID: %s", metricId); in validateEventAndGetMetric()
|
/packages/services/Car/service/src/com/android/car/telemetry/publisher/ |
D | StatsPublisher.java | 260 Long metricId; in processReport() local 263 metricId = APP_START_MEMORY_STATE_CAPTURED_EVENT_METRIC_ID; in processReport() 266 metricId = PROCESS_MEMORY_STATE_GAUGE_METRIC_ID; in processReport() 269 metricId = ACTIVITY_FOREGROUND_STATE_CHANGED_EVENT_METRIC_ID; in processReport() 272 metricId = PROCESS_CPU_TIME_GAUGE_METRIC_ID; in processReport() 275 metricId = APP_CRASH_OCCURRED_EVENT_METRIC_ID; in processReport() 278 metricId = ANR_OCCURRED_EVENT_METRIC_ID; in processReport() 281 metricId = WTF_OCCURRED_EVENT_METRIC_ID; in processReport() 284 metricId = PROCESS_MEMORY_SNAPSHOT_GAUGE_METRIC_ID; in processReport() 287 metricId = PROCESS_START_TIME_EVENT_METRIC_ID; in processReport() [all …]
|
/packages/services/Car/service/src/com/android/car/telemetry/publisher/statsconverters/ |
D | ConfigMetricsReportListConverter.java | 95 Long metricId = statsReport.getMetricId(); in convert() local 96 if (!metricsStatsReportMap.containsKey(metricId)) { in convert() 98 metricId, new ArrayList<StatsLogProto.StatsLogReport>()); in convert() 100 metricsStatsReportMap.get(metricId).add(statsReport); in convert()
|
/packages/modules/StatsD/statsd/src/metrics/parsing_utils/ |
D | metrics_manager_util.cpp | 221 const int64_t matcherId, const int64_t metricId, const int metricIndex, in handleMetricWithAtomMatchingTrackers() argument 229 metricId, matcherId); in handleMetricWithAtomMatchingTrackers() 237 INVALID_CONFIG_REASON_METRIC_MATCHER_MORE_THAN_ONE_ATOM, metricId, matcherId); in handleMetricWithAtomMatchingTrackers() 246 const int64_t condition, const int64_t metricId, const int metricIndex, in handleMetricWithConditions() argument 255 INVALID_CONFIG_REASON_METRIC_CONDITION_NOT_FOUND, metricId, condition); in handleMetricWithConditions() 262 INVALID_CONFIG_REASON_METRIC_CONDITION_LINK_NOT_FOUND, metricId, in handleMetricWithConditions() 287 const StatsdConfig& config, const int64_t metricId, in handleMetricWithStates() argument 298 metricId, stateId); in handleMetricWithStates() 311 optional<InvalidConfigReason> handleMetricWithStateLink(const int64_t metricId, in handleMetricWithStateLink() argument 318 metricId); in handleMetricWithStateLink() [all …]
|
D | config_update_utils.cpp | 477 const int64_t metricId, const set<int64_t>& replacedMatchers) { in metricActivationDepsChange() argument 478 const auto& metricActivationIt = metricToActivationMap.find(metricId); in metricActivationDepsChange() 499 const StatsdConfig& config, const MessageLite& metric, const int64_t metricId, in determineMetricUpdateStatus() argument 510 const auto& oldMetricProducerIt = oldMetricProducerMap.find(metricId); in determineMetricUpdateStatus() 519 getMetricProtoHash(config, metric, metricId, metricToActivationMap, metricHash); in determineMetricUpdateStatus() 562 if (metricActivationDepsChange(config, metricToActivationMap, metricId, replacedMatchers)) { in determineMetricUpdateStatus() 682 const int64_t metricId, const vector<sp<AtomMatchingTracker>>& allAtomMatchingTrackers, in updateMetric() argument 696 const auto& oldMetricProducerIt = oldMetricProducerMap.find(metricId); in updateMetric() 700 (long long)metricId); in updateMetric() 702 InvalidConfigReason(INVALID_CONFIG_REASON_METRIC_NOT_IN_PREV_CONFIG, metricId); in updateMetric() [all …]
|
/packages/modules/StatsD/statsd/src/subscriber/ |
D | IncidentdReporter.cpp | 57 void getProtoData(const int64_t& rule_id, int64_t metricId, const MetricDimensionKey& dimensionKey, in getProtoData() argument 76 headerProto.write(FIELD_TYPE_INT64 | FIELD_ID_METRIC_VALUE_METRIC_ID, (long long)metricId); in getProtoData() 126 bool GenerateIncidentReport(const IncidentdDetails& config, int64_t rule_id, int64_t metricId, in GenerateIncidentReport() argument 138 getProtoData(rule_id, metricId, dimensionKey, metricValue, configKey, in GenerateIncidentReport()
|
/packages/modules/AdServices/adservices/libraries/cobalt/java/com/android/cobalt/ |
D | CobaltLogger.java | 33 ListenableFuture<Void> logOccurrence(long metricId, long count, List<Integer> eventVector); in logOccurrence() argument 43 ListenableFuture<Void> logString(long metricId, String stringValue, List<Integer> eventVector); in logString() argument
|
/packages/modules/StatsD/statsd/src/anomaly/ |
D | AnomalyTracker.h | 72 void declareAnomaly(int64_t timestampNs, int64_t metricId, const MetricDimensionKey& key, 79 void detectAndDeclareAnomaly(int64_t timestampNs, int64_t currBucketNum, int64_t metricId, 214 void informSubscribers(const MetricDimensionKey& key, int64_t metricId, int64_t metricValue);
|