SWDEV-500382 fix energy consumed
Change-Id: I3f180f34abed763db1287bf01581753534f32828
This commit is contained in:
committed by
Galantsev, Dmitrii
parent
290b90dc89
commit
e8057b1042
@@ -224,6 +224,7 @@ rdc_status_t RdcCacheManagerImpl::rdc_update_job_stats(uint32_t gpu_index,
|
||||
uint64_t time_elapsed = value.ts - gpu_iter->second.energy_last_time;
|
||||
// Stored in cache as microseconds and microwats
|
||||
gpu_iter->second.energy_consumed += (time_elapsed * value.value.l_int) / (1000.0 * 1000000);
|
||||
gpu_iter->second.energy_last_time = value.ts;
|
||||
}
|
||||
fsummary->second.max_value =
|
||||
std::max(fsummary->second.max_value, static_cast<int64_t>(value.value.l_int));
|
||||
|
||||
Reference in New Issue
Block a user