summaryrefslogtreecommitdiffstats
path: root/xmrstak
diff options
context:
space:
mode:
authorChaosMarc <ChaosMarc@gmx.de>2018-01-05 12:08:12 +0100
committerChaosMarc <ChaosMarc@gmx.de>2018-01-05 12:08:12 +0100
commit78cf4351d9130b7ceac5dca700afdf742111941d (patch)
tree74f310111f6abe212127feb09735317ac2c7b48b /xmrstak
parente43d60731e84fee9cd299719196ae4c3796bc141 (diff)
downloadxmr-stak-78cf4351d9130b7ceac5dca700afdf742111941d.zip
xmr-stak-78cf4351d9130b7ceac5dca700afdf742111941d.tar.gz
#125: separate hashrate sums for each component
Diffstat (limited to 'xmrstak')
-rw-r--r--xmrstak/misc/executor.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp
index f0b6e0e..680f045 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -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)
OpenPOWER on IntegriCloud