Limit metricslogger call into statsdw for events
Histogram and counters are not in the scope of the migration into statsd. Therefore, we can optimize the statsd socket by not propagating histogram and counter based metricslogger calls. Test: compiles & boots Change-Id: I1fe277bcef438c6aceb2b674d6aec5fe0f48a270
This commit is contained in:
@@ -55,8 +55,11 @@ public class MetricsLogger {
|
||||
protected void saveLog(LogMaker log) {
|
||||
// TODO(b/116684537): Flag guard logging to event log and statsd socket.
|
||||
EventLogTags.writeSysuiMultiAction(log.serialize());
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.KEY_VALUE_PAIRS_ATOM,
|
||||
/* UID is retrieved from statsd side */ 0, log.getEntries());
|
||||
if (log.getCategory() != MetricsEvent.RESERVED_FOR_LOGBUILDER_COUNTER
|
||||
&& log.getCategory() != MetricsEvent.RESERVED_FOR_LOGBUILDER_HISTOGRAM) {
|
||||
FrameworkStatsLog.write(FrameworkStatsLog.KEY_VALUE_PAIRS_ATOM,
|
||||
/* UID is retrieved from statsd side */ 0, log.getEntries());
|
||||
}
|
||||
}
|
||||
|
||||
public static final int VIEW_UNKNOWN = MetricsEvent.VIEW_UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user