diff options
Diffstat (limited to 'storaged/include/storaged.h')
-rw-r--r-- | storaged/include/storaged.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/storaged/include/storaged.h b/storaged/include/storaged.h index 7e5048fc4..a16be27db 100644 --- a/storaged/include/storaged.h +++ b/storaged/include/storaged.h @@ -257,6 +257,7 @@ public: #define DEFAULT_PERIODIC_CHORES_INTERVAL_DISK_STATS_PUBLISH ( 3600 ) #define DEFAULT_PERIODIC_CHORES_INTERVAL_EMMC_INFO_PUBLISH ( 86400 ) #define DEFAULT_PERIODIC_CHORES_INTERVAL_UID_IO ( 3600 ) +#define DEFAULT_PERIODIC_CHORES_INTERVAL_UID_IO_LIMIT (300) // UID IO threshold in bytes #define DEFAULT_PERIODIC_CHORES_UID_IO_THRESHOLD ( 1024 * 1024 * 1024ULL ) @@ -300,8 +301,14 @@ public: std::unordered_map<uint32_t, struct uid_info> get_uids(void) { return mUidm.get_uid_io_stats(); } - std::map<uint64_t, std::vector<struct uid_record>> get_uid_records(int hours) { - return mUidm.dump(hours); + std::map<uint64_t, std::vector<struct uid_record>> get_uid_records( + int hours, uint64_t threshold) { + return mUidm.dump(hours, threshold); + } + void update_uid_io_interval(int interval) { + if (interval >= DEFAULT_PERIODIC_CHORES_INTERVAL_UID_IO_LIMIT) { + mConfig.periodic_chores_interval_uid_io = interval; + } } void init_battery_service(); |