Browse Source

Move new bandwidth-based Efficiency to status line

Luke Dashjr 13 years ago
parent
commit
c98301ebcf
2 changed files with 14 additions and 10 deletions
  1. 4 4
      README
  2. 10 6
      miner.c

+ 4 - 4
README

@@ -406,7 +406,7 @@ dedicated to this program,
 	http://forum.bitcoin.org/index.php?topic=28402.0
 
 The output line shows the following:
-5s:1713.6 avg:1707.8 u:1710.2 Mh/s | A:729 R:8 S:0 HW:0 E:242% U:22.53/m
+5s:1713.6 avg:1707.8 u:1710.2 Mh/s | A:729 R:8 S:0 HW:0 U:22.53/m
 
 Each column is as follows:
 5s:  A 5 second exponentially decaying average hash rate
@@ -416,8 +416,6 @@ A:   The number of Accepted shares
 R:   The number of Rejected shares
 S:   Stale shares discarded (not submitted so don't count as rejects)
 HW:  The number of HardWare errors
-E:   The Efficiency defined as number of shares accepted (multiplied by their
-         difficulty) per 2 KB of bandwidth
 U:   The Utility defined as the number of shares / minute
 
  GPU 1: 73.5C 2551RPM | 427.3/443.0/442.1Mh/s | A:8 R:0 HW:0 U:4.39/m
@@ -434,7 +432,7 @@ The number of hardware erorrs
 The utility defines as the number of shares / minute
 
 The BFGMiner status line shows:
- ST: 1  DW: 0  GW: 301  LW: 8  GF: 1  NB: 1  AS: 0  RF: 1
+ ST: 1  DW: 0  GW: 301  LW: 8  GF: 1  NB: 1  AS: 0  RF: 1  E: 2.42
 
 ST is STaged work items (ready to use).
 DW is Discarded Work items (work from block no longer valid to work on)
@@ -444,6 +442,8 @@ GF is Getwork Fail Occasions (server slow to provide work)
 NB is New Blocks detected on the network
 AS is Active Submissions (shares in the process of submitting)
 RF is Remote Fail occasions (server slow to accept work)
+E  is Efficiency defined as number of shares accepted (multiplied by their
+          difficulty) per 2 KB of bandwidth
 
 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

+ 10 - 6
miner.c

@@ -2109,6 +2109,9 @@ static void curses_print_status(void)
 {
 	struct pool *pool = current_pool();
 	struct timeval now, tv;
+	float efficiency;
+
+	efficiency = total_bytes_xfer ? total_diff_accepted * 2048. / total_bytes_xfer : 0.0;
 
 	wattron(statuswin, A_BOLD);
 	mvwprintw(statuswin, 0, 0, " " PACKAGE " version " VERSION " - Started: %s", datestamp);
@@ -2135,14 +2138,15 @@ static void curses_print_status(void)
 	mvwhline(statuswin, 1, 0, '-', 80);
 	mvwprintw(statuswin, 2, 0, " %s", statusline);
 	wclrtoeol(statuswin);
-	mvwprintw(statuswin, 3, 0, " ST: %d  DW: %d  GW: %d  LW: %d  GF: %d  NB: %d  AS: %d  RF: %d",
+	mvwprintw(statuswin, 3, 0, " ST: %d  DW: %d  GW: %d  LW: %d  GF: %d  NB: %d  AS: %d  RF: %d  E: %.2f",
 		total_staged(), total_discarded,
 		total_getworks,
 		local_work,
 		total_go,
 		new_blocks,
 		total_submitting,
-		total_ro);
+		total_ro,
+		efficiency);
 	wclrtoeol(statuswin);
 	if ((pool_strategy == POOL_LOADBALANCE  || pool_strategy == POOL_BALANCE) && total_pools > 1) {
 		mvwprintw(statuswin, 4, 0, " Connected to multiple pools with%s LP",
@@ -5199,7 +5203,7 @@ static void hashmeter(int thr_id, struct timeval *diff,
 	struct timeval temp_tv_end, total_diff;
 	double secs;
 	double local_secs;
-	double utility, efficiency = 0.0;
+	double utility;
 	static double local_mhashes_done = 0;
 	static double rolling = 0;
 	double local_mhashes = (double)hashes_done / 1000000.0;
@@ -5279,7 +5283,6 @@ static void hashmeter(int thr_id, struct timeval *diff,
 		((double)total_diff.tv_usec / 1000000.0);
 
 	utility = total_accepted / total_secs * 60;
-	efficiency = total_bytes_xfer ? total_diff_accepted * 2048. / total_bytes_xfer : 0.0;
 
 	ti_hashrate_bufstr(
 		(char*[]){cHr, aHr, uHr},
@@ -5288,13 +5291,14 @@ static void hashmeter(int thr_id, struct timeval *diff,
 		utility_to_hashrate(total_diff_accepted / (total_secs ?: 1) * 60),
 		H2B_SPACED);
 
-	sprintf(statusline, "%s%ds:%s avg:%s u:%s | A:%d R:%d S:%d HW:%d E:%.2f U:%.1f/m",
+	sprintf(statusline, "%s%ds:%s avg:%s u:%s | A:%d R:%d S:%d HW:%d U:%.1f/m",
 		want_per_device_stats ? "ALL " : "",
 		opt_log_interval,
 		cHr, aHr,
 		uHr,
 		total_accepted, total_rejected, total_stale,
-		hw_errors, efficiency, utility);
+		hw_errors,
+		utility);
 
 
 	local_mhashes_done = 0;