UpdateEngine: removed libstatspull dependency
Bug: 234904116
Test: build & statsd_testdrive
Change-Id: Ia477c7f988dd79f887f49dd0349759a625b44773
diff --git a/aosp/cleanup_previous_update_action.cc b/aosp/cleanup_previous_update_action.cc
index bc92221..2aba9bf 100644
--- a/aosp/cleanup_previous_update_action.cc
+++ b/aosp/cleanup_previous_update_action.cc
@@ -25,7 +25,7 @@
#include <base/bind.h>
#ifndef __ANDROID_RECOVERY__
-#include <statslog.h>
+#include <statslog_ue.h>
#endif
#include "update_engine/common/utils.h"
@@ -513,26 +513,26 @@
<< passed_ms.count() << "ms (resumed " << report.resume_count()
<< " times), using " << report.cow_file_size()
<< " bytes of COW image.";
- android::util::stats_write(android::util::SNAPSHOT_MERGE_REPORTED,
- static_cast<int32_t>(report.state()),
- static_cast<int64_t>(passed_ms.count()),
- static_cast<int32_t>(report.resume_count()),
- vab_retrofit,
- static_cast<int64_t>(report.cow_file_size()),
- vab_compression_enabled,
- vab_compression_used,
- report.total_cow_size_bytes(),
- report.estimated_cow_size_bytes(),
- report.boot_complete_time_ms(),
- report.boot_complete_to_merge_start_time_ms(),
- static_cast<int32_t>(report.merge_failure_code()),
- report.source_build_fingerprint().c_str(),
- target_build_fingerprint.c_str(),
- userspace_snapshots_enabled,
- userspace_snapshots_used,
- xor_compression_enabled,
- xor_compression_used,
- iouring_used);
+ statsd::stats_write(statsd::SNAPSHOT_MERGE_REPORTED,
+ static_cast<int32_t>(report.state()),
+ static_cast<int64_t>(passed_ms.count()),
+ static_cast<int32_t>(report.resume_count()),
+ vab_retrofit,
+ static_cast<int64_t>(report.cow_file_size()),
+ vab_compression_enabled,
+ vab_compression_used,
+ report.total_cow_size_bytes(),
+ report.estimated_cow_size_bytes(),
+ report.boot_complete_time_ms(),
+ report.boot_complete_to_merge_start_time_ms(),
+ static_cast<int32_t>(report.merge_failure_code()),
+ report.source_build_fingerprint().c_str(),
+ target_build_fingerprint.c_str(),
+ userspace_snapshots_enabled,
+ userspace_snapshots_used,
+ xor_compression_enabled,
+ xor_compression_used,
+ iouring_used);
#endif
}
diff --git a/aosp/metrics_reporter_android.cc b/aosp/metrics_reporter_android.cc
index a324fab..d974616 100644
--- a/aosp/metrics_reporter_android.cc
+++ b/aosp/metrics_reporter_android.cc
@@ -29,7 +29,7 @@
#include <libdm/dm.h>
#include <liblp/builder.h>
#include <liblp/liblp.h>
-#include <statslog.h>
+#include <statslog_ue.h>
#include "update_engine/common/constants.h"
#include "update_engine/payload_consumer/install_plan.h"
@@ -132,8 +132,8 @@
bool vab_compression_used =
dynamic_partition_control_->UpdateUsesSnapshotCompression();
- android::util::stats_write(
- android::util::UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED,
+ statsd::stats_write(
+ statsd::UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED,
attempt_number,
GetStatsdEnumValue(static_cast<int32_t>(payload_type)),
duration.InMinutes(),
@@ -177,17 +177,16 @@
total_bytes_downloaded += num_bytes_downloaded[i] / kNumBytesInOneMiB;
}
- android::util::stats_write(
- android::util::UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED,
- static_cast<int32_t>(attempt_count),
- GetStatsdEnumValue(static_cast<int32_t>(payload_type)),
- static_cast<int32_t>(payload_size_mib),
- static_cast<int32_t>(total_bytes_downloaded),
- static_cast<int32_t>(download_overhead_percentage),
- static_cast<int32_t>(total_duration.InMinutes()),
- static_cast<int32_t>(reboot_count),
- IsHashTreeEnabled(install_plan_),
- IsFECEnabled(install_plan_));
+ statsd::stats_write(statsd::UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED,
+ static_cast<int32_t>(attempt_count),
+ GetStatsdEnumValue(static_cast<int32_t>(payload_type)),
+ static_cast<int32_t>(payload_size_mib),
+ static_cast<int32_t>(total_bytes_downloaded),
+ static_cast<int32_t>(download_overhead_percentage),
+ static_cast<int32_t>(total_duration.InMinutes()),
+ static_cast<int32_t>(reboot_count),
+ IsHashTreeEnabled(install_plan_),
+ IsFECEnabled(install_plan_));
}
void MetricsReporterAndroid::ReportAbnormallyTerminatedUpdateAttemptMetrics() {