diff --git a/ccminer.cpp b/ccminer.cpp index 463b853..3a0acf6 100644 --- a/ccminer.cpp +++ b/ccminer.cpp @@ -1491,7 +1491,15 @@ static void *miner_thread(void *userdata) if (remain < 0) { app_exit_code = EXIT_CODE_TIME_LIMIT; abort_flag = true; - applog(LOG_NOTICE, "Mining timeout of %ds reached, exiting...", opt_time_limit); + if (opt_benchmark) { + char rate[32]; + format_hashrate(global_hashrate, rate); + applog(LOG_NOTICE, "Benchmark: %s", rate); + usleep(200*1000); + fprintf(stderr, "%llu\n", (long long unsigned int) global_hashrate); + } else { + applog(LOG_NOTICE, "Mining timeout of %ds reached, exiting...", opt_time_limit); + } workio_abort(); break; } @@ -2909,7 +2917,8 @@ int main(int argc, char *argv[]) /* main loop - simply wait for workio thread to exit */ pthread_join(thr_info[work_thr_id].pth, NULL); - applog(LOG_INFO, "workio thread dead, exiting."); + if (opt_debug) + applog(LOG_DEBUG, "workio thread dead, exiting."); proper_exit(EXIT_CODE_OK); diff --git a/util.cpp b/util.cpp index 2d9ae05..a51537f 100644 --- a/util.cpp +++ b/util.cpp @@ -139,8 +139,8 @@ void applog(int prio, const char *fmt, ...) use_colors ? CL_N : "" ); pthread_mutex_lock(&applog_lock); - vfprintf(stderr, f, ap); /* atomic write to stderr */ - fflush(stderr); + vfprintf(stdout, f, ap); /* atomic write to stdout */ + fflush(stdout); pthread_mutex_unlock(&applog_lock); } va_end(ap);