Home
last modified time | relevance | path

Searched refs:statsEvent (Results 1 – 21 of 21) sorted by relevance

/frameworks/base/cmds/statsd/tests/
Dstatsd_test_util.cpp503 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 …]
DLogEvent_test.cpp50 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 …]
DLogEntryMatcher_test.cpp49 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 …]
DFieldValue_test.cpp46 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 …]
Dstatsd_test_util.h206 void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids,
210 void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent);
/frameworks/base/apex/statsd/framework/test/src/android/util/
DStatsEventTest.java48 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/
Dfilter_value_benchmark.cpp33 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()
Dget_dimensions_for_condition_benchmark.cpp33 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()
Dmetric_util.cpp250 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 …]
Dmetric_util.h96 void writeAttribution(AStatsEvent* statsEvent, const vector<int>& attributionUids,
99 void parseStatsEventToLogEvent(AStatsEvent* statsEvent, LogEvent* logEvent);
/frameworks/base/apex/statsd/framework/java/android/util/
DStatsLog.java172 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/
DLogEventQueue_test.cpp38 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/
DGaugeMetric_e2e_push_test.cpp76 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/
DShellSubscriber_test.cpp175 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/
DStateTracker_test.cpp70 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/
DEventMetricProducer_test.cpp43 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()
DCountMetricProducer_test.cpp46 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()
DDurationMetricProducer_test.cpp49 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()
DGaugeMetricProducer_test.cpp61 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/
DStatsPuller_test.cpp64 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/
DSimpleConditionTracker_test.cpp65 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()