mirror of
https://github.com/Qortal/qortal.git
synced 2025-04-29 22:37:52 +00:00
Include hashrate in logs for easy comparison between different hardware specs
This commit is contained in:
parent
4f8721e629
commit
e59abe1b14
@ -77,8 +77,10 @@ public class OnlineAccountsManager extends Thread {
|
|||||||
|
|
||||||
byte[] bytes = Longs.toByteArray(timestamp);
|
byte[] bytes = Longs.toByteArray(timestamp);
|
||||||
Integer nonce = MemoryPoW.compute2(bytes, POW_BUFFER_SIZE, difficulty);
|
Integer nonce = MemoryPoW.compute2(bytes, POW_BUFFER_SIZE, difficulty);
|
||||||
|
long totalTime = System.currentTimeMillis() - timestamp;
|
||||||
|
double hashRate = nonce / (double)totalTime * 1000.0f;
|
||||||
|
|
||||||
LOGGER.info("Computed nonce: {}. Time taken: {} ms", nonce, (System.currentTimeMillis() - timestamp));
|
LOGGER.info("Computed nonce: {}. Time taken: {} ms. Hashrate: {}", nonce, totalTime, hashRate);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user