Small bug fixes
This commit is contained in:
@@ -146,9 +146,8 @@ std::future<AttemptRecord> DaggyRunnerTaskExecutor::execute(
|
||||
auto curCap = capacityFromJSON(doc["current"]);
|
||||
auto totCap = capacityFromJSON(doc["total"]);
|
||||
|
||||
ssize_t cores = curCap.cores < 0 ? totCap.cores : curCap.cores;
|
||||
ssize_t memoryMB =
|
||||
curCap.memoryMB < 0 ? totCap.memoryMB : curCap.memoryMB;
|
||||
double cores = curCap.cores < 0 ? totCap.cores : curCap.cores;
|
||||
double memoryMB = curCap.memoryMB < 0 ? totCap.memoryMB : curCap.memoryMB;
|
||||
|
||||
double impact =
|
||||
std::max(taskUsed.cores / cores, taskUsed.memoryMB / memoryMB);
|
||||
@@ -170,6 +169,7 @@ std::future<AttemptRecord> DaggyRunnerTaskExecutor::execute(
|
||||
|
||||
auto cit = impacts.begin();
|
||||
for (auto it = impacts.begin(); it != impacts.end(); ++it) {
|
||||
std::cout << it->first << " impact is " << it->second << std::endl;
|
||||
if (it->second < cit->second)
|
||||
cit = it;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user