/packages/modules/StatsD/lib/libstatssocket/tests/ |
D | stats_event_test.cpp | 98 uint32_t atomId, uint8_t numAtomLevelAnnotations = 0) { in checkMetadata() argument 114 checkScalar(buffer, atomId); in checkMetadata() 118 uint32_t atomId = 100; in TEST() local 126 AStatsEvent_setAtomId(event, atomId); in TEST() 138 checkMetadata(&buffer, /*numElements=*/4, startTime, endTime, atomId); in TEST() 162 uint32_t atomId = 100; in TEST() local 167 AStatsEvent_setAtomId(event, atomId); in TEST() 176 checkMetadata(&buffer, /*numElements=*/1, startTime, endTime, atomId); in TEST() 187 uint32_t atomId = 100; in TEST() local 192 AStatsEvent_setAtomId(event, atomId); in TEST() [all …]
|
/packages/modules/StatsD/statsd/src/state/ |
D | StateManager.cpp | 55 void StateManager::registerListener(const int32_t atomId, wp<StateListener> listener) { in registerListener() argument 57 if (mStateTrackers.find(atomId) == mStateTrackers.end()) { in registerListener() 58 mStateTrackers[atomId] = new StateTracker(atomId); in registerListener() 60 mStateTrackers[atomId]->registerListener(listener); in registerListener() 63 void StateManager::unregisterListener(const int32_t atomId, wp<StateListener> listener) { in unregisterListener() argument 71 auto it = mStateTrackers.find(atomId); in unregisterListener() 82 atomId); in unregisterListener() 87 bool StateManager::getStateValue(const int32_t atomId, const HashableDimensionKey& key, in getStateValue() argument 89 auto it = mStateTrackers.find(atomId); in getStateValue()
|
D | StateManager.h | 57 void registerListener(const int32_t atomId, wp<StateListener> listener); 61 void unregisterListener(const int32_t atomId, wp<StateListener> listener); 67 bool getStateValue(const int32_t atomId, const HashableDimensionKey& queryKey, 79 inline int getListenersCount(const int32_t atomId) const { in getListenersCount() argument 80 auto it = mStateTrackers.find(atomId); in getListenersCount()
|
/packages/modules/StatsD/statsd/tests/ |
D | statsd_test_util.h | 72 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId); 195 FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields); 198 FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId, 202 FieldMatcher CreateAttributionUidDimensions(const int atomId, 205 FieldMatcher CreateAttributionUidAndOtherDimensions(const int atomId, 253 shared_ptr<LogEvent> CreateTwoValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1, 256 void CreateTwoValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1, 259 shared_ptr<LogEvent> CreateThreeValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1, 262 void CreateThreeValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1, 268 std::shared_ptr<LogEvent> CreateRepeatedValueLogEvent(int atomId, int64_t eventTimeNs, [all …]
|
D | statsd_test_util.cpp | 48 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId) { in CreateSimpleAtomMatcher() argument 52 simple_atom_matcher->set_atom_id(atomId); in CreateSimpleAtomMatcher() 406 FieldMatcher CreateAttributionUidDimensions(const int atomId, in CreateAttributionUidDimensions() argument 409 dimensions.set_field(atomId); in CreateAttributionUidDimensions() 419 FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId, in CreateAttributionUidAndTagDimensions() argument 422 dimensions.set_field(atomId); in CreateAttributionUidAndTagDimensions() 433 FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields) { in CreateDimensions() argument 435 dimensions.set_field(atomId); in CreateDimensions() 442 FieldMatcher CreateAttributionUidAndOtherDimensions(const int atomId, in CreateAttributionUidAndOtherDimensions() argument 445 FieldMatcher dimensions = CreateAttributionUidDimensions(atomId, positions); in CreateAttributionUidAndOtherDimensions() [all …]
|
D | FieldValue_test.cpp | 37 void makeLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeLogEvent() argument 41 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 50 void makeLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeLogEvent() argument 54 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 314 int atomId = 10; in TEST() local 322 Field field1(atomId, pos1, /*depth=*/2); in TEST() 323 Field field2(atomId, pos2, /*depth=*/2); in TEST() 324 Field field3(atomId, pos3, /*depth=*/2); in TEST() 325 Field field4(atomId, pos4, /*depth=*/2); in TEST() 326 Field field5(atomId, pos5, /*depth=*/0); in TEST() [all …]
|
D | LogEntryMatcher_test.cpp | 44 void makeIntLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeIntLogEvent() argument 47 AStatsEvent_setAtomId(statsEvent, atomId); in makeIntLogEvent() 54 void makeFloatLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeFloatLogEvent() argument 57 AStatsEvent_setAtomId(statsEvent, atomId); in makeFloatLogEvent() 64 void makeStringLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeStringLogEvent() argument 67 AStatsEvent_setAtomId(statsEvent, atomId); in makeStringLogEvent() 74 void makeIntWithBoolAnnotationLogEvent(LogEvent* logEvent, const int32_t atomId, in makeIntWithBoolAnnotationLogEvent() argument 78 AStatsEvent_setAtomId(statsEvent, atomId); in makeIntWithBoolAnnotationLogEvent() 85 void makeAttributionLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeAttributionLogEvent() argument 89 AStatsEvent_setAtomId(statsEvent, atomId); in makeAttributionLogEvent() [all …]
|
/packages/modules/StatsD/statsd/src/metrics/ |
D | MetricProducer.cpp | 155 for (auto atomId : mSlicedStateAtoms) { in onMatchedLogEventLocked() local 157 if (statePrimaryKeys.find(atomId) != statePrimaryKeys.end()) { in onMatchedLogEventLocked() 159 queryStateValue(atomId, statePrimaryKeys[atomId], &value); in onMatchedLogEventLocked() 163 queryStateValue(atomId, DEFAULT_DIMENSION_KEY, &value); in onMatchedLogEventLocked() 165 mapStateValue(atomId, &value); in onMatchedLogEventLocked() 304 void MetricProducer::queryStateValue(const int32_t atomId, const HashableDimensionKey& queryKey, in queryStateValue() argument 306 if (!StateManager::getInstance().getStateValue(atomId, queryKey, value)) { in queryStateValue() 308 value->mField.setTag(atomId); in queryStateValue() 309 ALOGW("StateTracker not found for state atom %d", atomId); in queryStateValue() 314 void MetricProducer::mapStateValue(const int32_t atomId, FieldValue* value) { in mapStateValue() argument [all …]
|
D | MetricsManager.cpp | 106 for (int atomId : it->getSlicedStateAtoms()) { in ~MetricsManager() local 107 StateManager::getInstance().unregisterListener(atomId, it); in ~MetricsManager() 226 int32_t atomId = pullAtomPackages.atom_id(); in createAllLogSourcesFromConfig() local 231 mPullAtomUids[atomId].insert(it->second); in createAllLogSourcesFromConfig() 233 mPullAtomPackages[atomId].insert(pullPackage); in createAllLogSourcesFromConfig() 294 for (const auto& [atomId, uids] : mPullAtomUids) { in initPullAtomSources() 295 mCombinedPullAtomUids[atomId].insert(uids.begin(), uids.end()); in initPullAtomSources() 297 for (const auto& [atomId, packages] : mPullAtomPackages) { in initPullAtomSources() 300 mCombinedPullAtomUids[atomId].insert(uids.begin(), uids.end()); in initPullAtomSources() 376 vector<int32_t> MetricsManager::getPullAtomUids(int32_t atomId) { in getPullAtomUids() argument [all …]
|
D | DurationMetricProducer.cpp | 299 void DurationMetricProducer::onStateChanged(const int64_t eventTimeNs, const int32_t atomId, in onStateChanged() argument 306 mapStateValue(atomId, &newStateCopy); in onStateChanged() 321 if (!containsLinkedStateValues(whatIt.first, primaryKey, mMetric2StateLinks, atomId)) { in onStateChanged() 324 whatIt.second->onStateChanged(eventTimeNs, atomId, newStateCopy); in onStateChanged() 724 for (auto atomId : mSlicedStateAtoms) { in handleMatchedLogEventValuesLocked() local 726 if (statePrimaryKeys.find(atomId) != statePrimaryKeys.end()) { in handleMatchedLogEventValuesLocked() 728 queryStateValue(atomId, statePrimaryKeys[atomId], &value); in handleMatchedLogEventValuesLocked() 732 queryStateValue(atomId, DEFAULT_DIMENSION_KEY, &value); in handleMatchedLogEventValuesLocked() 734 mapStateValue(atomId, &value); in handleMatchedLogEventValuesLocked()
|
/packages/modules/StatsD/lib/libstatssocket/ |
D | stats_event.c | 77 uint32_t atomId; member 95 event->atomId = 0; in AStatsEvent_obtain() 112 void AStatsEvent_setAtomId(AStatsEvent* event, uint32_t atomId) { in AStatsEvent_setAtomId() argument 113 if (event->atomId != 0) return; in AStatsEvent_setAtomId() 119 event->atomId = atomId; in AStatsEvent_setAtomId() 120 AStatsEvent_writeInt32(event, atomId); in AStatsEvent_setAtomId() 312 return event->atomId; in AStatsEvent_getAtomId() 326 if (0 == event->atomId) event->errors |= ERROR_NO_ATOM_ID; in build_internal() 355 return write_buffer_to_statsd(event->buf, event->numBytesWritten, event->atomId); in AStatsEvent_write()
|
D | stats_buffer_writer.c | 30 void note_log_drop(int error, int atomId) { in note_log_drop() argument 31 statsdLoggerWrite.noteDrop(error, atomId); in note_log_drop() 47 int write_buffer_to_statsd(void* buffer, size_t size, uint32_t atomId) { in write_buffer_to_statsd() argument 59 note_log_drop(ret, atomId); in write_buffer_to_statsd()
|
/packages/modules/StatsD/statsd/src/ |
D | stats_log_util.h | 111 inline bool isVendorPulledAtom(int atomId) { in isVendorPulledAtom() argument 112 return atomId >= StatsdStats::kVendorPulledAtomStartTag && atomId < StatsdStats::kMaxAtomTag; in isVendorPulledAtom() 115 inline bool isPulledAtom(int atomId) { in isPulledAtom() argument 116 return atomId >= StatsdStats::kPullAtomStartTag && atomId < StatsdStats::kVendorAtomStartTag; in isPulledAtom()
|
/packages/modules/StatsD/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/ |
D | TestDrive.java | 234 static boolean isPulledAtom(int atomId) { in isPulledAtom() argument 235 return atomId >= PULL_ATOM_START && atomId <= MAX_PLATFORM_ATOM_TAG in isPulledAtom() 236 || atomId >= VENDOR_PULLED_ATOM_START_TAG; in isPulledAtom() 272 for (int atomId : mPulledAtoms) { in createConfig() 273 builder.addAtomMatcher(createAtomMatcher(atomId, atomMatcherId)); in createConfig() 290 for (int atomId : mPushedAtoms) { in createConfig() 291 final AtomMatcher atomMatcher = createAtomMatcher(atomId, atomMatcherId++); in createConfig() 320 private static AtomMatcher createAtomMatcher(int atomId, long matcherId) { in createAtomMatcher() argument 324 .setSimpleAtomMatcher(SimpleAtomMatcher.newBuilder().setAtomId(atomId)); in createAtomMatcher()
|
/packages/modules/StatsD/statsd/src/guardrail/ |
D | StatsdStats.h | 292 void noteAtomLogged(int atomId, int32_t timeSec); 381 void notePullFailed(int atomId); 386 void notePullUidProviderNotFound(int atomId); 392 void notePullerNotFound(int atomId); 397 void notePullBinderCallFailed(int atomId); 402 void noteEmptyData(int atomId); 409 void notePullerCallbackRegistrationChanged(int atomId, bool registered); 651 int getPushedAtomErrors(int atomId) const;
|
D | StatsdStats.cpp | 459 void StatsdStats::noteAtomLogged(int atomId, int32_t timeSec) { in noteAtomLogged() argument 462 if (atomId >= 0 && atomId <= kMaxPushedAtomId) { in noteAtomLogged() 463 mPushedAtomStats[atomId]++; in noteAtomLogged() 465 if (atomId < 0) { in noteAtomLogged() 469 mNonPlatformPushedAtomStats[atomId]++; in noteAtomLogged() 483 void StatsdStats::notePullFailed(int atomId) { in notePullFailed() argument 485 mPulledAtomStats[atomId].pullFailed++; in notePullFailed() 488 void StatsdStats::notePullUidProviderNotFound(int atomId) { in notePullUidProviderNotFound() argument 490 mPulledAtomStats[atomId].pullUidProviderNotFound++; in notePullUidProviderNotFound() 493 void StatsdStats::notePullerNotFound(int atomId) { in notePullerNotFound() argument [all …]
|
/packages/modules/StatsD/statsd/tests/external/ |
D | StatsPullerManager_test.cpp | 47 AStatsEvent* createSimpleEvent(int32_t atomId, int32_t value) { in createSimpleEvent() argument 49 AStatsEvent_setAtomId(event, atomId); in createSimpleEvent() 79 vector<int32_t> getPullAtomUids(int atomId) override { in getPullAtomUids() argument 80 if (atomId == pullTagId1) { in getPullAtomUids() 82 } else if (atomId == pullTagId2) { in getPullAtomUids()
|
/packages/modules/StatsD/statsd/benchmark/ |
D | metric_util.cpp | 23 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId) { in CreateSimpleAtomMatcher() argument 27 simple_atom_matcher->set_atom_id(atomId); in CreateSimpleAtomMatcher() 214 FieldMatcher CreateAttributionUidDimensions(const int atomId, in CreateAttributionUidDimensions() argument 217 dimensions.set_field(atomId); in CreateAttributionUidDimensions() 227 FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId, in CreateAttributionUidAndTagDimensions() argument 230 dimensions.set_field(atomId); in CreateAttributionUidAndTagDimensions() 241 FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields) { in CreateDimensions() argument 243 dimensions.set_field(atomId); in CreateDimensions()
|
D | metric_util.h | 29 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId); 86 FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields); 89 FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId, 93 FieldMatcher CreateAttributionUidDimensions(const int atomId,
|
/packages/modules/StatsD/framework/java/android/util/ |
D | StatsEvent.java | 238 private StatsEvent(final int atomId, @Nullable final Buffer buffer, in StatsEvent() argument 240 mAtomId = atomId; in StatsEvent() 377 public Builder setAtomId(final int atomId) { in setAtomId() argument 379 mAtomId = atomId; in setAtomId() 382 writeInt(atomId); in setAtomId()
|
/packages/modules/StatsD/statsd/src/metrics/duration_helper/ |
D | OringDurationTracker.cpp | 338 void OringDurationTracker::onStateChanged(const int64_t timestamp, const int32_t atomId, in onStateChanged() argument 345 updateCurrentStateKey(atomId, newState); in onStateChanged() 352 updateCurrentStateKey(atomId, newState); in onStateChanged() 462 void OringDurationTracker::updateCurrentStateKey(const int32_t atomId, const FieldValue& newState) { in updateCurrentStateKey() argument 465 if (stateValuesKey->getValues()[i].mField.getTag() == atomId) { in updateCurrentStateKey()
|
D | OringDurationTracker.h | 47 void onStateChanged(const int64_t timestamp, const int32_t atomId, 65 void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState);
|
D | MaxDurationTracker.h | 55 void onStateChanged(const int64_t timestamp, const int32_t atomId, 66 void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState);
|
/packages/modules/StatsD/framework/jni/ |
D | android_util_StatsLog.cpp | 28 jint atomId) { in android_util_StatsLog_write() argument 42 write_buffer_to_statsd((void*) bufferArray, size, atomId); in android_util_StatsLog_write()
|
/packages/modules/StatsD/statsd/tests/metrics/ |
D | CountMetricProducer_test.cpp | 46 void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId) { in makeLogEvent() argument 48 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 54 void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId, string uid) { in makeLogEvent() argument 56 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent()
|