From 6c6c285268671bba441d4cf527e9fa0a588630a6 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 14 Jul 2012 22:25:41 +1000 Subject: [PATCH] Show Khash hashrates when scrypt is in use. --- cgminer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cgminer.c b/cgminer.c index 6002927e..a5529f28 100644 --- a/cgminer.c +++ b/cgminer.c @@ -1372,10 +1372,11 @@ static void get_statline(char *buf, struct cgpu_info *cgpu) cgpu->api->get_statline_before(buf, cgpu); else tailsprintf(buf, " | "); - tailsprintf(buf, "(%ds):%.1f (avg):%.1f Mh/s | A:%d R:%d HW:%d U:%.1f/m", + tailsprintf(buf, "(%ds):%.1f (avg):%.1f %sh/s | A:%d R:%d HW:%d U:%.1f/m", opt_log_interval, cgpu->rolling, cgpu->total_mhashes / total_secs, + opt_scrypt ? "K" : "M", cgpu->accepted, cgpu->rejected, cgpu->hw_errors, @@ -1471,8 +1472,9 @@ static void curses_print_devstatus(int thr_id) adj_width(cgpu->rejected, &rwidth); adj_width(cgpu->hw_errors, &hwwidth); adj_width(cgpu->utility, &uwidth); - wprintw(statuswin, "/%5.1fMh/s | A:%*d R:%*d HW:%*d U:%*.2f/m", + wprintw(statuswin, "/%5.1f%sh/s | A:%*d R:%*d HW:%*d U:%*.2f/m", cgpu->total_mhashes / total_secs, + opt_scrypt ? "K" : "M", awidth, cgpu->accepted, rwidth, cgpu->rejected, hwwidth, cgpu->hw_errors, @@ -4703,7 +4705,7 @@ static void print_summary(void) #endif applog(LOG_WARNING, "Runtime: %d hrs : %d mins : %d secs", hours, mins, secs); if (total_secs) - applog(LOG_WARNING, "Average hashrate: %.1f Megahash/s", total_mhashes_done / total_secs); + applog(LOG_WARNING, "Average hashrate: %.1f %shash/s", total_mhashes_done / total_secs, opt_scrypt? "Kilo" : "Mega"); applog(LOG_WARNING, "Solved blocks: %d", found_blocks); applog(LOG_WARNING, "Queued work requests: %d", total_getworks); applog(LOG_WARNING, "Share submissions: %d", total_accepted + total_rejected);