restore divided hashrate for quark and jackpot
The previous way it was done was not correct (hashdone divided/2) So add a factor 0.5 to the computed hashrate... to stay comparable
This commit is contained in:
parent
3d2260acc4
commit
e82f5d4d75
@ -160,9 +160,12 @@ features.
|
|||||||
api: Fix multi gpus stats, bump API v1.1
|
api: Fix multi gpus stats, bump API v1.1
|
||||||
|
|
||||||
Nov. 12th 2014 v1.4.8
|
Nov. 12th 2014 v1.4.8
|
||||||
Add a basic API and sample php json wrapper
|
Add a basic API and sample php json wrapper + ui
|
||||||
|
Add Nvidia monitoring (nvapi/nvml) support
|
||||||
Add statsavg (def 20) and api-bind parameters
|
Add statsavg (def 20) and api-bind parameters
|
||||||
|
Add support of telnet queries to the api
|
||||||
Fix displayed hashrate for multi gpus systems
|
Fix displayed hashrate for multi gpus systems
|
||||||
|
Restore quark/jackpot previous speed (differently)
|
||||||
|
|
||||||
Nov. 11th 2014 v1.4.7
|
Nov. 11th 2014 v1.4.7
|
||||||
Average hashrate (based on the 20 last scans)
|
Average hashrate (based on the 20 last scans)
|
||||||
|
16
ccminer.cpp
16
ccminer.cpp
@ -1317,16 +1317,32 @@ continue_scan:
|
|||||||
applog(LOG_NOTICE, CL_CYN "found => %08x" CL_GRN " %08x", *nonceptr, swab32(*nonceptr));
|
applog(LOG_NOTICE, CL_CYN "found => %08x" CL_GRN " %08x", *nonceptr, swab32(*nonceptr));
|
||||||
|
|
||||||
timeval_subtract(&diff, &tv_end, &tv_start);
|
timeval_subtract(&diff, &tv_end, &tv_start);
|
||||||
|
|
||||||
if (diff.tv_usec || diff.tv_sec) {
|
if (diff.tv_usec || diff.tv_sec) {
|
||||||
|
|
||||||
|
/* hashrate factors for some algos */
|
||||||
|
double rate_factor = 1.0;
|
||||||
|
switch (opt_algo) {
|
||||||
|
case ALGO_JACKPOT:
|
||||||
|
case ALGO_QUARK:
|
||||||
|
// to stay comparable to other ccminer forks or pools
|
||||||
|
rate_factor = 0.5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* store thread hashrate */
|
||||||
pthread_mutex_lock(&stats_lock);
|
pthread_mutex_lock(&stats_lock);
|
||||||
if (diff.tv_sec + 1e-6 * diff.tv_usec > 0.0) {
|
if (diff.tv_sec + 1e-6 * diff.tv_usec > 0.0) {
|
||||||
thr_hashrates[thr_id] = hashes_done / (diff.tv_sec + 1e-6 * diff.tv_usec);
|
thr_hashrates[thr_id] = hashes_done / (diff.tv_sec + 1e-6 * diff.tv_usec);
|
||||||
if (rc > 1)
|
if (rc > 1)
|
||||||
thr_hashrates[thr_id] = (rc * hashes_done) / (diff.tv_sec + 1e-6 * diff.tv_usec);
|
thr_hashrates[thr_id] = (rc * hashes_done) / (diff.tv_sec + 1e-6 * diff.tv_usec);
|
||||||
|
thr_hashrates[thr_id] *= rate_factor;
|
||||||
stats_remember_speed(thr_id, hashes_done, thr_hashrates[thr_id]);
|
stats_remember_speed(thr_id, hashes_done, thr_hashrates[thr_id]);
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&stats_lock);
|
pthread_mutex_unlock(&stats_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* output */
|
||||||
if (!opt_quiet) {
|
if (!opt_quiet) {
|
||||||
sprintf(s, thr_hashrates[thr_id] >= 1e6 ? "%.0f" : "%.2f",
|
sprintf(s, thr_hashrates[thr_id] >= 1e6 ? "%.0f" : "%.2f",
|
||||||
1e-3 * thr_hashrates[thr_id]);
|
1e-3 * thr_hashrates[thr_id]);
|
||||||
|
7
util.cpp
7
util.cpp
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010 Jeff Garzik
|
* Copyright 2010 Jeff Garzik
|
||||||
* Copyright 2012-2014 pooler
|
* Copyright 2012-2014 pooler
|
||||||
|
* Copyright 2014 ccminer team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
@ -8,7 +9,7 @@
|
|||||||
* any later version. See COPYING for more details.
|
* any later version. See COPYING for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
//#define _GNU_SOURCE
|
||||||
#include "cpuminer-config.h"
|
#include "cpuminer-config.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -493,8 +494,8 @@ void *aligned_calloc(int size)
|
|||||||
memset(res, 0, size);
|
memset(res, 0, size);
|
||||||
return res;
|
return res;
|
||||||
#else
|
#else
|
||||||
void *mem = calloc(1, size+ALIGN+sizeof(void*));
|
void *mem = calloc(1, size+ALIGN+sizeof(uintptr_t));
|
||||||
void **ptr = (void**)((size_t)(mem+ALIGN+sizeof(void*)) & ~(ALIGN-1));
|
void **ptr = (void**)((size_t)(((uintptr_t)(mem))+ALIGN+sizeof(uintptr_t)) & ~(ALIGN-1));
|
||||||
ptr[-1] = mem;
|
ptr[-1] = mem;
|
||||||
return ptr;
|
return ptr;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user