Skip to content

Commit d4f4c6e

Browse files
committed
remove useless memory information
1 parent faa8505 commit d4f4c6e

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

KeyFinder/main.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,18 @@ void statusCallback(KeySearchStatus info)
9999

100100
std::string timeStr = "[" + util::formatSeconds((unsigned int)((_config.elapsed + info.totalTime) / 1000)) + "]";
101101

102-
std::string usedMemStr = util::format((info.deviceMemory - info.freeMemory) /(1024 * 1024));
103-
104-
std::string totalMemStr = util::format(info.deviceMemory / (1024 * 1024));
105-
106102
std::string targetStr = util::format(info.targets) + " target" + (info.targets > 1 ? "s" : "");
107103

108-
109104
// Fit device name in 16 characters, pad with spaces if less
110-
std::string devName = info.deviceName.substr(0, 16);
111-
devName += std::string(16 - devName.length(), ' ');
112-
113105
const char *formatStr = NULL;
114106

115107
if(_config.follow) {
116-
formatStr = "%s %s/%sMB | %s %s %s %s\n";
108+
formatStr = "%s %s %s %s\n";
117109
} else {
118-
formatStr = "\r%s %s / %sMB | %s %s %s %s";
110+
formatStr = "\r%s %s %s %s";
119111
}
120112

121-
printf(formatStr, devName.c_str(), usedMemStr.c_str(), totalMemStr.c_str(), targetStr.c_str(), speedStr.c_str(), totalStr.c_str(), timeStr.c_str());
113+
printf(formatStr, targetStr.c_str(), speedStr.c_str(), totalStr.c_str(), timeStr.c_str());
122114

123115
if(_config.checkpointFile.length() > 0) {
124116
uint64_t t = util::getSystemTime();

KeyFinderLib/KeyFinder.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,6 @@ void KeyFinder::run()
186186

187187
info.totalTime = _totalTime;
188188

189-
uint64_t freeMem = 0;
190-
191-
uint64_t totalMem = 0;
192-
193-
_device->getMemoryInfo(freeMem, totalMem);
194-
195-
info.freeMemory = freeMem;
196-
info.deviceMemory = totalMem;
197-
info.deviceName = _device->getDeviceName();
198189
info.targets = _targets.size();
199190
info.nextKey = getNextKey();
200191

KeyFinderLib/KeySearchTypes.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ typedef struct {
2929
double speed;
3030
uint64_t total;
3131
uint64_t totalTime;
32-
std::string deviceName;
33-
uint64_t freeMemory;
34-
uint64_t deviceMemory;
3532
uint64_t targets;
3633
secp256k1::uint256 nextKey;
3734
}KeySearchStatus;

0 commit comments

Comments
 (0)