mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-22 12:34:17 +00:00
api: report intensity and throughput for each thread
even when no parameter is set (default set in each algo code)
This commit is contained in:
parent
2a5233f56e
commit
dfa9f63886
8
api.cpp
8
api.cpp
@ -94,6 +94,7 @@ extern char *opt_api_allow;
|
||||
extern int opt_api_listen; /* port */
|
||||
extern uint32_t accepted_count;
|
||||
extern uint32_t rejected_count;
|
||||
extern uint32_t opt_work_adds;
|
||||
extern int num_cpus;
|
||||
extern struct stratum_ctx stratum;
|
||||
extern char* rpc_user;
|
||||
@ -887,10 +888,13 @@ void apiReportThroughput(int thr_id, uint32_t throughput)
|
||||
while (ws > 1 && i++ < 32)
|
||||
ws = ws >> 1;
|
||||
cgpu->intensity_int = i;
|
||||
cgpu->intensity = (float) i;
|
||||
} else {
|
||||
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…
x
Reference in New Issue
Block a user