Removing needless second map lookup
This commit is contained in:
1 parent
c143034c00
commit
3f5d31e036
1 file changed
+2
-3
@@ -316,9 +316,8 @@ void DaggyRunnerTaskExecutor::monitor()
|
|||||||
task["taskName"].GetString());
|
task["taskName"].GetString());
|
||||||
auto it = taskResources.find(tid);
|
auto it = taskResources.find(tid);
|
||||||
if (it != taskResources.end()) {
|
if (it != taskResources.end()) {
|
||||||
const auto &res = taskResources.at(tid);
|
caps.current.cores += it->second.cores;
|
||||||
caps.current.cores += res.cores;
|
caps.current.memoryMB += it->second.memoryMB;
|
||||||
caps.current.memoryMB += res.memoryMB;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto attempt = attemptRecordFromJSON(task["attempt"]);
|
auto attempt = attemptRecordFromJSON(task["attempt"]);
|
||||||
|
|||||||
Reference in new issue
Block a user