/frameworks/base/cmds/statsd/tests/external/ |
D | puller_util_test.cpp | 48 void extractIntoVector(vector<shared_ptr<LogEvent>> events, in extractIntoVector() 62 vector<shared_ptr<LogEvent>> inputData; in TEST() 63 shared_ptr<LogEvent> event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() 72 event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() 94 vector<shared_ptr<LogEvent>> inputData; in TEST() 95 shared_ptr<LogEvent> event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() 104 event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() 112 event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() 136 vector<shared_ptr<LogEvent>> inputData; in TEST() 137 shared_ptr<LogEvent> event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() [all …]
|
D | StatsPuller_test.cpp | 42 vector<std::shared_ptr<LogEvent>> pullData; 50 bool PullInternal(vector<std::shared_ptr<LogEvent>>* data) override { in PullInternal() 59 shared_ptr<LogEvent> createSimpleEvent(int64_t eventTimeNs, int64_t value) { in createSimpleEvent() 60 shared_ptr<LogEvent> event = make_shared<LogEvent>(pullTagId, eventTimeNs); in createSimpleEvent() 84 vector<std::shared_ptr<LogEvent>> dataHolder; in TEST_F() 112 vector<std::shared_ptr<LogEvent>> dataHolder; in TEST_F() 143 vector<std::shared_ptr<LogEvent>> dataHolder; in TEST_F() 161 vector<std::shared_ptr<LogEvent>> dataHolder; in TEST_F() 172 vector<std::shared_ptr<LogEvent>> dataHolder; in TEST_F() 182 vector<std::shared_ptr<LogEvent>> dataHolder; in TEST_F() [all …]
|
D | GpuStatsPuller_test.cpp | 66 MockGpuStatsPuller(const int tagId, vector<std::shared_ptr<LogEvent>>* data) in MockGpuStatsPuller() 70 bool PullInternal(vector<std::shared_ptr<LogEvent>>* data) override { in PullInternal() 75 vector<std::shared_ptr<LogEvent>>* mData; 94 vector<std::shared_ptr<LogEvent>> inData, outData; in TEST_F() 95 std::shared_ptr<LogEvent> event = make_shared<LogEvent>(android::util::GPU_STATS_GLOBAL_INFO, in TEST_F() 135 vector<std::shared_ptr<LogEvent>> inData, outData; in TEST_F() 136 std::shared_ptr<LogEvent> event = make_shared<LogEvent>(android::util::GPU_STATS_APP_INFO, in TEST_F()
|
/frameworks/base/cmds/statsd/tests/metrics/ |
D | ValueMetricProducer_test.cpp | 83 static shared_ptr<LogEvent> createEvent(int64_t eventTimeNs, int64_t value) { in createEvent() 84 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, eventTimeNs); in createEvent() 216 .WillOnce(Invoke([](int tagId, vector<std::shared_ptr<LogEvent>>* data) { in TEST() 218 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs); in TEST() 229 vector<shared_ptr<LogEvent>> allData; in TEST() 231 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucket2StartTimeNs + 1); in TEST() 251 event = make_shared<LogEvent>(tagId, bucket3StartTimeNs + 1); in TEST() 273 event = make_shared<LogEvent>(tagId, bucket4StartTimeNs + 1); in TEST() 301 .WillOnce(Invoke([](int tagId, vector<std::shared_ptr<LogEvent>>* data) { in TEST() 303 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 1); in TEST() [all …]
|
D | GaugeMetricProducer_test.cpp | 113 .WillOnce(Invoke([](int tagId, vector<std::shared_ptr<LogEvent>>* data) { in TEST() 115 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucketStartTimeNs + 10); in TEST() 131 vector<shared_ptr<LogEvent>> allData; in TEST() 133 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, bucket2StartTimeNs + 1); in TEST() 152 std::shared_ptr<LogEvent> event2 = std::make_shared<LogEvent>(tagId, bucket3StartTimeNs + 10); in TEST() 219 shared_ptr<LogEvent> event1 = make_shared<LogEvent>(tagId, bucketStartTimeNs + 10); in TEST() 235 shared_ptr<LogEvent> event2 = make_shared<LogEvent>(tagId, bucketStartTimeNs + 59 * NS_PER_SEC); in TEST() 248 shared_ptr<LogEvent> event3 = make_shared<LogEvent>(tagId, bucketStartTimeNs + 65 * NS_PER_SEC); in TEST() 259 shared_ptr<LogEvent> event4 = in TEST() 260 make_shared<LogEvent>(tagId, bucketStartTimeNs + 125 * NS_PER_SEC); in TEST() [all …]
|
D | DurationMetricProducer_test.cpp | 70 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 72 LogEvent event2(tagId, bucketStartTimeNs + bucketSizeNs + 2); in TEST() 107 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 109 LogEvent event2(tagId, bucketStartTimeNs + 2); in TEST() 111 LogEvent event3(tagId, bucketStartTimeNs + bucketSizeNs + 1); in TEST() 113 LogEvent event4(tagId, bucketStartTimeNs + bucketSizeNs + 3); in TEST() 155 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 157 LogEvent event2(tagId, bucketStartTimeNs + 2); in TEST() 159 LogEvent event3(tagId, bucketStartTimeNs + bucketSizeNs + 1); in TEST() 161 LogEvent event4(tagId, bucketStartTimeNs + bucketSizeNs + 3); in TEST() [all …]
|
D | CountMetricProducer_test.cpp | 64 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 66 LogEvent event2(tagId, bucketStartTimeNs + 2); in TEST() 94 LogEvent event3(tagId, bucketStartTimeNs + bucketSizeNs + 2); in TEST() 126 LogEvent event1(1, bucketStartTimeNs + 1); in TEST() 129 LogEvent event2(1, bucketStartTimeNs + 10); in TEST() 175 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 182 LogEvent event2(tagId, bucketStartTimeNs + 10); in TEST() 229 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 258 LogEvent event2(tagId, bucketStartTimeNs + 59 * NS_PER_SEC + 10); in TEST() 267 LogEvent event3(tagId, bucketStartTimeNs + 62 * NS_PER_SEC + 10); in TEST() [all …]
|
D | EventMetricProducer_test.cpp | 46 LogEvent event1(1 /*tag id*/, bucketStartTimeNs + 1); in TEST() 47 LogEvent event2(1 /*tag id*/, bucketStartTimeNs + 2); in TEST() 70 LogEvent event1(1, bucketStartTimeNs + 1); in TEST() 71 LogEvent event2(1, bucketStartTimeNs + 10); in TEST() 103 LogEvent event1(tagId, bucketStartTimeNs + 1); in TEST() 109 LogEvent event2(tagId, bucketStartTimeNs + 10); in TEST()
|
/frameworks/base/cmds/statsd/benchmark/ |
D | metric_util.h | 96 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent( 100 std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent( 104 std::unique_ptr<LogEvent> CreateStartScheduledJobEvent( 109 std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent( 114 std::unique_ptr<LogEvent> CreateMoveToBackgroundEvent(const int uid, uint64_t timestampNs); 117 std::unique_ptr<LogEvent> CreateMoveToForegroundEvent(const int uid, uint64_t timestampNs); 120 std::unique_ptr<LogEvent> CreateSyncStartEvent( 125 std::unique_ptr<LogEvent> CreateSyncEndEvent( 130 std::unique_ptr<LogEvent> CreateAppCrashEvent( 134 std::unique_ptr<LogEvent> CreateAcquireWakelockEvent( [all …]
|
D | metric_util.cpp | 248 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent( in CreateScreenStateChangedEvent() 250 auto event = std::make_unique<LogEvent>(android::util::SCREEN_STATE_CHANGED, timestampNs); in CreateScreenStateChangedEvent() 256 std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent( in CreateScreenBrightnessChangedEvent() 258 auto event = std::make_unique<LogEvent>(android::util::SCREEN_BRIGHTNESS_CHANGED, timestampNs); in CreateScreenBrightnessChangedEvent() 265 std::unique_ptr<LogEvent> CreateScheduledJobStateChangedEvent( in CreateScheduledJobStateChangedEvent() 268 … auto event = std::make_unique<LogEvent>(android::util::SCHEDULED_JOB_STATE_CHANGED, timestampNs); in CreateScheduledJobStateChangedEvent() 276 std::unique_ptr<LogEvent> CreateStartScheduledJobEvent( in CreateStartScheduledJobEvent() 284 std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent( in CreateFinishScheduledJobEvent() 291 std::unique_ptr<LogEvent> CreateWakelockStateChangedEvent( in CreateWakelockStateChangedEvent() 294 auto event = std::make_unique<LogEvent>(android::util::WAKELOCK_STATE_CHANGED, timestampNs); in CreateWakelockStateChangedEvent() [all …]
|
/frameworks/base/cmds/statsd/src/logd/ |
D | LogEvent.cpp | 38 LogEvent::LogEvent(log_msg& msg) { in LogEvent() function in android::os::statsd::LogEvent 50 LogEvent::LogEvent(const LogEvent& event) { in LogEvent() function in android::os::statsd::LogEvent 58 LogEvent::LogEvent(const StatsLogEventWrapper& statsLogEventWrapper, int workChainIndex) { in LogEvent() function in android::os::statsd::LogEvent 111 void LogEvent::createLogEvents(const StatsLogEventWrapper& statsLogEventWrapper, in createLogEvents() 112 std::vector<std::shared_ptr<LogEvent>>& logEvents) { in createLogEvents() 114 logEvents.push_back(std::make_shared<LogEvent>(statsLogEventWrapper, -1)); in createLogEvents() 117 logEvents.push_back(std::make_shared<LogEvent>(statsLogEventWrapper, i)); in createLogEvents() 122 LogEvent::LogEvent(int32_t tagId, int64_t wallClockTimestampNs, int64_t elapsedTimestampNs) { in LogEvent() function in android::os::statsd::LogEvent 134 LogEvent::LogEvent(int32_t tagId, int64_t wallClockTimestampNs, int64_t elapsedTimestampNs, in LogEvent() function in android::os::statsd::LogEvent 190 LogEvent::LogEvent(const string& trainName, int64_t trainVersionCode, bool requiresStaging, in LogEvent() function in android::os::statsd::LogEvent [all …]
|
D | LogEvent.h | 64 class LogEvent { 69 explicit LogEvent(log_msg& msg); 75 std::vector<std::shared_ptr<LogEvent>>& logEvents); 80 explicit LogEvent(const StatsLogEventWrapper& statsLogEventWrapper, int workChainIndex); 85 explicit LogEvent(int32_t tagId, int64_t wallClockTimestampNs, int64_t elapsedTimestampNs); 88 explicit LogEvent(int32_t tagId, int64_t timestampNs); 91 explicit LogEvent(int32_t tagId, int64_t timestampNs, int32_t uid); 96 explicit LogEvent(int32_t tagId, int64_t wallClockTimestampNs, int64_t elapsedTimestampNs, 104 explicit LogEvent(const std::string& trainName, int64_t trainVersionCode, bool requiresStaging, 108 explicit LogEvent(int64_t wallClockTimestampNs, int64_t elapsedTimestampNs, [all …]
|
D | LogEventQueue.h | 39 std::unique_ptr<LogEvent> waitPop(); 46 bool push(std::unique_ptr<LogEvent> event, int64_t* oldestTimestampNs); 52 std::queue<std::unique_ptr<LogEvent>> mQueue;
|
D | LogEventQueue.cpp | 29 unique_ptr<LogEvent> LogEventQueue::waitPop() { in waitPop() 36 unique_ptr<LogEvent> item = std::move(mQueue.front()); in waitPop() 42 bool LogEventQueue::push(unique_ptr<LogEvent> item, int64_t* oldestTimestampNs) { in push()
|
/frameworks/base/cmds/statsd/tests/ |
D | statsd_test_util.h | 122 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent( 126 std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent( 130 std::unique_ptr<LogEvent> CreateStartScheduledJobEvent( 135 std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent( 140 std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs); 142 std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs); 145 std::unique_ptr<LogEvent> CreateMoveToBackgroundEvent(const int uid, uint64_t timestampNs); 148 std::unique_ptr<LogEvent> CreateMoveToForegroundEvent(const int uid, uint64_t timestampNs); 151 std::unique_ptr<LogEvent> CreateSyncStartEvent( 156 std::unique_ptr<LogEvent> CreateSyncEndEvent( [all …]
|
D | statsd_test_util.cpp | 295 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent( in CreateScreenStateChangedEvent() 297 auto event = std::make_unique<LogEvent>(android::util::SCREEN_STATE_CHANGED, timestampNs); in CreateScreenStateChangedEvent() 303 std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs) { in CreateBatterySaverOnEvent() 304 auto event = std::make_unique<LogEvent>( in CreateBatterySaverOnEvent() 311 std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs) { in CreateBatterySaverOffEvent() 312 auto event = std::make_unique<LogEvent>( in CreateBatterySaverOffEvent() 319 std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent( in CreateScreenBrightnessChangedEvent() 321 auto event = std::make_unique<LogEvent>(android::util::SCREEN_BRIGHTNESS_CHANGED, timestampNs); in CreateScreenBrightnessChangedEvent() 328 std::unique_ptr<LogEvent> CreateScheduledJobStateChangedEvent( in CreateScheduledJobStateChangedEvent() 331 … auto event = std::make_unique<LogEvent>(android::util::SCHEDULED_JOB_STATE_CHANGED, timestampNs); in CreateScheduledJobStateChangedEvent() [all …]
|
/frameworks/base/cmds/statsd/tests/shell/ |
D | ShellSubscriber_test.cpp | 60 const vector<std::shared_ptr<LogEvent>>& pushedEvents, in runShellTest() 137 vector<std::shared_ptr<LogEvent>> pushedList; in TEST() 139 std::shared_ptr<LogEvent> event1 = in TEST() 140 std::make_shared<LogEvent>(29 /*screen_state_atom_id*/, 1000 /*timestamp*/); in TEST() 193 .WillRepeatedly(Invoke([](int tagId, vector<std::shared_ptr<LogEvent>>* data) { in TEST() 195 shared_ptr<LogEvent> event = make_shared<LogEvent>(tagId, 1111L); in TEST() 201 event = make_shared<LogEvent>(tagId, 1111L); in TEST() 209 runShellTest(getPulledConfig(), uidMap, pullerManager, vector<std::shared_ptr<LogEvent>>(), in TEST()
|
/frameworks/base/cmds/statsd/src/external/ |
D | ResourceHealthManagerPuller.cpp | 58 bool ResourceHealthManagerPuller::PullInternal(vector<shared_ptr<LogEvent>>* data) { in PullInternal() 77 auto ptr = make_shared<LogEvent>(android::util::REMAINING_BATTERY_CAPACITY, in PullInternal() 83 auto ptr = make_shared<LogEvent>(android::util::FULL_BATTERY_CAPACITY, in PullInternal() 89 auto ptr = make_shared<LogEvent>(android::util::BATTERY_VOLTAGE, wallClockTimestampNs, in PullInternal() 95 auto ptr = make_shared<LogEvent>(android::util::BATTERY_LEVEL, wallClockTimestampNs, in PullInternal() 101 auto ptr = make_shared<LogEvent>(android::util::BATTERY_CYCLE_COUNT, in PullInternal()
|
D | GpuStatsPuller.cpp | 48 std::vector<std::shared_ptr<LogEvent>>* data) { in pullGpuStatsGlobalInfo() 58 std::shared_ptr<LogEvent> event = make_shared<LogEvent>( in pullGpuStatsGlobalInfo() 81 std::vector<std::shared_ptr<LogEvent>>* data) { in pullGpuStatsAppInfo() 91 std::shared_ptr<LogEvent> event = make_shared<LogEvent>( in pullGpuStatsAppInfo() 106 bool GpuStatsPuller::PullInternal(std::vector<std::shared_ptr<LogEvent>>* data) { in PullInternal()
|
D | SubsystemSleepStatePuller.cpp | 63 static std::function<bool(vector<shared_ptr<LogEvent>>* data)> gPuller = {}; 185 static bool getIPowerStatsDataLocked(vector<shared_ptr<LogEvent>>* data) { in getIPowerStatsDataLocked() 208 auto statePtr = make_shared<LogEvent>( in getIPowerStatsDataLocked() 255 static bool getIPowerDataLocked(vector<shared_ptr<LogEvent>>* data) { in getIPowerDataLocked() 273 auto statePtr = make_shared<LogEvent>( in getIPowerDataLocked() 287 auto voterPtr = make_shared<LogEvent>( in getIPowerDataLocked() 322 auto subsystemStatePtr = make_shared<LogEvent>( in getIPowerDataLocked() 345 std::function<bool(vector<shared_ptr<LogEvent>>* data)> getPullerLocked() { in getPullerLocked() 346 std::function<bool(vector<shared_ptr<LogEvent>>* data)> ret = {}; in getPullerLocked() 361 bool SubsystemSleepStatePuller::PullInternal(vector<shared_ptr<LogEvent>>* data) { in PullInternal()
|
D | StatsPuller.h | 48 bool Pull(std::vector<std::shared_ptr<LogEvent>>* data); 67 virtual bool PullInternal(std::vector<std::shared_ptr<LogEvent>>* data) = 0; 79 std::vector<std::shared_ptr<LogEvent>> mCachedData;
|
D | puller_util.cpp | 56 void mapAndMergeIsolatedUidsToHostUid(vector<shared_ptr<LogEvent>>& data, const sp<UidMap>& uidMap, in mapAndMergeIsolatedUidsToHostUid() 72 for (shared_ptr<LogEvent>& event : data) { in mapAndMergeIsolatedUidsToHostUid() 108 [](const shared_ptr<LogEvent>& lhs, const shared_ptr<LogEvent>& rhs) { in mapAndMergeIsolatedUidsToHostUid() 122 vector<shared_ptr<LogEvent>> mergedData; in mapAndMergeIsolatedUidsToHostUid()
|
/frameworks/base/services/core/java/com/android/server/utils/ |
D | ManagedApplicationService.java | 110 public static class LogEvent implements LogFormattable { class in ManagedApplicationService 123 public LogEvent(long timestamp, ComponentName component, int event) { in LogEvent() method in ManagedApplicationService.LogEvent 190 void onServiceEvent(LogEvent event); in onServiceEvent() 320 mEventCb.onServiceEvent(new LogEvent(timestamp, mComponent, in connect() 321 LogEvent.EVENT_BINDING_DIED)); in connect() 341 mEventCb.onServiceEvent(new LogEvent(timestamp, mComponent, in connect() 342 LogEvent.EVENT_CONNECTED)); in connect() 382 mEventCb.onServiceEvent(new LogEvent(timestamp, mComponent, in connect() 383 LogEvent.EVENT_DISCONNECTED)); in connect() 455 mEventCb.onServiceEvent(new LogEvent(timestamp, mComponent, in checkAndDeliverServiceDiedCbLocked() [all …]
|
/frameworks/base/cmds/statsd/tests/condition/ |
D | StateTracker_test.cpp | 47 void makeUidProcStateEvent(int32_t uid, int32_t state, LogEvent* event) { in makeUidProcStateEvent() 66 LogEvent event(kUidProcTag, 0 /*timestamp*/); in TEST() 87 LogEvent event2(kUidProcTag, 0 /*timestamp*/); in TEST() 97 LogEvent event3(kUidProcTag, 0 /*timestamp*/); in TEST()
|
D | SimpleConditionTracker_test.cpp | 60 void writeAttributionNodesToEvent(LogEvent* event, const std::vector<int> &uids) { in writeAttributionNodesToEvent() 71 LogEvent* event, const std::vector<int> &uids, const string& wl, int acquire) { in makeWakeLockEvent() 127 LogEvent event(1 /*tagId*/, 0 /*timestamp*/); in TEST() 212 LogEvent event(1 /*tagId*/, 0 /*timestamp*/); in TEST() 290 LogEvent event(1 /*tagId*/, 0 /*timestamp*/); in TEST() 330 LogEvent event2(1 /*tagId*/, 0 /*timestamp*/); in TEST() 351 LogEvent event3(1 /*tagId*/, 0 /*timestamp*/); in TEST() 371 LogEvent event4(1 /*tagId*/, 0 /*timestamp*/); in TEST() 426 LogEvent event(1 /*tagId*/, 0 /*timestamp*/); in TEST() 454 LogEvent event2(1 /*tagId*/, 0 /*timestamp*/); in TEST() [all …]
|