Implement the stats subsystem in rdci

Add support for the stats subsystem in rdci
Modify the dmon system to handle the case when no GPUs in a group

Change-Id: I5a18e1201d24b5318b8e324a77551a757b108f25
This commit is contained in:
Bill(Shuzhou) Liu
2020-04-21 09:48:14 -04:00
committed by Chris Freehill
parent 1b58033183
commit 096dc2dadb
7 changed files with 369 additions and 5 deletions
+3 -1
View File
@@ -257,7 +257,7 @@ rdc_status_t RdcCacheManagerImpl::rdc_job_get_stats(char jobId[64],
}
//< Init the summary info
RDC_LOG(RDC_DEBUG, "rdc_job_get_stats for job " <<jobId);
RDC_LOG(RDC_DEBUG, "rdc_job_get_stats for job " << jobId);
auto& summary_info = p_job_info->summary;
summary_info.start_time = job_stats->second.start_time;
if (job_stats->second.end_time == 0) {
@@ -340,6 +340,8 @@ rdc_status_t RdcCacheManagerImpl::rdc_job_start_stats(char job_id[64],
}
std::lock_guard<std::mutex> guard(cache_mutex_);
// Remove the old stats if it exists
cache_jobs_.erase(job_id);
cache_jobs_.insert({job_id, cacheEntry});
return RDC_ST_OK;
}