Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39ebc219 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Persist UID stats, lazy loading, resize buckets.

Persisting detailed UID stats in separate "netstats_detail.bin" file
to enable different schedules for summary and detail polling.  Only
load detailed UID history on demand, since it's not needed during
boot.  Add test to verify UID stats are persisted across simulated
reboot.

Move external settings into well-named interface, which is still
backed by Settings.Secure.  During periodic poll events, resize any
history to match current bucket duration setting.  Test to verify.

Change-Id: I6366f3583a591f8ba859b0e5987daf8cafa4e95a
parent 13010be7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -3800,13 +3800,13 @@ public final class Settings {
        /** {@hide} */
        public static final String NETSTATS_PERSIST_THRESHOLD = "netstats_persist_threshold";
        /** {@hide} */
        public static final String NETSTATS_SUMMARY_BUCKET_DURATION = "netstats_summary_bucket_duration";
        public static final String NETSTATS_NETWORK_BUCKET_DURATION = "netstats_network_bucket_duration";
        /** {@hide} */
        public static final String NETSTATS_SUMMARY_MAX_HISTORY = "netstats_summary_max_history";
        public static final String NETSTATS_NETWORK_MAX_HISTORY = "netstats_network_max_history";
        /** {@hide} */
        public static final String NETSTATS_DETAIL_BUCKET_DURATION = "netstats_detail_bucket_duration";
        public static final String NETSTATS_UID_BUCKET_DURATION = "netstats_uid_bucket_duration";
        /** {@hide} */
        public static final String NETSTATS_DETAIL_MAX_HISTORY = "netstats_detail_max_history";
        public static final String NETSTATS_UID_MAX_HISTORY = "netstats_uid_max_history";

        /**
         * @hide