diff options
author | Ziyi Cui <ziyic@google.com> | 2023-01-26 02:39:32 +0000 |
---|---|---|
committer | Ziyi Cui <ziyic@google.com> | 2023-01-26 21:03:49 +0000 |
commit | 4fcdaf781fb173f2d318df1b32abd76ad280e6c5 (patch) | |
tree | 7376247af71cbd98fa22ec828f64a9d44c0ae4a1 | |
parent | bcd846dcba14eb4df5eedf7a48fb8d78051fa99a (diff) |
pixelstats: Skip uploading atom metrics if device UART enabled
For long irq atom and resume latency atom, we skip upload if device UART
enabled.
Test: To see if uart enable
adb shell getprop | grep init
To verify if atom uploading data
adb shell cmd stats print-stats | grep 105043
Bug: 266465677
Change-Id: I32c9fd9ffeecb33fd35ab181d19f400518a7f743
Signed-off-by: Ziyi Cui <ziyic@google.com>
-rw-r--r-- | pixelstats/SysfsCollector.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pixelstats/SysfsCollector.cpp b/pixelstats/SysfsCollector.cpp index 203ff0f..69e345b 100644 --- a/pixelstats/SysfsCollector.cpp +++ b/pixelstats/SysfsCollector.cpp @@ -1058,6 +1058,10 @@ void SysfsCollector::logVendorAudioHardwareStats(const std::shared_ptr<IStats> & * Logs the Resume Latency stats. */ void SysfsCollector::logVendorResumeLatencyStats(const std::shared_ptr<IStats> &stats_client) { + std::string uart_enabled = android::base::GetProperty("init.svc.console", ""); + if (uart_enabled == "running") { + return; + } std::string file_contents; if (!kResumeLatencyMetricsPath) { ALOGE("ResumeLatencyMetrics path not specified"); @@ -1182,6 +1186,10 @@ void process_irqatom_values(std::vector<std::pair<int, int64_t>> sorted_pair, * Logs the Long irq stats. */ void SysfsCollector::logVendorLongIRQStatsReported(const std::shared_ptr<IStats> &stats_client) { + std::string uart_enabled = android::base::GetProperty("init.svc.console", ""); + if (uart_enabled == "running") { + return; + } std::string file_contents; if (!kLongIRQMetricsPath) { ALOGV("LongIRQ path not specified"); |