Home
last modified time | relevance | path

Searched refs:atomId (Results 1 – 25 of 59) sorted by relevance

123

/frameworks/base/cmds/statsd/src/state/
DStateManager.cpp55 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()
DStateManager.h57 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()
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DChooserActivityLoggerFake.java29 public int atomId; field in ChooserActivityLoggerFake.CallRecord
48 CallRecord(int atomId, UiEventLogger.UiEventEnum eventId, in CallRecord() argument
50 this.atomId = atomId; in CallRecord()
56 CallRecord(int atomId, String packageName, InstanceId instanceId, String mimeType, in CallRecord() argument
59 this.atomId = atomId; in CallRecord()
70 CallRecord(int atomId, String packageName, InstanceId instanceId, int targetType, in CallRecord() argument
72 this.atomId = atomId; in CallRecord()
/frameworks/base/cmds/statsd/tests/
Dstatsd_test_util.h60 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId);
180 FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields);
183 FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId,
187 FieldMatcher CreateAttributionUidDimensions(const int atomId,
190 FieldMatcher CreateAttributionUidAndOtherDimensions(const int atomId,
212 shared_ptr<LogEvent> CreateTwoValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1,
215 void CreateTwoValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1,
218 shared_ptr<LogEvent> CreateThreeValueLogEvent(int atomId, int64_t eventTimeNs, int32_t value1,
221 void CreateThreeValueLogEvent(LogEvent* logEvent, int atomId, int64_t eventTimeNs, int32_t value1,
227 std::shared_ptr<LogEvent> CreateRepeatedValueLogEvent(int atomId, int64_t eventTimeNs,
[all …]
Dstatsd_test_util.cpp45 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId) { in CreateSimpleAtomMatcher() argument
49 simple_atom_matcher->set_atom_id(atomId); in CreateSimpleAtomMatcher()
399 FieldMatcher CreateAttributionUidDimensions(const int atomId, in CreateAttributionUidDimensions() argument
402 dimensions.set_field(atomId); in CreateAttributionUidDimensions()
412 FieldMatcher CreateAttributionUidAndTagDimensions(const int atomId, in CreateAttributionUidAndTagDimensions() argument
415 dimensions.set_field(atomId); in CreateAttributionUidAndTagDimensions()
426 FieldMatcher CreateDimensions(const int atomId, const std::vector<int>& fields) { in CreateDimensions() argument
428 dimensions.set_field(atomId); in CreateDimensions()
435 FieldMatcher CreateAttributionUidAndOtherDimensions(const int atomId, in CreateAttributionUidAndOtherDimensions() argument
438 FieldMatcher dimensions = CreateAttributionUidDimensions(atomId, positions); in CreateAttributionUidAndOtherDimensions()
[all …]
DFieldValue_test.cpp43 void makeLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeLogEvent() argument
47 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent()
56 void makeLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeLogEvent() argument
60 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent()
320 int atomId = 10; in TEST() local
328 Field field1(atomId, pos1, /*depth=*/2); in TEST()
329 Field field2(atomId, pos2, /*depth=*/2); in TEST()
330 Field field3(atomId, pos3, /*depth=*/2); in TEST()
331 Field field4(atomId, pos4, /*depth=*/2); in TEST()
332 Field field5(atomId, pos5, /*depth=*/0); in TEST()
[all …]
DLogEntryMatcher_test.cpp47 void makeIntLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeIntLogEvent() argument
50 AStatsEvent_setAtomId(statsEvent, atomId); in makeIntLogEvent()
57 void makeFloatLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeFloatLogEvent() argument
60 AStatsEvent_setAtomId(statsEvent, atomId); in makeFloatLogEvent()
67 void makeStringLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeStringLogEvent() argument
70 AStatsEvent_setAtomId(statsEvent, atomId); in makeStringLogEvent()
77 void makeIntWithBoolAnnotationLogEvent(LogEvent* logEvent, const int32_t atomId, in makeIntWithBoolAnnotationLogEvent() argument
81 AStatsEvent_setAtomId(statsEvent, atomId); in makeIntWithBoolAnnotationLogEvent()
88 void makeAttributionLogEvent(LogEvent* logEvent, const int32_t atomId, const int64_t timestamp, in makeAttributionLogEvent() argument
92 AStatsEvent_setAtomId(statsEvent, atomId); in makeAttributionLogEvent()
[all …]
/frameworks/base/tools/stats_log_api_gen/
DCollation.h97 const int atomId; member
101 inline Annotation(AnnotationId annotationId, int atomId, AnnotationType type, in Annotation()
103 : annotationId(annotationId), atomId(atomId), type(type), value(value) { in Annotation()
109 return atomId == that.atomId ? annotationId < that.annotationId : atomId < that.atomId;
/frameworks/base/cmds/statsd/src/
Dstats_log_util.h107 inline bool isVendorPulledAtom(int atomId) { in isVendorPulledAtom() argument
108 return atomId >= StatsdStats::kVendorPulledAtomStartTag && atomId < StatsdStats::kMaxAtomTag; in isVendorPulledAtom()
111 inline bool isPulledAtom(int atomId) { in isPulledAtom() argument
112 return atomId >= StatsdStats::kPullAtomStartTag && atomId < StatsdStats::kVendorAtomStartTag; in isPulledAtom()
/frameworks/base/cmds/statsd/src/metrics/
DMetricProducer.cpp120 for (auto atomId : mSlicedStateAtoms) { in onMatchedLogEventLocked() local
122 if (statePrimaryKeys.find(atomId) != statePrimaryKeys.end()) { in onMatchedLogEventLocked()
124 queryStateValue(atomId, statePrimaryKeys[atomId], &value); in onMatchedLogEventLocked()
128 queryStateValue(atomId, DEFAULT_DIMENSION_KEY, &value); in onMatchedLogEventLocked()
130 mapStateValue(atomId, &value); in onMatchedLogEventLocked()
269 void MetricProducer::queryStateValue(const int32_t atomId, const HashableDimensionKey& queryKey, in queryStateValue() argument
271 if (!StateManager::getInstance().getStateValue(atomId, queryKey, value)) { in queryStateValue()
273 value->mField.setTag(atomId); in queryStateValue()
274 ALOGW("StateTracker not found for state atom %d", atomId); in queryStateValue()
279 void MetricProducer::mapStateValue(const int32_t atomId, FieldValue* value) { in mapStateValue() argument
[all …]
DMetricsManager.cpp128 int32_t atomId = pullAtomPackages.atom_id(); in MetricsManager() local
133 mPullAtomUids[atomId].insert(it->second); in MetricsManager()
135 mPullAtomPackages[atomId].insert(pullPackage); in MetricsManager()
189 for (int atomId : it->getSlicedStateAtoms()) { in ~MetricsManager() local
190 StateManager::getInstance().unregisterListener(atomId, it); in ~MetricsManager()
217 for (const auto& [atomId, uids] : mPullAtomUids) { in initPullAtomSources()
218 mCombinedPullAtomUids[atomId].insert(uids.begin(), uids.end()); in initPullAtomSources()
220 for (const auto& [atomId, packages] : mPullAtomPackages) { in initPullAtomSources()
223 mCombinedPullAtomUids[atomId].insert(uids.begin(), uids.end()); in initPullAtomSources()
299 vector<int32_t> MetricsManager::getPullAtomUids(int32_t atomId) { in getPullAtomUids() argument
[all …]
DDurationMetricProducer.cpp163 void DurationMetricProducer::onStateChanged(const int64_t eventTimeNs, const int32_t atomId, in onStateChanged() argument
170 mapStateValue(atomId, &newStateCopy); in onStateChanged()
185 if (!containsLinkedStateValues(whatIt.first, primaryKey, mMetric2StateLinks, atomId)) { in onStateChanged()
188 whatIt.second->onStateChanged(eventTimeNs, atomId, newStateCopy); in onStateChanged()
585 for (auto atomId : mSlicedStateAtoms) { in onMatchedLogEventLocked() local
587 if (statePrimaryKeys.find(atomId) != statePrimaryKeys.end()) { in onMatchedLogEventLocked()
589 queryStateValue(atomId, statePrimaryKeys[atomId], &value); in onMatchedLogEventLocked()
593 queryStateValue(atomId, DEFAULT_DIMENSION_KEY, &value); in onMatchedLogEventLocked()
595 mapStateValue(atomId, &value); in onMatchedLogEventLocked()
/frameworks/base/cmds/statsd/benchmark/
Dmetric_util.h29 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,
Dmetric_util.cpp23 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()
/frameworks/base/cmds/statsd/src/guardrail/
DStatsdStats.h292 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;
DStatsdStats.cpp459 void StatsdStats::noteAtomLogged(int atomId, int32_t timeSec) { in noteAtomLogged() argument
462 if (atomId <= kMaxPushedAtomId) { in noteAtomLogged()
463 mPushedAtomStats[atomId]++; in noteAtomLogged()
466 mNonPlatformPushedAtomStats[atomId]++; in noteAtomLogged()
480 void StatsdStats::notePullFailed(int atomId) { in notePullFailed() argument
482 mPulledAtomStats[atomId].pullFailed++; in notePullFailed()
485 void StatsdStats::notePullUidProviderNotFound(int atomId) { in notePullUidProviderNotFound() argument
487 mPulledAtomStats[atomId].pullUidProviderNotFound++; in notePullUidProviderNotFound()
490 void StatsdStats::notePullerNotFound(int atomId) { in notePullerNotFound() argument
492 mPulledAtomStats[atomId].pullerNotFound++; in notePullerNotFound()
[all …]
/frameworks/base/cmds/statsd/tests/external/
DStatsPullerManager_test.cpp47 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()
/frameworks/base/cmds/statsd/tools/localtools/src/com/android/statsd/shelltools/testdrive/
DTestDrive.java220 static boolean isPulledAtom(int atomId) { in isPulledAtom() argument
221 return atomId >= PULL_ATOM_START && atomId <= MAX_PLATFORM_ATOM_TAG in isPulledAtom()
222 || atomId >= VENDOR_PULLED_ATOM_START_TAG; in isPulledAtom()
258 for (int atomId : mPulledAtoms) { in createConfig()
259 builder.addAtomMatcher(createAtomMatcher(atomId, atomMatcherId)); in createConfig()
276 for (int atomId : mPushedAtoms) { in createConfig()
277 final AtomMatcher atomMatcher = createAtomMatcher(atomId, atomMatcherId++); in createConfig()
306 private static AtomMatcher createAtomMatcher(int atomId, long matcherId) { in createAtomMatcher() argument
310 .setSimpleAtomMatcher(SimpleAtomMatcher.newBuilder().setAtomId(atomId)); in createAtomMatcher()
/frameworks/base/services/core/java/com/android/server/notification/
DSysUiStatsEvent.java37 public Builder setAtomId(int atomId) { in setAtomId() argument
38 mBuilder.setAtomId(atomId); in setAtomId()
/frameworks/native/services/stats/
DStatsHal.cpp116 if (vendorAtom.atomId < 100000 || vendorAtom.atomId >= 200000) { in reportVendorAtom()
117 ALOGE("Atom ID %ld is not a valid vendor atom ID", (long) vendorAtom.atomId); in reportVendorAtom()
125 AStatsEvent_setAtomId(event, vendorAtom.atomId); in reportVendorAtom()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DWrappedSysUiStatsEvent.java47 public Builder setAtomId(int atomId) { in setAtomId() argument
48 mAtomId = atomId; in setAtomId()
49 super.setAtomId(atomId); in setAtomId()
/frameworks/base/apex/statsd/jni/
Dandroid_util_StatsLog.cpp28 jint atomId) { in android_util_StatsLog_write() argument
42 write_buffer_to_statsd((void*) bufferArray, size, atomId); in android_util_StatsLog_write()
/frameworks/base/cmds/statsd/src/metrics/duration_helper/
DOringDurationTracker.h47 void onStateChanged(const int64_t timestamp, const int32_t atomId,
65 void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState);
DMaxDurationTracker.h57 void onStateChanged(const int64_t timestamp, const int32_t atomId,
68 void updateCurrentStateKey(const int32_t atomId, const FieldValue& newState);
DOringDurationTracker.cpp330 void OringDurationTracker::onStateChanged(const int64_t timestamp, const int32_t atomId, in onStateChanged() argument
337 updateCurrentStateKey(atomId, newState); in onStateChanged()
344 updateCurrentStateKey(atomId, newState); in onStateChanged()
452 void OringDurationTracker::updateCurrentStateKey(const int32_t atomId, const FieldValue& newState) { in updateCurrentStateKey() argument
455 if (stateValuesKey->getValues()[i].mField.getTag() == atomId) { in updateCurrentStateKey()

123