• Home
  • Raw
  • Download

Lines Matching refs:bucketNum

60 size_t AnomalyTracker::index(int64_t bucketNum) const {  in index()
61 if (bucketNum < 0) { in index()
62 ALOGE("index() was passed a negative bucket number (%lld)!", (long long)bucketNum); in index()
64 return bucketNum % mNumOfPastBuckets; in index()
67 void AnomalyTracker::advanceMostRecentBucketTo(const int64_t& bucketNum) { in advanceMostRecentBucketTo() argument
72 if (bucketNum <= mMostRecentBucketNum) { in advanceMostRecentBucketTo()
74 (long long)bucketNum, (long long)mMostRecentBucketNum); in advanceMostRecentBucketTo()
78 if (bucketNum >= mMostRecentBucketNum + mNumOfPastBuckets) { in advanceMostRecentBucketTo()
80 mMostRecentBucketNum = bucketNum; in advanceMostRecentBucketTo()
85 for (int64_t i = mMostRecentBucketNum + 1; i <= bucketNum; i++) { in advanceMostRecentBucketTo()
90 mMostRecentBucketNum = bucketNum; in advanceMostRecentBucketTo()
95 const int64_t& bucketNum) { in addPastBucket() argument
98 bucketNum < 0 || bucketNum <= mMostRecentBucketNum - mNumOfPastBuckets) { in addPastBucket()
102 const int bucketIndex = index(bucketNum); in addPastBucket()
103 if (bucketNum <= mMostRecentBucketNum && (mPastBuckets[bucketIndex] != nullptr)) { in addPastBucket()
119 addPastBucket(bucket, bucketNum); in addPastBucket()
124 const int64_t& bucketNum) { in addPastBucket() argument
127 bucketNum < 0 || bucketNum <= mMostRecentBucketNum - mNumOfPastBuckets) { in addPastBucket()
131 if (bucketNum <= mMostRecentBucketNum) { in addPastBucket()
133 subtractBucketFromSum(mPastBuckets[index(bucketNum)]); in addPastBucket()
136 advanceMostRecentBucketTo(bucketNum); in addPastBucket()
138 mPastBuckets[index(bucketNum)] = bucket; in addPastBucket()
175 const int64_t& bucketNum) const { in getPastBucketValue()
176 if (bucketNum < 0 || mMostRecentBucketNum < 0 in getPastBucketValue()
177 || bucketNum <= mMostRecentBucketNum - mNumOfPastBuckets in getPastBucketValue()
178 || bucketNum > mMostRecentBucketNum) { in getPastBucketValue()
182 const auto& bucket = mPastBuckets[index(bucketNum)]; in getPastBucketValue()