-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Users would like a way to get the current hash rates from the running daemon. Since it's calculated from within each thread, it's likely that it will need to be a mutex locked map that is updated when each thread calculates it's hash. Each thread will need a unique identifier; and their entry in the map removed during thread teardown.
Two routes could be done; either place the latest calculated hash in the map; or place the time and count used to calculate the hash into the map. The latter would be better to get an accurate total, rather than adding the hashes together.
cli can lock, copy the map, and unlock; then process.
generate json output that gives the total hashrate, and an optional 'true' for details on the indiividual hashrates.
for testing, the individual hashrates reported should match the last hashrate reported to the debug log from each thread.