/frameworks/base/cmds/statsd/tests/ |
D | statsd_test_util.cpp | 503 void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids, in writeAttribution() argument 510 AStatsEvent_writeAttributionChain(statsEvent, in writeAttribution() 515 void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent) { in parseStatsEventToLogEvent() argument 516 AStatsEvent_build(statsEvent); in parseStatsEventToLogEvent() 519 uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size); in parseStatsEventToLogEvent() 522 AStatsEvent_release(statsEvent); in parseStatsEventToLogEvent() 527 AStatsEvent* statsEvent = AStatsEvent_obtain(); in CreateTwoValueLogEvent() local 528 AStatsEvent_setAtomId(statsEvent, atomId); in CreateTwoValueLogEvent() 529 AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs); in CreateTwoValueLogEvent() 531 AStatsEvent_writeInt32(statsEvent, value1); in CreateTwoValueLogEvent() [all …]
|
D | LogEvent_test.cpp | 50 AStatsEvent* statsEvent = AStatsEvent_obtain(); in createIntWithBoolAnnotationLogEvent() local 51 AStatsEvent_setAtomId(statsEvent, /*atomId=*/100); in createIntWithBoolAnnotationLogEvent() 52 AStatsEvent_writeInt32(statsEvent, 10); in createIntWithBoolAnnotationLogEvent() 53 AStatsEvent_addBoolAnnotation(statsEvent, annotationId, annotationValue); in createIntWithBoolAnnotationLogEvent() 54 AStatsEvent_build(statsEvent); in createIntWithBoolAnnotationLogEvent() 57 uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size); in createIntWithBoolAnnotationLogEvent() 60 AStatsEvent_release(statsEvent); in createIntWithBoolAnnotationLogEvent() 65 AStatsEvent* statsEvent = AStatsEvent_obtain(); in createIntWithIntAnnotationLogEvent() local 66 AStatsEvent_setAtomId(statsEvent, /*atomId=*/100); in createIntWithIntAnnotationLogEvent() 67 AStatsEvent_writeInt32(statsEvent, 10); in createIntWithIntAnnotationLogEvent() [all …]
|
D | LogEntryMatcher_test.cpp | 49 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeIntLogEvent() local 50 AStatsEvent_setAtomId(statsEvent, atomId); in makeIntLogEvent() 51 AStatsEvent_overwriteTimestamp(statsEvent, timestamp); in makeIntLogEvent() 52 AStatsEvent_writeInt32(statsEvent, value); in makeIntLogEvent() 54 parseStatsEventToLogEvent(statsEvent, logEvent); in makeIntLogEvent() 59 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeFloatLogEvent() local 60 AStatsEvent_setAtomId(statsEvent, atomId); in makeFloatLogEvent() 61 AStatsEvent_overwriteTimestamp(statsEvent, timestamp); in makeFloatLogEvent() 62 AStatsEvent_writeFloat(statsEvent, floatValue); in makeFloatLogEvent() 64 parseStatsEventToLogEvent(statsEvent, logEvent); in makeFloatLogEvent() [all …]
|
D | FieldValue_test.cpp | 46 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 47 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 48 AStatsEvent_overwriteTimestamp(statsEvent, timestamp); in makeLogEvent() 50 writeAttribution(statsEvent, attributionUids, attributionTags); in makeLogEvent() 51 AStatsEvent_writeString(statsEvent, name.c_str()); in makeLogEvent() 53 parseStatsEventToLogEvent(statsEvent, logEvent); in makeLogEvent() 59 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 60 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 61 AStatsEvent_overwriteTimestamp(statsEvent, timestamp); in makeLogEvent() 63 writeAttribution(statsEvent, attributionUids, attributionTags); in makeLogEvent() [all …]
|
D | statsd_test_util.h | 206 void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids, 210 void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent);
|
/frameworks/base/apex/statsd/framework/test/src/android/util/ |
D | StatsEventTest.java | 48 final StatsEvent statsEvent = StatsEvent.newBuilder().usePooledBuffer().build(); in testNoFields() local 52 assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId); in testNoFields() 55 ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN); in testNoFields() 83 assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position()); in testNoFields() 85 statsEvent.release(); in testNoFields() 93 final StatsEvent statsEvent = StatsEvent.newBuilder() in testOnlyAtomId() local 99 assertThat(statsEvent.getAtomId()).isEqualTo(expectedAtomId); in testOnlyAtomId() 102 ByteBuffer.wrap(statsEvent.getBytes()).order(ByteOrder.LITTLE_ENDIAN); in testOnlyAtomId() 122 assertThat(statsEvent.getNumBytes()).isEqualTo(buffer.position()); in testOnlyAtomId() 124 statsEvent.release(); in testOnlyAtomId() [all …]
|
/frameworks/base/cmds/statsd/benchmark/ |
D | filter_value_benchmark.cpp | 33 AStatsEvent* statsEvent = AStatsEvent_obtain(); in createLogEventAndMatcher() local 34 AStatsEvent_setAtomId(statsEvent, 1); in createLogEventAndMatcher() 35 AStatsEvent_overwriteTimestamp(statsEvent, 100000); in createLogEventAndMatcher() 39 writeAttribution(statsEvent, attributionUids, attributionTags); in createLogEventAndMatcher() 41 AStatsEvent_writeFloat(statsEvent, 3.2f); in createLogEventAndMatcher() 42 AStatsEvent_writeString(statsEvent, "LOCATION"); in createLogEventAndMatcher() 43 AStatsEvent_writeInt64(statsEvent, 990); in createLogEventAndMatcher() 45 parseStatsEventToLogEvent(statsEvent, event); in createLogEventAndMatcher()
|
D | get_dimensions_for_condition_benchmark.cpp | 33 AStatsEvent* statsEvent = AStatsEvent_obtain(); in createLogEventAndLink() local 34 AStatsEvent_setAtomId(statsEvent, 1); in createLogEventAndLink() 35 AStatsEvent_overwriteTimestamp(statsEvent, 100000); in createLogEventAndLink() 39 writeAttribution(statsEvent, attributionUids, attributionTags); in createLogEventAndLink() 41 AStatsEvent_writeFloat(statsEvent, 3.2f); in createLogEventAndLink() 42 AStatsEvent_writeString(statsEvent, "LOCATION"); in createLogEventAndLink() 43 AStatsEvent_writeInt64(statsEvent, 990); in createLogEventAndLink() 45 parseStatsEventToLogEvent(statsEvent, event); in createLogEventAndLink()
|
D | metric_util.cpp | 250 void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids, in writeAttribution() argument 257 AStatsEvent_writeAttributionChain(statsEvent, in writeAttribution() 262 void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent) { in parseStatsEventToLogEvent() argument 263 AStatsEvent_build(statsEvent); in parseStatsEventToLogEvent() 266 uint8_t* buf = AStatsEvent_getBuffer(statsEvent, &size); in parseStatsEventToLogEvent() 269 AStatsEvent_release(statsEvent); in parseStatsEventToLogEvent() 274 AStatsEvent* statsEvent = AStatsEvent_obtain(); in CreateScreenStateChangedEvent() local 275 AStatsEvent_setAtomId(statsEvent, util::SCREEN_STATE_CHANGED); in CreateScreenStateChangedEvent() 276 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateScreenStateChangedEvent() 277 AStatsEvent_writeInt32(statsEvent, state); in CreateScreenStateChangedEvent() [all …]
|
D | metric_util.h | 96 void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids, 99 void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent);
|
/frameworks/base/apex/statsd/framework/java/android/util/ |
D | StatsLog.java | 172 public static void write(@NonNull final StatsEvent statsEvent) { in write() argument 173 writeImpl(statsEvent.getBytes(), statsEvent.getNumBytes(), statsEvent.getAtomId()); in write() 174 statsEvent.release(); in write()
|
/frameworks/base/cmds/statsd/tests/log_event/ |
D | LogEventQueue_test.cpp | 38 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 39 AStatsEvent_setAtomId(statsEvent, 10); in makeLogEvent() 40 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent() 43 parseStatsEventToLogEvent(statsEvent, logEvent.get()); in makeLogEvent()
|
/frameworks/base/cmds/statsd/tests/e2e/ |
D | GaugeMetric_e2e_push_test.cpp | 76 AStatsEvent* statsEvent = AStatsEvent_obtain(); in CreateAppStartOccurredEvent() local 77 AStatsEvent_setAtomId(statsEvent, util::APP_START_OCCURRED); in CreateAppStartOccurredEvent() 78 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateAppStartOccurredEvent() 80 AStatsEvent_writeInt32(statsEvent, uid); in CreateAppStartOccurredEvent() 81 AStatsEvent_writeString(statsEvent, pkg_name.c_str()); in CreateAppStartOccurredEvent() 82 AStatsEvent_writeInt32(statsEvent, type); in CreateAppStartOccurredEvent() 83 AStatsEvent_writeString(statsEvent, activity_name.c_str()); in CreateAppStartOccurredEvent() 84 AStatsEvent_writeString(statsEvent, calling_pkg_name.c_str()); in CreateAppStartOccurredEvent() 85 AStatsEvent_writeInt32(statsEvent, is_instant_app); in CreateAppStartOccurredEvent() 86 AStatsEvent_writeInt32(statsEvent, activity_start_msec); in CreateAppStartOccurredEvent() [all …]
|
/frameworks/base/cmds/statsd/tests/shell/ |
D | ShellSubscriber_test.cpp | 175 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeCpuActiveTimeAtom() local 176 AStatsEvent_setAtomId(statsEvent, 10016); in makeCpuActiveTimeAtom() 177 AStatsEvent_overwriteTimestamp(statsEvent, 1111L); in makeCpuActiveTimeAtom() 178 AStatsEvent_writeInt32(statsEvent, uid); in makeCpuActiveTimeAtom() 179 AStatsEvent_writeInt64(statsEvent, timeMillis); in makeCpuActiveTimeAtom() 182 parseStatsEventToLogEvent(statsEvent, logEvent.get()); in makeCpuActiveTimeAtom()
|
/frameworks/base/cmds/statsd/tests/state/ |
D | StateTracker_test.cpp | 70 AStatsEvent* statsEvent = AStatsEvent_obtain(); in buildIncorrectOverlayEvent() local 71 AStatsEvent_setAtomId(statsEvent, util::OVERLAY_STATE_CHANGED); in buildIncorrectOverlayEvent() 72 AStatsEvent_overwriteTimestamp(statsEvent, 1000); in buildIncorrectOverlayEvent() 74 AStatsEvent_writeInt32(statsEvent, uid); in buildIncorrectOverlayEvent() 75 AStatsEvent_writeString(statsEvent, packageName.c_str()); in buildIncorrectOverlayEvent() 77 AStatsEvent_writeInt32(statsEvent, state); in buildIncorrectOverlayEvent() 80 parseStatsEventToLogEvent(statsEvent, logEvent.get()); in buildIncorrectOverlayEvent() 86 AStatsEvent* statsEvent = AStatsEvent_obtain(); in buildOverlayEventBadStateType() local 87 AStatsEvent_setAtomId(statsEvent, util::OVERLAY_STATE_CHANGED); in buildOverlayEventBadStateType() 88 AStatsEvent_overwriteTimestamp(statsEvent, 1000); in buildOverlayEventBadStateType() [all …]
|
/frameworks/base/cmds/statsd/tests/metrics/ |
D | EventMetricProducer_test.cpp | 43 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 44 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 45 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent() 46 AStatsEvent_writeString(statsEvent, str.c_str()); in makeLogEvent() 48 parseStatsEventToLogEvent(statsEvent, logEvent); in makeLogEvent()
|
D | CountMetricProducer_test.cpp | 46 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 47 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 48 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent() 50 parseStatsEventToLogEvent(statsEvent, logEvent); in makeLogEvent() 54 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 55 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 56 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent() 57 AStatsEvent_writeString(statsEvent, uid.c_str()); in makeLogEvent() 59 parseStatsEventToLogEvent(statsEvent, logEvent); in makeLogEvent()
|
D | DurationMetricProducer_test.cpp | 49 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 50 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 51 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent() 53 parseStatsEventToLogEvent(statsEvent, logEvent); in makeLogEvent()
|
D | GaugeMetricProducer_test.cpp | 61 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeLogEvent() local 62 AStatsEvent_setAtomId(statsEvent, atomId); in makeLogEvent() 63 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent() 65 AStatsEvent_writeInt32(statsEvent, value1); in makeLogEvent() 66 AStatsEvent_writeString(statsEvent, str1.c_str()); in makeLogEvent() 67 AStatsEvent_writeInt32(statsEvent, value2); in makeLogEvent() 70 parseStatsEventToLogEvent(statsEvent, logEvent.get()); in makeLogEvent()
|
/frameworks/base/cmds/statsd/tests/external/ |
D | StatsPuller_test.cpp | 64 AStatsEvent* statsEvent = AStatsEvent_obtain(); in createSimpleEvent() local 65 AStatsEvent_setAtomId(statsEvent, pullTagId); in createSimpleEvent() 66 AStatsEvent_overwriteTimestamp(statsEvent, eventTimeNs); in createSimpleEvent() 67 AStatsEvent_writeInt64(statsEvent, value); in createSimpleEvent() 70 parseStatsEventToLogEvent(statsEvent, logEvent.get()); in createSimpleEvent()
|
/frameworks/base/cmds/statsd/tests/condition/ |
D | SimpleConditionTracker_test.cpp | 65 AStatsEvent* statsEvent = AStatsEvent_obtain(); in makeWakeLockEvent() local 66 AStatsEvent_setAtomId(statsEvent, atomId); in makeWakeLockEvent() 67 AStatsEvent_overwriteTimestamp(statsEvent, timestamp); in makeWakeLockEvent() 70 writeAttribution(statsEvent, uids, tags); in makeWakeLockEvent() 72 AStatsEvent_writeString(statsEvent, wl.c_str()); in makeWakeLockEvent() 73 AStatsEvent_writeInt32(statsEvent, acquire); in makeWakeLockEvent() 75 parseStatsEventToLogEvent(statsEvent, logEvent); in makeWakeLockEvent()
|