/packages/modules/Connectivity/service-t/native/libs/libnetworkstats/ |
D | NetworkTraceHandlerTest.cpp | 112 .timestampNs = 1000, in TEST_F() 137 .timestampNs = 1, in TEST_F() 144 .timestampNs = 2, in TEST_F() 169 .timestampNs = 1, in TEST_F() 176 .timestampNs = 2, in TEST_F() 209 PacketTrace{.timestampNs = 2, .length = 200, .uid = 123}, in TEST_F() 210 PacketTrace{.timestampNs = 1, .length = 100, .uid = 123}, in TEST_F() 211 PacketTrace{.timestampNs = 4, .length = 300, .uid = 123}, in TEST_F() 213 PacketTrace{.timestampNs = 2, .length = 400, .uid = 456}, in TEST_F() 214 PacketTrace{.timestampNs = 4, .length = 100, .uid = 456}, in TEST_F() [all …]
|
D | NetworkTraceHandler.cpp | 206 dst->set_timestamp(pkt.timestampNs); in Write() 225 minTs = std::min(minTs, pkt.timestampNs); in Write() 228 bundle.time_and_len.emplace_back(pkt.timestampNs, pkt.length); in Write() 229 bundle.minTs = std::min(bundle.minTs, pkt.timestampNs); in Write() 230 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() 88 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.h | 72 void declareAnomaly(int64_t timestampNs, int64_t metricId, const MetricDimensionKey& key, 79 void detectAndDeclareAnomaly(int64_t timestampNs, int64_t currBucketNum, int64_t metricId, 122 virtual void stopAlarm(const MetricDimensionKey& dimensionKey, int64_t timestampNs) { in stopAlarm() argument 134 int64_t timestampNs, in informAlarmsFired() argument 204 bool isInRefractoryPeriod(int64_t timestampNs, const MetricDimensionKey& key) const;
|
D | AnomalyTracker.cpp | 205 void AnomalyTracker::declareAnomaly(const int64_t timestampNs, int64_t metricId, in declareAnomaly() argument 209 if (isInRefractoryPeriod(timestampNs, key)) { in declareAnomaly() 227 mRefractoryPeriodEndsSec[key] = ((timestampNs + NS_PER_SEC - 1) / NS_PER_SEC) // round up in declareAnomaly() 245 void AnomalyTracker::detectAndDeclareAnomaly(const int64_t timestampNs, const int64_t currBucketNum, in detectAndDeclareAnomaly() argument 249 declareAnomaly(timestampNs, metricId, key, currentBucketValue); in detectAndDeclareAnomaly() 253 bool AnomalyTracker::isInRefractoryPeriod(const int64_t timestampNs, in isInRefractoryPeriod() argument 257 return timestampNs < (it->second * (int64_t)NS_PER_SEC); in isInRefractoryPeriod()
|
D | DurationAnomalyTracker.h | 40 void stopAlarm(const MetricDimensionKey& dimensionKey, int64_t timestampNs) override; 50 int64_t timestampNs,
|
D | AlarmTracker.cpp | 72 const int64_t timestampNs, in informAlarmsFired() argument 90 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 130 timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON); in TEST() 140 timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_OFF, 10111); in TEST() 149 event = CreateScreenStateChangedEvent(timestampNs, in TEST() 160 timestampNs, android::view::DisplayStateEnum::DISPLAY_STATE_ON, AID_SYSTEM); in TEST() 258 std::unique_ptr<LogEvent> event1 = CreateAcquireWakelockEvent(timestampNs, attributionUids1, in TEST() 267 timestampNs + 1000, attributionUids1, attributionTags1, "wakelockName"); in TEST() 272 timestampNs + 2000, attributionUids1, attributionTags1, "wakelockName"); in TEST() 277 timestampNs + 3000, attributionUids1, attributionTags1, "wakelockName"); in TEST() 300 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, 478 std::unique_ptr<LogEvent> CreateMalformedBatteryStateChangedEvent(const uint64_t timestampNs); 481 uint64_t timestampNs, const int uid, const string& pkgName, const string& className, [all …]
|
D | statsd_test_util.cpp | 950 std::unique_ptr<LogEvent> CreateScreenStateChangedEvent(uint64_t timestampNs, in CreateScreenStateChangedEvent() argument 955 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateScreenStateChangedEvent() 965 std::unique_ptr<LogEvent> CreateBatterySaverOnEvent(uint64_t timestampNs) { in CreateBatterySaverOnEvent() argument 968 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateBatterySaverOnEvent() 978 std::unique_ptr<LogEvent> CreateBatterySaverOffEvent(uint64_t timestampNs) { in CreateBatterySaverOffEvent() argument 981 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateBatterySaverOffEvent() 991 std::unique_ptr<LogEvent> CreateBatteryStateChangedEvent(const uint64_t timestampNs, in CreateBatteryStateChangedEvent() argument 996 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateBatteryStateChangedEvent() 1006 std::unique_ptr<LogEvent> CreateMalformedBatteryStateChangedEvent(const uint64_t timestampNs) { in CreateMalformedBatteryStateChangedEvent() argument 1009 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in CreateMalformedBatteryStateChangedEvent() [all …]
|
/packages/modules/StatsD/statsd/tests/log_event/ |
D | LogEventQueue_test.cpp | 38 AStatsEvent* makeStatsEvent(uint64_t timestampNs) { in makeStatsEvent() argument 41 AStatsEvent_overwriteTimestamp(statsEvent, timestampNs); in makeStatsEvent() 46 std::unique_ptr<LogEvent> makeLogEvent(uint64_t timestampNs) { in makeLogEvent() argument 47 AStatsEvent* statsEvent = makeStatsEvent(timestampNs); in makeLogEvent() 50 EXPECT_EQ(logEvent->GetElapsedTimestampNs(), timestampNs); in makeLogEvent()
|
/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/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/ |
D | StatsLogProcessor.h | 54 void OnConfigUpdated(const int64_t timestampNs, int64_t wallClockNs, const ConfigKey& key, 57 void OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, 81 int64_t timestampNs, 145 void informPullAlarmFired(const int64_t timestampNs); 254 void WriteDataToDiskLocked(const ConfigKey& key, int64_t timestampNs, const int64_t wallClockNs, 310 void resetConfigsLocked(const int64_t timestampNs); 312 void resetConfigsLocked(const int64_t timestampNs, const std::vector<ConfigKey>& configs); 320 int64_t timestampNs,
|
D | StatsLogProcessor.cpp | 139 const int64_t timestampNs, in processFiredAnomalyAlarmsLocked() argument 142 itr.second->onAnomalyAlarmFired(timestampNs, alarmSet); in processFiredAnomalyAlarmsLocked() 146 const int64_t timestampNs, in onPeriodicAlarmFired() argument 150 itr.second->onPeriodicAlarmFired(timestampNs, alarmSet); in onPeriodicAlarmFired() 384 void StatsLogProcessor::resetConfigsLocked(const int64_t timestampNs) { in resetConfigsLocked() argument 389 resetConfigsLocked(timestampNs, configKeys); in resetConfigsLocked() 545 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const int64_t wallClockNs, in OnConfigUpdated() argument 549 WriteDataToDiskLocked(key, timestampNs, wallClockNs, CONFIG_UPDATED, NO_TIME_CONSTRAINTS); in OnConfigUpdated() 550 OnConfigUpdatedLocked(timestampNs, key, config, modularUpdate); in OnConfigUpdated() 553 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key, in OnConfigUpdated() argument [all …]
|
/packages/modules/StatsD/statsd/src/packages/ |
D | UidMap.h | 68 const int64_t timestampNs; member 76 ChangeRecord(const bool isDeletion, int64_t timestampNs, const string& package, in ChangeRecord() 80 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 | NumericValueMetricProducer.cpp | 171 void NumericValueMetricProducer::pullAndMatchEventsLocked(const int64_t timestampNs) { in pullAndMatchEventsLocked() argument 173 if (!mPullerManager->Pull(mPullAtomId, mConfigKey, timestampNs, &allData)) { in pullAndMatchEventsLocked() 174 ALOGE("Stats puller failed for tag: %d at %lld", mPullAtomId, (long long)timestampNs); in pullAndMatchEventsLocked() 175 invalidateCurrentBucket(timestampNs, BucketDropReason::PULL_FAILED); in pullAndMatchEventsLocked() 179 accumulateEvents(allData, timestampNs, timestampNs); in pullAndMatchEventsLocked()
|
D | GaugeMetricProducer.cpp | 355 for (int64_t timestampNs : elapsedTimestampsNs) { in onDumpReportLocked() local 358 (long long)timestampNs); in onDumpReportLocked() 389 void GaugeMetricProducer::pullAndMatchEventsLocked(const int64_t timestampNs) { in pullAndMatchEventsLocked() argument 410 if (!mPullerManager->Pull(mPullTagId, mConfigKey, timestampNs, &allData)) { in pullAndMatchEventsLocked() 411 ALOGE("Gauge Stats puller failed for tag: %d at %lld", mPullTagId, (long long)timestampNs); in pullAndMatchEventsLocked() 414 const int64_t pullDelayNs = getElapsedRealtimeNs() - timestampNs; in pullAndMatchEventsLocked() 426 localCopy.setElapsedTimestampNs(timestampNs); in pullAndMatchEventsLocked()
|
D | MetricsManager.h | 63 int64_t timestampNs, 67 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/src/external/ |
D | StatsPuller.cpp | 121 int StatsPuller::ClearCacheIfNecessary(int64_t timestampNs) { in ClearCacheIfNecessary() argument 122 if (timestampNs - mLastPullTimeNs > mCoolDownNs) { in ClearCacheIfNecessary()
|
/packages/modules/StatsD/apex/tests/libstatspull/src/com/android/internal/os/statsd/libstats/ |
D | StatsConfigUtils.java | 138 for (long timestampNs : atomInfo.getElapsedTimestampNanosList()) { in backFillGaugeBucketAtoms() 139 atomTimestamp.add(Pair.create(atomInfo.getAtom(), timestampNs)); in backFillGaugeBucketAtoms() local
|
/packages/modules/StatsD/statsd/src/shell/ |
D | ShellSubscriberClient.cpp | 191 const int64_t timestampNs = truncateTimestampIfNecessary(eventRef); in writeEventToProtoIfMatched() local 194 static_cast<long long>(timestampNs)); in writeEventToProtoIfMatched() 197 mCacheSize += getSize(eventRef.getValues()) + sizeof(timestampNs); in writeEventToProtoIfMatched()
|
/packages/modules/StatsD/lib/libstatssocket/ |
D | stats_event.c | 121 void AStatsEvent_overwriteTimestamp(AStatsEvent* event, uint64_t timestampNs) { in AStatsEvent_overwriteTimestamp() argument 122 memcpy(&event->buf[POS_TIMESTAMP + sizeof(uint8_t)], ×tampNs, sizeof(timestampNs)); in AStatsEvent_overwriteTimestamp()
|
/packages/modules/StatsD/statsd/src/config/ |
D | ConfigListener.h | 39 virtual void OnConfigUpdated(int64_t timestampNs, const ConfigKey& key,
|