Fix statsd dropping metrics data.

We can increase the buffer of metrics we store in statsd memory, but
we still request the clients to call getData when the metrics memory
exceeds 128 KB (previously was 90% of 128 KB).

Bug: 76171061
Test: Test that unit-tests still pass.
Change-Id: I901545b364ed313af8c033ce9b40d3cfadb93213
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index c42514a..a4f64dd 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -96,9 +96,13 @@
 
     const static int kMaxLogSourceCount = 50;
 
-    // Max memory allowed for storing metrics per configuration. When this limit is approached,
-    // statsd will send a broadcast so that the client can fetch the data and clear this memory.
-    static const size_t kMaxMetricsBytesPerConfig = 128 * 1024;
+    // Max memory allowed for storing metrics per configuration. If this limit is exceeded, statsd
+    // drops the metrics data in memory.
+    static const size_t kMaxMetricsBytesPerConfig = 256 * 1024;
+
+    // Soft memory limit per configuration. Once this limit is exceeded, we begin notifying the
+    // data subscriber that it's time to call getData.
+    static const size_t kBytesPerConfigTriggerGetData = 128 * 1024;
 
     // Cap the UID map's memory usage to this. This should be fairly high since the UID information
     // is critical for understanding the metrics.