Browse Source

api: report intensity and throughput for each thread

even when no parameter is set (default set in each algo code)
master
Tanguy Pruvot 10 years ago
parent
commit
dfa9f63886
  1. 8
      api.cpp

8
api.cpp

@ -94,6 +94,7 @@ extern char *opt_api_allow;
extern int opt_api_listen; /* port */ extern int opt_api_listen; /* port */
extern uint32_t accepted_count; extern uint32_t accepted_count;
extern uint32_t rejected_count; extern uint32_t rejected_count;
extern uint32_t opt_work_adds;
extern int num_cpus; extern int num_cpus;
extern struct stratum_ctx stratum; extern struct stratum_ctx stratum;
extern char* rpc_user; extern char* rpc_user;
@ -887,10 +888,13 @@ void apiReportThroughput(int thr_id, uint32_t throughput)
while (ws > 1 && i++ < 32) while (ws > 1 && i++ < 32)
ws = ws >> 1; ws = ws >> 1;
cgpu->intensity_int = i; cgpu->intensity_int = i;
cgpu->intensity = (float) i;
} else { } else {
cgpu->intensity_int = (uint8_t) opt_intensity; cgpu->intensity_int = (uint8_t) opt_intensity;
cgpu->intensity = (float) opt_intensity;
if (opt_work_adds) {
cgpu->intensity += ((float) opt_work_adds / (1U << opt_intensity));
}
} }
// dec. part to finish...
cgpu->intensity = (float) cgpu->intensity_int;
} }
} }
Loading…
Cancel
Save