Home
last modified time | relevance | path

Searched refs:metricId (Results 1 – 25 of 65) sorted by relevance

123

/packages/modules/StatsD/statsd/benchmark/
Ddb_benchmark.cpp30 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/
DDaoBuildingBlocks.java158 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 …]
DReportKey.java49 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/
DDbUtils_test.cpp38 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/
DCobaltLoggerImplTest.java84 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/
DDbUtils.cpp99 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 …]
DDbUtils.h39 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/
DStatsdStats.h37 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 …]
DStatsdStats.cpp815 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/
DMaxDurationTracker_test.cpp43 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 …]
DOringDurationTracker_test.cpp41 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 …]
DGaugeMetricProducer_test.cpp49 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/
DRestrictedConfig_e2e_test.cpp32 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 …]
DValueMetric_pull_e2e_test.cpp34 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/
Dmetrics_manager_util_test.cpp504 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/
DSystemHistogramFactory.java26 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()
DHistogramFactoryInterface.java43 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/
DCobaltLoggerImpl.java80 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/
DStatsPublisher.java260 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/
DConfigMetricsReportListConverter.java95 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/
Dmetrics_manager_util.cpp221 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 …]
Dconfig_update_utils.cpp477 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/
DIncidentdReporter.cpp57 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/
DCobaltLogger.java33 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/
DAnomalyTracker.h72 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);

123