Revert "Thread-safe metric producers."
This reverts commit 8de6939c494da838f6dbbda0631f66425dbbd25b.
Change-Id: Ieae841bfc5339b569f0fca909a6066de72806617
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.h b/cmds/statsd/src/metrics/ValueMetricProducer.h
index e87e9da..a024bd8 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.h
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.h
@@ -72,16 +72,6 @@
void startNewProtoOutputStream(long long timestamp) override;
private:
- void onMatchedLogEventInternal_pull(const uint64_t& eventTimeNs,
- const HashableDimensionKey& eventKey, const long& value,
- bool scheduledPull);
- void onMatchedLogEventInternal_push(const uint64_t& eventTimeNs,
- const HashableDimensionKey& eventKey, const long& value);
-
- void SerializeBuckets();
-
- bool IsConditionMet() const;
-
const ValueMetric mMetric;
std::shared_ptr<StatsPullerManager> mStatsPullerManager;
@@ -92,6 +82,8 @@
const int pullTagId, const uint64_t startTimeNs,
std::shared_ptr<StatsPullerManager> statsPullerManager);
+ Mutex mLock;
+
// tagId for pulled data. -1 if this is not pulled
const int mPullTagId;
@@ -110,7 +102,7 @@
// TODO: Add a lock to mPastBuckets.
std::unordered_map<HashableDimensionKey, std::vector<ValueBucket>> mPastBuckets;
- long get_value(const LogEvent& event) const;
+ long get_value(const LogEvent& event);
bool hitGuardRail(const HashableDimensionKey& newKey);