Increase the top N stats per catergory/sub-category.
Bug: 155438857
Test: Tests pass. Carwatchdog dump lists top 10 stats per category and
top 5 stats per sub-category.
Change-Id: Ibe5f3f5fc338c6cad2397ecd9192dc7469518dfe
diff --git a/watchdog/server/Android.bp b/watchdog/server/Android.bp
index 71da2db..e50b24a 100644
--- a/watchdog/server/Android.bp
+++ b/watchdog/server/Android.bp
@@ -143,7 +143,7 @@
init_rc: ["carwatchdogd.rc"],
shared_libs: [
"libwatchdog_binder_mediator",
- "libwatchdog_ioperfcollection",
+ "libwatchdog_ioperfcollection",
"libwatchdog_process_service",
],
vintf_fragments: ["carwatchdogd.xml"],
diff --git a/watchdog/server/carwatchdogd.rc b/watchdog/server/carwatchdogd.rc
index e75f21a..c2eb104 100644
--- a/watchdog/server/carwatchdogd.rc
+++ b/watchdog/server/carwatchdogd.rc
@@ -35,10 +35,10 @@
on early-init
# Number of top stats per category
- setprop ro.carwatchdog.top_n_stats_per_category 5
+ setprop ro.carwatchdog.top_n_stats_per_category 10
# Number of top stats per sub-category
- setprop ro.carwatchdog.top_n_stats_per_subcategory 3
+ setprop ro.carwatchdog.top_n_stats_per_subcategory 5
# Cache size for the periodically collected records
setprop ro.carwatchdog.periodic_collection_buffer_size 180
diff --git a/watchdog/server/src/IoPerfCollection.cpp b/watchdog/server/src/IoPerfCollection.cpp
index 63d47ef..e3f3275 100644
--- a/watchdog/server/src/IoPerfCollection.cpp
+++ b/watchdog/server/src/IoPerfCollection.cpp
@@ -56,8 +56,8 @@
namespace {
-const int32_t kDefaultTopNStatsPerCategory = 5;
-const int32_t kDefaultTopNStatsPerSubcategory = 3;
+const int32_t kDefaultTopNStatsPerCategory = 10;
+const int32_t kDefaultTopNStatsPerSubcategory = 5;
const std::chrono::seconds kDefaultBoottimeCollectionInterval = 1s;
const std::chrono::seconds kDefaultPeriodicCollectionInterval = 10s;
// Number of periodic collection perf data snapshots to cache in memory.
diff --git a/watchdog/server/tests/LooperStub.cpp b/watchdog/server/tests/LooperStub.cpp
index a8fc4f9..1b7aa82 100644
--- a/watchdog/server/tests/LooperStub.cpp
+++ b/watchdog/server/tests/LooperStub.cpp
@@ -32,7 +32,7 @@
using android::base::Result;
const std::chrono::milliseconds kLooperPollTimeout = 10ms;
-const std::chrono::milliseconds kStubPollCheckTimeout = 100ms;
+const std::chrono::milliseconds kStubPollCheckTimeout = 200ms;
int LooperStub::pollAll(int /*timeoutMillis*/) {
{