diff options
Diffstat (limited to 'src/components/application_manager/src/request_info.cc')
-rw-r--r-- | src/components/application_manager/src/request_info.cc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/components/application_manager/src/request_info.cc b/src/components/application_manager/src/request_info.cc index 80b18a53c6..9a5828d939 100644 --- a/src/components/application_manager/src/request_info.cc +++ b/src/components/application_manager/src/request_info.cc @@ -268,66 +268,6 @@ void RequestInfoSet::CheckSetSizes() { DCHECK(set_sizes_equal); } -bool RequestInfoSet::CheckTimeScaleMaxRequest( - uint32_t app_id, - uint32_t app_time_scale, - uint32_t max_request_per_time_scale) { - LOG4CXX_AUTO_TRACE(logger_); - if (max_request_per_time_scale > 0 && app_time_scale > 0) { - TimevalStruct end = date_time::DateTime::getCurrentTime(); - TimevalStruct start = {0, 0}; - start.tv_sec = end.tv_sec - app_time_scale; - - sync_primitives::AutoLock lock(this_lock_); - TimeScale scale(start, end, app_id); - const uint32_t count = std::count_if(time_sorted_pending_requests_.begin(), - time_sorted_pending_requests_.end(), - scale); - if (count >= max_request_per_time_scale) { - LOG4CXX_WARN(logger_, - "Processing requests count " << count - << " exceed application limit " - << max_request_per_time_scale); - return false; - } - LOG4CXX_DEBUG(logger_, "Requests count " << count); - } else { - LOG4CXX_DEBUG(logger_, "CheckTimeScaleMaxRequest disabled"); - } - return true; -} - -bool RequestInfoSet::CheckHMILevelTimeScaleMaxRequest( - mobile_apis::HMILevel::eType hmi_level, - uint32_t app_id, - uint32_t app_time_scale, - uint32_t max_request_per_time_scale) { - LOG4CXX_AUTO_TRACE(logger_); - if (max_request_per_time_scale > 0 && app_time_scale > 0) { - TimevalStruct end = date_time::DateTime::getCurrentTime(); - TimevalStruct start = {0, 0}; - start.tv_sec = end.tv_sec - app_time_scale; - - sync_primitives::AutoLock lock(this_lock_); - HMILevelTimeScale scale(start, end, app_id, hmi_level); - const uint32_t count = std::count_if(time_sorted_pending_requests_.begin(), - time_sorted_pending_requests_.end(), - scale); - if (count >= max_request_per_time_scale) { - LOG4CXX_WARN(logger_, - "Processing requests count " - << count << " exceed application limit " - << max_request_per_time_scale << " in hmi level " - << hmi_level); - return false; - } - LOG4CXX_DEBUG(logger_, "Requests count " << count); - } else { - LOG4CXX_DEBUG(logger_, "CheckHMILevelTimeScaleMaxRequest disabled"); - } - return true; -} - bool RequestInfoSet::AppIdCompararator::operator()( const RequestInfoPtr value_compare) const { switch (compare_type_) { |