А про гигахеши что скажете?
О боже, куда троллинг ушел!
топаем
https://github.com/ckolivas/cgminer/ смотрим что используется везде где есть подстрока
h/s$ grep "h/s" . -d recurse
./README:GPU 0: [124.2 / 191.3 Mh/s] [A:77 R:33 HW:0 U:1.73/m WU 1.73/m]
./README:Thread 0: 62.4 Mh/s Enabled ALIVE
./README:Thread 1: 60.2 Mh/s Enabled ALIVE
./README:(5s):1713.6 (avg):1707.8 Mh/s | A:729 R:8 HW:0 U:22.53/m WU:22.53/m
./README: GPU 1: 73.5C 2551RPM | 427.3/443.0Mh/s | A:8 R:0 HW:0 U:4.39/m
./driver-opencl.c: wlog("GPU %d: %.1f / %.1f %sh/s | A:%d R:%d HW:%d U:%.2f/m I:%d\n",
./driver-opencl.c: wlog("Thread %d: %.1f %sh/s %s ", i, displayed_rolling, mhash_base ? "M" : "K" , cgpu->deven != DEV_DISABLED ? "Enabled" : "Disabled");
./linux-usb-cgminer:In my case it takes away 50Mh/s when the screen isn't blanked
./NEWS:- hashmeter fix stats kh/s on 32bit windows
./lib/string.in.h:
http://www.opengroup.org/susv3xsh/strtok.html./cgminer.c: tailsprintf(buf, "(%ds):%s (avg):%sh/s | A:%d R:%d HW:%d U:%.1f/m",
./cgminer.c: wprintw(statuswin, "/%6sh/s | A:%*d R:%*d HW:%*d U:%*.2f/m",
./cgminer.c: applog(LOG_DEBUG, "[thread %d: %"PRIu64" hashes, %.1f khash/sec]",
./cgminer.c: sprintf(statusline, "%s(%ds):%s (avg):%sh/s | A:%d R:%d HW:%d U:%.1f/m WU:%.1f/m",
./cgminer.c: applog(LOG_WARNING, "Average hashrate: %.1f %shash/s", displayed_hashes, mhash_base? "Mega" : "Kilo");
Первый же пример с tailsprintf:
static void get_statline(char *buf, struct cgpu_info *cgpu)
{
char displayed_hashes[16], displayed_rolling[16];
uint64_t dh64, dr64;
dh64 = (double)cgpu->total_mhashes / total_secs * 1000000ull;
dr64 = (double)cgpu->rolling * 1000000ull;
suffix_string(dh64, displayed_hashes, 4);
suffix_string(dr64, displayed_rolling, 4);
sprintf(buf, "%s%d ", cgpu->drv->name, cgpu->device_id);
cgpu->drv->get_statline_before(buf, cgpu);
tailsprintf(buf, "(%ds):%s (avg):%sh/s | A:%d R:%d HW:%d U:%.1f/m",
opt_log_interval,
displayed_rolling,
displayed_hashes,
cgpu->accepted,
cgpu->rejected,
cgpu->hw_errors,
cgpu->utility);
cgpu->drv->get_statline(buf, cgpu);
}
смотрим метод
static void suffix_string(uint64_t val, char *buf, int sigdigits)
{
...
sprintf(suffix, "G");
Там кстати до экса-хешей накодили, заранее