Skip to content

Commit

Permalink
limit per gpu hashrate logs to 3 sec intervals
Browse files Browse the repository at this point in the history
may be required for very fast algos, like blake2s
  • Loading branch information
tpruvot committed Dec 21, 2016
1 parent 44bd244 commit 671030f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,7 @@ static void *miner_thread(void *userdata)

while (!abort_flag) {
struct timeval tv_start, tv_end, diff;
time_t tm_rate_log = 0;
unsigned long hashes_done;
uint32_t start_nonce;
uint32_t scan_time = have_longpoll ? LP_SCANTIME : opt_scantime;
Expand Down Expand Up @@ -2302,9 +2303,10 @@ static void *miner_thread(void *userdata)
hashlog_remember_scan_range(&work);

/* output */
if (!opt_quiet && loopcnt > 1) {
if (!opt_quiet && loopcnt > 1 && (time(NULL) - tm_rate_log) > 3) {
format_hashrate(thr_hashrates[thr_id], s);
gpulog(LOG_INFO, thr_id, "%s, %s", device_name[dev_id], s);
tm_rate_log = time(NULL);
}

/* ignore first loop hashrate */
Expand Down

0 comments on commit 671030f

Please sign in to comment.