Loading storaged/binder/android/os/IStoraged.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,5 @@ package android.os; interface IStoraged { void onUserStarted(int userId); void onUserStopped(int userId); int getRecentPerf(); } No newline at end of file storaged/include/storaged.h +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ class storaged_t : public android::hardware::health::V2_0::IHealthInfoCallback, return storage_info->get_perf_history(); } uint32_t get_recent_perf(void) { return storage_info->get_recent_perf(); } map<uint64_t, struct uid_records> get_uid_records( double hours, uint64_t threshold, bool force_report) { return mUidm.dump(hours, threshold, force_report); Loading storaged/include/storaged_info.h +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ class storage_info_t { void update_perf_history(uint32_t bw, const time_point<system_clock>& tp); vector<int> get_perf_history(); uint32_t get_recent_perf(); }; class emmc_info_t : public storage_info_t { Loading storaged/include/storaged_service.h +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public: binder::Status onUserStarted(int32_t userId); binder::Status onUserStopped(int32_t userId); binder::Status getRecentPerf(int32_t* _aidl_return); }; class StoragedPrivateService : public BinderService<StoragedPrivateService>, public BnStoragedPrivate { Loading storaged/storaged_info.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,13 @@ vector<int> storage_info_t::get_perf_history() return ret; } uint32_t storage_info_t::get_recent_perf() { Mutex::Autolock _l(si_mutex); if (recent_perf.size() == 0) return 0; return accumulate(recent_perf.begin(), recent_perf.end(), recent_perf.size() / 2) / recent_perf.size(); } void emmc_info_t::report() { if (!report_sysfs() && !report_debugfs()) Loading Loading
storaged/binder/android/os/IStoraged.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,5 @@ package android.os; interface IStoraged { void onUserStarted(int userId); void onUserStopped(int userId); int getRecentPerf(); } No newline at end of file
storaged/include/storaged.h +2 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,8 @@ class storaged_t : public android::hardware::health::V2_0::IHealthInfoCallback, return storage_info->get_perf_history(); } uint32_t get_recent_perf(void) { return storage_info->get_recent_perf(); } map<uint64_t, struct uid_records> get_uid_records( double hours, uint64_t threshold, bool force_report) { return mUidm.dump(hours, threshold, force_report); Loading
storaged/include/storaged_info.h +1 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ class storage_info_t { void update_perf_history(uint32_t bw, const time_point<system_clock>& tp); vector<int> get_perf_history(); uint32_t get_recent_perf(); }; class emmc_info_t : public storage_info_t { Loading
storaged/include/storaged_service.h +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public: binder::Status onUserStarted(int32_t userId); binder::Status onUserStopped(int32_t userId); binder::Status getRecentPerf(int32_t* _aidl_return); }; class StoragedPrivateService : public BinderService<StoragedPrivateService>, public BnStoragedPrivate { Loading
storaged/storaged_info.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,13 @@ vector<int> storage_info_t::get_perf_history() return ret; } uint32_t storage_info_t::get_recent_perf() { Mutex::Autolock _l(si_mutex); if (recent_perf.size() == 0) return 0; return accumulate(recent_perf.begin(), recent_perf.end(), recent_perf.size() / 2) / recent_perf.size(); } void emmc_info_t::report() { if (!report_sysfs() && !report_debugfs()) Loading