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

Commit 14b1f3ed authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "use running sum for ValueMetricProducer bucket simplify...

Merge "use running sum for ValueMetricProducer bucket simplify ValueMetricProducer logic for pulled data"
parents 4c59b32d a7259abd
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -105,6 +105,11 @@ public:
     */
    void init();

    /**
     * Set timestamp if the original timestamp is missing.
     */
    void setTimestampNs(uint64_t timestampNs) {mTimestampNs = timestampNs;}

private:
    /**
     * Don't copy, it's slower. If we really need this we can add it but let's try to
+1 −1
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ bool CountMetricProducer::hitGuardRailLocked(const HashableDimensionKey& newKey)
void CountMetricProducer::onMatchedLogEventInternalLocked(
        const size_t matcherIndex, const HashableDimensionKey& eventKey,
        const map<string, HashableDimensionKey>& conditionKey, bool condition,
        const LogEvent& event, bool scheduledPull) {
        const LogEvent& event) {
    uint64_t eventTimeNs = event.GetTimestampNs();

    flushIfNeededLocked(eventTimeNs);
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ protected:
    void onMatchedLogEventInternalLocked(
            const size_t matcherIndex, const HashableDimensionKey& eventKey,
            const std::map<std::string, HashableDimensionKey>& conditionKey, bool condition,
            const LogEvent& event, bool scheduledPull) override;
            const LogEvent& event) override;

private:
    void onDumpReportLocked(const uint64_t dumpTimeNs,
+1 −1
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ bool DurationMetricProducer::hitGuardRailLocked(const HashableDimensionKey& newK
void DurationMetricProducer::onMatchedLogEventInternalLocked(
        const size_t matcherIndex, const HashableDimensionKey& eventKey,
        const map<string, HashableDimensionKey>& conditionKeys, bool condition,
        const LogEvent& event, bool scheduledPull) {
        const LogEvent& event) {
    flushIfNeededLocked(event.GetTimestampNs());

    if (matcherIndex == mStopAllIndex) {
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ protected:
    void onMatchedLogEventInternalLocked(
            const size_t matcherIndex, const HashableDimensionKey& eventKey,
            const std::map<std::string, HashableDimensionKey>& conditionKeys, bool condition,
            const LogEvent& event, bool scheduledPull) override;
            const LogEvent& event) override;

private:
    void onDumpReportLocked(const uint64_t dumpTimeNs,
Loading