Loading cmds/statsd/src/HashableDimensionKey.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,10 @@ bool LessThan(const vector<FieldValue>& s1, const vector<FieldValue>& s2) { return false; } bool HashableDimensionKey::operator!=(const HashableDimensionKey& that) const { return !((*this) == that); } bool HashableDimensionKey::operator==(const HashableDimensionKey& that) const { if (mValues.size() != that.getValues().size()) { return false; Loading cmds/statsd/src/HashableDimensionKey.h +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ public: std::string toString() const; bool operator!=(const HashableDimensionKey& that) const; bool operator==(const HashableDimensionKey& that) const; bool operator<(const HashableDimensionKey& that) const; Loading cmds/statsd/src/StatsLogProcessor.h +4 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,10 @@ private: FRIEND_TEST(DurationMetricE2eTest, TestWithCondition); FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedCondition); FRIEND_TEST(DurationMetricE2eTest, TestWithActivationAndSlicedCondition); FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState); FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithDimensions); FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithIncorrectDimensions); }; } // namespace statsd Loading cmds/statsd/src/metrics/CountMetricProducer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -277,8 +277,8 @@ bool CountMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) { void CountMetricProducer::onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, const ConditionKey& conditionKey, bool condition, const LogEvent& event) { const ConditionKey& conditionKey, bool condition, const LogEvent& event, const map<int, HashableDimensionKey>& statePrimaryKeys) { int64_t eventTimeNs = event.GetElapsedTimestampNs(); flushIfNeededLocked(eventTimeNs); Loading cmds/statsd/src/metrics/CountMetricProducer.h +2 −2 Original line number Diff line number Diff line Loading @@ -59,8 +59,8 @@ public: protected: void onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, const ConditionKey& conditionKey, bool condition, const LogEvent& event) override; const ConditionKey& conditionKey, bool condition, const LogEvent& event, const std::map<int, HashableDimensionKey>& statePrimaryKeys) override; private: Loading Loading
cmds/statsd/src/HashableDimensionKey.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,10 @@ bool LessThan(const vector<FieldValue>& s1, const vector<FieldValue>& s2) { return false; } bool HashableDimensionKey::operator!=(const HashableDimensionKey& that) const { return !((*this) == that); } bool HashableDimensionKey::operator==(const HashableDimensionKey& that) const { if (mValues.size() != that.getValues().size()) { return false; Loading
cmds/statsd/src/HashableDimensionKey.h +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ public: std::string toString() const; bool operator!=(const HashableDimensionKey& that) const; bool operator==(const HashableDimensionKey& that) const; bool operator<(const HashableDimensionKey& that) const; Loading
cmds/statsd/src/StatsLogProcessor.h +4 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,10 @@ private: FRIEND_TEST(DurationMetricE2eTest, TestWithCondition); FRIEND_TEST(DurationMetricE2eTest, TestWithSlicedCondition); FRIEND_TEST(DurationMetricE2eTest, TestWithActivationAndSlicedCondition); FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState); FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithDimensions); FRIEND_TEST(ValueMetricE2eTest, TestInitWithSlicedState_WithIncorrectDimensions); }; } // namespace statsd Loading
cmds/statsd/src/metrics/CountMetricProducer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -277,8 +277,8 @@ bool CountMetricProducer::hitGuardRailLocked(const MetricDimensionKey& newKey) { void CountMetricProducer::onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, const ConditionKey& conditionKey, bool condition, const LogEvent& event) { const ConditionKey& conditionKey, bool condition, const LogEvent& event, const map<int, HashableDimensionKey>& statePrimaryKeys) { int64_t eventTimeNs = event.GetElapsedTimestampNs(); flushIfNeededLocked(eventTimeNs); Loading
cmds/statsd/src/metrics/CountMetricProducer.h +2 −2 Original line number Diff line number Diff line Loading @@ -59,8 +59,8 @@ public: protected: void onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, const ConditionKey& conditionKey, bool condition, const LogEvent& event) override; const ConditionKey& conditionKey, bool condition, const LogEvent& event, const std::map<int, HashableDimensionKey>& statePrimaryKeys) override; private: Loading