Browse Source

Introduce a new statistic, Work Utility, which is the number of difficulty 1 shares solved per minute. This is useful for measuring a relative rate of work that is independent of reject rate and target difficulty.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
ed3eb5771a
  1. 3
      README
  2. 11
      cgminer.c

3
README

@ -387,7 +387,7 @@ The number of hardware erorrs
The utility defines as the number of shares / minute The utility defines as the number of shares / minute
The cgminer status line shows: The cgminer status line shows:
TQ: 1 ST: 1 SS: 0 DW: 0 NB: 1 LW: 8 GF: 1 RF: 1 TQ: 1 ST: 1 SS: 0 DW: 0 NB: 1 LW: 8 GF: 1 RF: 1 WU:4.4/m
TQ is Total Queued work items. TQ is Total Queued work items.
ST is STaged work items (ready to use). ST is STaged work items (ready to use).
@ -397,6 +397,7 @@ NB is New Blocks detected on the network
LW is Locally generated Work items LW is Locally generated Work items
GF is Getwork Fail Occasions (server slow to provide work) GF is Getwork Fail Occasions (server slow to provide work)
RF is Remote Fail occasions (server slow to accept work) RF is Remote Fail occasions (server slow to accept work)
WU is Work Utility (Rate of difficulty 1 shares solved per minute)
NOTE: Running intensities above 9 with current hardware is likely to only NOTE: Running intensities above 9 with current hardware is likely to only
diminish return performance even if the hash rate might appear better. A good diminish return performance even if the hash rate might appear better. A good

11
cgminer.c

@ -187,7 +187,7 @@ static struct timeval total_tv_start, total_tv_end;
pthread_mutex_t control_lock; pthread_mutex_t control_lock;
int hw_errors; int hw_errors;
int total_accepted, total_rejected; int total_accepted, total_rejected, total_diff1;
int total_getworks, total_stale, total_discarded; int total_getworks, total_stale, total_discarded;
static int total_queued, staged_rollable; static int total_queued, staged_rollable;
unsigned int new_blocks; unsigned int new_blocks;
@ -1461,9 +1461,9 @@ static void curses_print_status(void)
mvwhline(statuswin, 1, 0, '-', 80); mvwhline(statuswin, 1, 0, '-', 80);
mvwprintw(statuswin, 2, 0, " %s", statusline); mvwprintw(statuswin, 2, 0, " %s", statusline);
wclrtoeol(statuswin); wclrtoeol(statuswin);
mvwprintw(statuswin, 3, 0, " TQ: %d ST: %d SS: %d DW: %d NB: %d LW: %d GF: %d RF: %d", mvwprintw(statuswin, 3, 0, " TQ: %d ST: %d SS: %d DW: %d NB: %d LW: %d GF: %d RF: %d WU: %.1f",
global_queued(), total_staged(), total_stale, total_discarded, new_blocks, global_queued(), total_staged(), total_stale, total_discarded, new_blocks,
local_work, total_go, total_ro); local_work, total_go, total_ro, total_diff1 / total_secs * 60);
wclrtoeol(statuswin); wclrtoeol(statuswin);
if ((pool_strategy == POOL_LOADBALANCE || pool_strategy == POOL_BALANCE) && total_pools > 1) if ((pool_strategy == POOL_LOADBALANCE || pool_strategy == POOL_BALANCE) && total_pools > 1)
mvwprintw(statuswin, 4, 0, " Connected to multiple pools with%s LP", mvwprintw(statuswin, 4, 0, " Connected to multiple pools with%s LP",
@ -4202,6 +4202,7 @@ bool test_nonce(struct work *work, uint32_t nonce)
bool submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce) bool submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
{ {
total_diff1++;
work->pool->diff1++; work->pool->diff1++;
/* Do one last check before attempting to submit the work */ /* Do one last check before attempting to submit the work */
@ -4859,7 +4860,7 @@ static void print_summary(void)
{ {
struct timeval diff; struct timeval diff;
int hours, mins, secs, i; int hours, mins, secs, i;
double utility, efficiency = 0.0, displayed_hashes; double utility, efficiency = 0.0, displayed_hashes, work_util;
bool mhash_base = true; bool mhash_base = true;
timersub(&total_tv_end, &total_tv_start, &diff); timersub(&total_tv_end, &total_tv_start, &diff);
@ -4869,6 +4870,7 @@ static void print_summary(void)
utility = total_accepted / total_secs * 60; utility = total_accepted / total_secs * 60;
efficiency = total_getworks ? total_accepted * 100.0 / total_getworks : 0.0; efficiency = total_getworks ? total_accepted * 100.0 / total_getworks : 0.0;
work_util = total_diff1 / total_secs * 60;
applog(LOG_WARNING, "\nSummary of runtime statistics:\n"); applog(LOG_WARNING, "\nSummary of runtime statistics:\n");
applog(LOG_WARNING, "Started at %s", datestamp); applog(LOG_WARNING, "Started at %s", datestamp);
@ -4896,6 +4898,7 @@ static void print_summary(void)
applog(LOG_WARNING, "Hardware errors: %d", hw_errors); applog(LOG_WARNING, "Hardware errors: %d", hw_errors);
applog(LOG_WARNING, "Efficiency (accepted / queued): %.0f%%", efficiency); applog(LOG_WARNING, "Efficiency (accepted / queued): %.0f%%", efficiency);
applog(LOG_WARNING, "Utility (accepted shares / min): %.2f/min\n", utility); applog(LOG_WARNING, "Utility (accepted shares / min): %.2f/min\n", utility);
applog(LOG_WARNING, "Work Utility (diff1 shares solved / min): %.2f/min", work_util);
applog(LOG_WARNING, "Discarded work due to new blocks: %d", total_discarded); applog(LOG_WARNING, "Discarded work due to new blocks: %d", total_discarded);
applog(LOG_WARNING, "Stale submissions discarded due to new blocks: %d", total_stale); applog(LOG_WARNING, "Stale submissions discarded due to new blocks: %d", total_stale);

Loading…
Cancel
Save