/packages/modules/Connectivity/service-t/native/libs/libnetworkstats/ |
D | NetworkTraceHandlerTest.cpp | 112 .timestampNs = 1000, in TEST_F() 137 .timestampNs = 1, in TEST_F() 143 .timestampNs = 2, in TEST_F() 171 PacketTrace{.uid = 123, .timestampNs = 2, .length = 200}, in TEST_F() 172 PacketTrace{.uid = 123, .timestampNs = 1, .length = 100}, in TEST_F() 173 PacketTrace{.uid = 123, .timestampNs = 4, .length = 300}, in TEST_F() 175 PacketTrace{.uid = 456, .timestampNs = 2, .length = 400}, in TEST_F() 176 PacketTrace{.uid = 456, .timestampNs = 4, .length = 100}, in TEST_F() 206 PacketTrace{.uid = 123, .timestampNs = 2, .length = 200}, in TEST_F() 207 PacketTrace{.uid = 123, .timestampNs = 1, .length = 100}, in TEST_F() [all …]
|
D | NetworkTraceHandler.cpp | 172 dst->set_timestamp(pkt.timestampNs); in Write() 192 minTs = std::min(minTs, pkt.timestampNs); in Write() 195 bundle.time_and_len.emplace_back(pkt.timestampNs, pkt.length); in Write() 196 bundle.minTs = std::min(bundle.minTs, pkt.timestampNs); in Write() 197 bundle.maxTs = std::max(bundle.maxTs, pkt.timestampNs); in Write()
|
/packages/modules/StatsD/statsd/src/anomaly/ |
D | DurationAnomalyTracker.cpp | 39 const int64_t& timestampNs) { in startAlarm() argument 41 uint32_t timestampSec = static_cast<uint32_t>((timestampNs -1) / NS_PER_SEC) + 1; // round up in startAlarm() 42 if (isInRefractoryPeriod(timestampNs, dimensionKey)) { in startAlarm() 60 const int64_t& timestampNs) { in stopAlarm() argument 67 if (itr->second != nullptr && timestampNs >= (int64_t)NS_PER_SEC * itr->second->timestampSec) { in stopAlarm() 68 declareAnomaly(timestampNs, mAlert.metric_id(), dimensionKey, in stopAlarm() 69 mAlert.trigger_if_sum_gt() + (timestampNs / NS_PER_SEC) - in stopAlarm() 87 void DurationAnomalyTracker::informAlarmsFired(const int64_t& timestampNs, in informAlarmsFired() argument 106 timestampNs, mAlert.metric_id(), kv.first, in informAlarmsFired() 107 mAlert.trigger_if_sum_gt() + (timestampNs / NS_PER_SEC) - kv.second->timestampSec); in informAlarmsFired()
|
D | AnomalyTracker.cpp | 209 void AnomalyTracker::declareAnomaly(const int64_t& timestampNs, int64_t metricId, in declareAnomaly() argument 213 if (isInRefractoryPeriod(timestampNs, key)) { in declareAnomaly() 218 mRefractoryPeriodEndsSec[key] = ((timestampNs + NS_PER_SEC - 1) / NS_PER_SEC) // round up in declareAnomaly() 240 void AnomalyTracker::detectAndDeclareAnomaly(const int64_t& timestampNs, in detectAndDeclareAnomaly() argument 245 declareAnomaly(timestampNs, metricId, key, currentBucketValue); in detectAndDeclareAnomaly() 249 bool AnomalyTracker::isInRefractoryPeriod(const int64_t& timestampNs, in isInRefractoryPeriod() argument 253 return timestampNs < (it->second * (int64_t)NS_PER_SEC); in isInRefractoryPeriod()
|
D | AnomalyTracker.h | 74 void declareAnomaly(const int64_t& timestampNs, int64_t metricId, const MetricDimensionKey& key, 81 void detectAndDeclareAnomaly(const int64_t& timestampNs, const int64_t& currBucketNum, 125 virtual void stopAlarm(const MetricDimensionKey& dimensionKey, const int64_t& timestampNs) { in stopAlarm() argument 136 virtual void informAlarmsFired(const int64_t& timestampNs, in informAlarmsFired() argument 206 bool isInRefractoryPeriod(const int64_t& timestampNs, const MetricDimensionKey& key) const;
|
D | DurationAnomalyTracker.h | 42 void stopAlarm(const MetricDimensionKey& dimensionKey, const int64_t& timestampNs) override; 51 void informAlarmsFired(const int64_t& timestampNs,
|
D | AlarmTracker.cpp | 72 const int64_t& timestampNs, in informAlarmsFired() argument 84 mAlarmSec = findNextAlarmSec((timestampNs-1) / NS_PER_SEC + 1); // round up in informAlarmsFired()
|
/packages/modules/StatsD/statsd/tests/state/ |
D | StateTracker_test.cpp | 33 const int32_t timestampNs = 1000; variable 129 timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON); in TEST() 139 timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_OFF, 10111); in TEST() 148 event = CreateScreenStateChangedEvent(timestampNs, in TEST() 159 timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON, AID_SYSTEM); in TEST() 257 std::unique_ptr<LogEvent> event1 = CreateAcquireWakelockEvent(timestampNs, attributionUids1, in TEST() 266 timestampNs + 1000, attributionUids1, attributionTags1, "wakelockName"); in TEST() 271 timestampNs + 2000, attributionUids1, attributionTags1, "wakelockName"); in TEST() 276 timestampNs + 3000, attributionUids1, attributionTags1, "wakelockName"); in TEST() 299 CreateBleScanStateChangedEvent(timestampNs, attributionUids1, attributionTags1, in TEST() [all …]
|
/packages/modules/StatsD/statsd/tests/ |
D | statsd_test_util.h | 442 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(uint64_t timestampNs, 447 std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent(uint64_t timestampNs, int level); 450 std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs, 456 std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs, 462 std::unique_ptr<LogEvent> CreateScheduleScheduledJobEvent(uint64_t timestampNs, 468 std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs); 470 std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs); 473 std::unique_ptr<LogEvent> CreateBatteryStateChangedEvent(const uint64_t timestampNs, const BatteryP… 476 std::unique_ptr<LogEvent> CreateMoveToBackgroundEvent(uint64_t timestampNs, const int uid); 479 std::unique_ptr<LogEvent> CreateMoveToForegroundEvent(uint64_t timestampNs, const int uid); [all …]
|
D | statsd_test_util.cpp | 948 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(uint64_t timestampNs, in CreateScreenStateChangedEvent() argument 953 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateScreenStateChangedEvent() 963 std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs) { in CreateBatterySaverOnEvent() argument 966 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateBatterySaverOnEvent() 976 std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs) { in CreateBatterySaverOffEvent() argument 979 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateBatterySaverOffEvent() 989 std::unique_ptr<LogEvent> CreateBatteryStateChangedEvent(const uint64_t timestampNs, const BatteryP… in CreateBatteryStateChangedEvent() argument 992 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateBatteryStateChangedEvent() 1000 std::unique_ptr<LogEvent> CreateScreenBrightnessChangedEvent(uint64_t timestampNs, int level) { in CreateScreenBrightnessChangedEvent() argument 1003 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateScreenBrightnessChangedEvent() [all …]
|
/packages/modules/StatsD/statsd/benchmark/ |
D | metric_util.cpp | 273 uint64_t timestampNs, const android::view::DisplayStateEnum state) { in CreateScreenStateChangedEvent() argument 276 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateScreenStateChangedEvent() 286 const string& jobName, const ScheduledJobStateChanged::State state, uint64_t timestampNs) { in CreateScheduledJobStateChangedEvent() argument 289 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateScheduledJobStateChangedEvent() 300 std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs, in CreateStartScheduledJobEvent() argument 305 ScheduledJobStateChanged::STARTED, timestampNs); in CreateStartScheduledJobEvent() 309 std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs, in CreateFinishScheduledJobEvent() argument 314 ScheduledJobStateChanged::FINISHED, timestampNs); in CreateFinishScheduledJobEvent() 317 std::unique_ptr<LogEvent> CreateSyncStateChangedEvent(uint64_t timestampNs, in CreateSyncStateChangedEvent() argument 324 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateSyncStateChangedEvent() [all …]
|
D | metric_util.h | 103 uint64_t timestampNs, const android::view::DisplayStateEnum state); 106 std::unique_ptr<LogEvent> CreateStartScheduledJobEvent(uint64_t timestampNs, 112 std::unique_ptr<LogEvent> CreateFinishScheduledJobEvent(uint64_t timestampNs, 118 std::unique_ptr<LogEvent> CreateSyncStartEvent(uint64_t timestampNs, 124 std::unique_ptr<LogEvent> CreateSyncEndEvent(uint64_t timestampNs,
|
/packages/modules/StatsD/statsd/src/ |
D | StatsLogProcessor.cpp | 136 const int64_t& timestampNs, in processFiredAnomalyAlarmsLocked() argument 139 itr.second->onAnomalyAlarmFired(timestampNs, alarmSet); in processFiredAnomalyAlarmsLocked() 143 const int64_t& timestampNs, in onPeriodicAlarmFired() argument 147 itr.second->onPeriodicAlarmFired(timestampNs, alarmSet); in onPeriodicAlarmFired() 381 void StatsLogProcessor::resetConfigsLocked(const int64_t timestampNs) { in resetConfigsLocked() argument 386 resetConfigsLocked(timestampNs, configKeys); in resetConfigsLocked() 537 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const int64_t wallClockNs, in OnConfigUpdated() argument 541 WriteDataToDiskLocked(key, timestampNs, wallClockNs, CONFIG_UPDATED, NO_TIME_CONSTRAINTS); in OnConfigUpdated() 542 OnConfigUpdatedLocked(timestampNs, key, config, modularUpdate); in OnConfigUpdated() 545 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, in OnConfigUpdated() argument [all …]
|
D | StatsLogProcessor.h | 54 void OnConfigUpdated(const int64_t timestampNs, const int64_t wallClockNs, const ConfigKey& key, 57 void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, 81 const int64_t& timestampNs, 145 void informPullAlarmFired(const int64_t timestampNs); 254 void WriteDataToDiskLocked(const ConfigKey& key, const int64_t timestampNs, 311 void resetConfigsLocked(const int64_t timestampNs); 313 void resetConfigsLocked(const int64_t timestampNs, const std::vector<ConfigKey>& configs); 321 const int64_t& timestampNs,
|
/packages/apps/Camera2/src/com/android/camera/burst/ |
D | RingBuffer.java | 93 private synchronized void removeAndCloseImage(long timestampNs) { in removeAndCloseImage() argument 94 mImages.get(timestampNs).close(); in removeAndCloseImage() 95 mImages.remove(timestampNs); in removeAndCloseImage()
|
/packages/modules/StatsD/statsd/src/condition/ |
D | ConditionTimer.h | 133 void onConditionChanged(bool newCondition, int64_t timestampNs) { in onConditionChanged() argument 139 mTimerNs += (timestampNs - mLastConditionChangeTimestampNs); in onConditionChanged() 141 mLastConditionChangeTimestampNs = timestampNs; in onConditionChanged()
|
/packages/modules/StatsD/statsd/src/packages/ |
D | UidMap.h | 67 const int64_t timestampNs; member 75 ChangeRecord(const bool isDeletion, const int64_t timestampNs, const string& package, in ChangeRecord() 79 timestampNs(timestampNs), in ChangeRecord()
|
/packages/modules/StatsD/statsd/src/logd/ |
D | LogEvent.h | 177 void setElapsedTimestampNs(int64_t timestampNs) { in setElapsedTimestampNs() argument 178 mElapsedTimestampNs = timestampNs; in setElapsedTimestampNs() 184 void setLogdWallClockTimestampNs(int64_t timestampNs) { in setLogdWallClockTimestampNs() argument 185 mLogdTimestampNs = timestampNs; in setLogdWallClockTimestampNs()
|
/packages/modules/StatsD/statsd/src/metrics/ |
D | GaugeMetricProducer.cpp | 339 for (int64_t timestampNs : elapsedTimestampsNs) { in onDumpReportLocked() local 342 (long long)timestampNs); in onDumpReportLocked() 371 void GaugeMetricProducer::pullAndMatchEventsLocked(const int64_t timestampNs) { in pullAndMatchEventsLocked() argument 392 if (!mPullerManager->Pull(mPullTagId, mConfigKey, timestampNs, &allData)) { in pullAndMatchEventsLocked() 393 ALOGE("Gauge Stats puller failed for tag: %d at %lld", mPullTagId, (long long)timestampNs); in pullAndMatchEventsLocked() 396 const int64_t pullDelayNs = getElapsedRealtimeNs() - timestampNs; in pullAndMatchEventsLocked() 405 localCopy.setElapsedTimestampNs(timestampNs); in pullAndMatchEventsLocked()
|
D | NumericValueMetricProducer.cpp | 168 void NumericValueMetricProducer::pullAndMatchEventsLocked(const int64_t timestampNs) { in pullAndMatchEventsLocked() argument 170 if (!mPullerManager->Pull(mPullAtomId, mConfigKey, timestampNs, &allData)) { in pullAndMatchEventsLocked() 171 ALOGE("Stats puller failed for tag: %d at %lld", mPullAtomId, (long long)timestampNs); in pullAndMatchEventsLocked() 172 invalidateCurrentBucket(timestampNs, BucketDropReason::PULL_FAILED); in pullAndMatchEventsLocked() 176 accumulateEvents(allData, timestampNs, timestampNs); in pullAndMatchEventsLocked()
|
D | MetricsManager.h | 64 const int64_t& timestampNs, 68 const int64_t& timestampNs, 94 inline bool isInTtl(const int64_t timestampNs) const { in isInTtl() argument 95 return mTtlNs <= 0 || timestampNs < mTtlEndNs; in isInTtl()
|
/packages/modules/StatsD/statsd/tests/log_event/ |
D | LogEventQueue_test.cpp | 37 std::unique_ptr<LogEvent> makeLogEvent(uint64_t timestampNs) { in makeLogEvent() argument 40 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeLogEvent()
|
/packages/modules/StatsD/statsd/src/external/ |
D | StatsPuller.cpp | 118 int StatsPuller::ClearCacheIfNecessary(int64_t timestampNs) { in ClearCacheIfNecessary() argument 119 if (timestampNs - mLastPullTimeNs > mCoolDownNs) { in ClearCacheIfNecessary()
|
/packages/modules/StatsD/statsd/src/shell/ |
D | ShellSubscriberClient.cpp | 180 const int64_t timestampNs = truncateTimestampIfNecessary(event); in writeEventToProtoIfMatched() local 183 static_cast<long long>(timestampNs)); in writeEventToProtoIfMatched() 186 mCacheSize += getSize(event.getValues()) + sizeof(timestampNs); in writeEventToProtoIfMatched()
|
/packages/modules/StatsD/tests/src/android/cts/statsd/atom/ |
D | AtomTestCase.java | 395 for (long timestampNs : bucketInfo.getElapsedTimestampNanosList()) { in getGaugeMetricDataList() 396 assertTimestampIsTruncated(timestampNs); in getGaugeMetricDataList() 412 for (long timestampNs : atomInfo.getElapsedTimestampNanosList()) { in backFillGaugeBucketAtoms() 413 atomTimestamp.add(Pair.create(atomInfo.getAtom(), timestampNs)); in backFillGaugeBucketAtoms() local 444 for (long timestampNs : atomInfo.getElapsedTimestampNanosList()) { in backfillGaugeBucket() 445 atomTimestampData.add(Pair.create(atomInfo.getAtom(), timestampNs)); in backfillGaugeBucket() local 1244 protected void assertTimestampIsTruncated(long timestampNs) { in assertTimestampIsTruncated() argument 1247 .that(timestampNs % fiveMinutesInNs).isEqualTo(0); in assertTimestampIsTruncated()
|