Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f5ab3ff authored by Bookatz's avatar Bookatz
Browse files

Statsd: Remove storage of bucketNum

Past buckets had a field mBucketNum, storing the
"bucket number" they represented. Currently, the concept
of bucket number is used by Anomaly Detection (although this
may not be necessary), but these stored values are not used at all,
so removing them will save RAM.

Test: statsd tests still pass
Bug: 74607818
Change-Id: Iacc343bc39c5035f6e2f236c03de1d91606eff4c
parent b90670cf
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -249,7 +249,6 @@ void CountMetricProducer::flushCurrentBucketLocked(const uint64_t& eventTimeNs)
    } else {
        info.mBucketEndNs = fullBucketEndTimeNs;
    }
    info.mBucketNum = mCurrentBucketNum;
    for (const auto& counter : *mCurrentSlicedCounter) {
        info.mCount = counter.second;
        auto& bucketList = mPastBuckets[counter.first];
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ struct CountBucket {
    int64_t mBucketStartNs;
    int64_t mBucketEndNs;
    int64_t mCount;
    uint64_t mBucketNum;
};

class CountMetricProducer : public MetricProducer {
+0 −1
Original line number Diff line number Diff line
@@ -393,7 +393,6 @@ void GaugeMetricProducer::flushCurrentBucketLocked(const uint64_t& eventTimeNs)
    } else {
        info.mBucketEndNs = fullBucketEndTimeNs;
    }
    info.mBucketNum = mCurrentBucketNum;

    for (const auto& slice : *mCurrentSlicedBucket) {
        info.mGaugeAtoms = slice.second;
+0 −1
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ struct GaugeBucket {
    int64_t mBucketStartNs;
    int64_t mBucketEndNs;
    std::vector<GaugeAtom> mGaugeAtoms;
    uint64_t mBucketNum;
};

typedef std::unordered_map<MetricDimensionKey, std::vector<GaugeAtom>>
+0 −1
Original line number Diff line number Diff line
@@ -355,7 +355,6 @@ void ValueMetricProducer::flushCurrentBucketLocked(const uint64_t& eventTimeNs)
    } else {
        info.mBucketEndNs = fullBucketEndTimeNs;
    }
    info.mBucketNum = mCurrentBucketNum;

    int tainted = 0;
    for (const auto& slice : mCurrentSlicedBucket) {
Loading