#125: separate hashrate sums for each component

This commit is contained in:
ChaosMarc
2018-01-05 12:08:12 +01:00
parent e43d60731e
commit 78cf4351d9
+15 -6
View File
@@ -761,6 +761,7 @@ void executor::hashrate_report(std::string& out)
else
out.append(1, '\n');
double fTotalCur[3] = { 0.0, 0.0, 0.0};
for (i = 0; i < nthd; i++)
{
double fHps[3];
@@ -779,6 +780,10 @@ void executor::hashrate_report(std::string& out)
fTotal[0] += fHps[0];
fTotal[1] += fHps[1];
fTotal[2] += fHps[2];
fTotalCur[0] += fHps[0];
fTotalCur[1] += fHps[1];
fTotalCur[2] += fHps[2];
if((i & 0x1) == 1) //Odd i's
out.append("|\n");
@@ -786,21 +791,25 @@ void executor::hashrate_report(std::string& out)
if((i & 0x1) == 1) //We had odd number of threads
out.append("|\n");
if(nthd != 1)
out.append("-----------------------------------------------------\n");
else
out.append("---------------------------\n");
out.append("Totals (").append(name).append("): ");
out.append(hps_format(fTotalCur[0], num, sizeof(num)));
out.append(hps_format(fTotalCur[1], num, sizeof(num)));
out.append(hps_format(fTotalCur[2], num, sizeof(num)));
out.append(" H/s\n");
out.append("-----------------------------------------------------------------\n");
}
}
out.append("Totals: ");
out.append("Totals (ALL): ");
out.append(hps_format(fTotal[0], num, sizeof(num)));
out.append(hps_format(fTotal[1], num, sizeof(num)));
out.append(hps_format(fTotal[2], num, sizeof(num)));
out.append(" H/s\nHighest: ");
out.append(hps_format(fHighestHps, num, sizeof(num)));
out.append(" H/s\n");
out.append("-----------------------------------------------------------------\n");
}
char* time_format(char* buf, size_t len, std::chrono::system_clock::time_point time)