Browse Source

ckdb/php - add a share based hash rate to the workers page

master
kanoi 9 years ago
parent
commit
3f24108955
  1. 7
      pool/page_allwork.php
  2. 41
      pool/page_workers.php
  3. 40
      src/ckdb.h
  4. 78
      src/ckdb_cmd.c
  5. 152
      src/ckdb_data.c

7
pool/page_allwork.php

@ -10,6 +10,7 @@ function doallwork($data, $user)
$totshare = 0; $totshare = 0;
$totdiff = 0; $totdiff = 0;
$totshrate = 0;
$totinvalid = 0; $totinvalid = 0;
$totrate = 0; $totrate = 0;
$offset = 0; $offset = 0;
@ -26,13 +27,13 @@ function doallwork($data, $user)
{ {
$pg .= workuser($data, $ans['username:'.$i], $pg .= workuser($data, $ans['username:'.$i],
$offset, $totshare, $totdiff, $offset, $totshare, $totdiff,
$totinvalid, $totrate, $totshrate, $totinvalid, $totrate,
$blockacc, $blockreward, 3600); $blockacc, $blockreward, 3600);
} }
} }
$pg .= worktotal($offset, $totshare, $totdiff, $totinvalid, $totrate, $pg .= worktotal($offset, $totshare, $totdiff, $totshrate, $totinvalid,
$blockacc, $blockreward); $totrate, $blockacc, $blockreward);
$pg .= "</table>\n"; $pg .= "</table>\n";

41
pool/page_workers.php

@ -10,9 +10,10 @@ function worktitle($data, $user)
$pg .= "<td class=dr><span class=nb><$r id=srtlst data-sf=n2>:Last</span> Share</td>"; $pg .= "<td class=dr><span class=nb><$r id=srtlst data-sf=n2>:Last</span> Share</td>";
$pg .= '<td class=dr>Shares</td>'; $pg .= '<td class=dr>Shares</td>';
$pg .= "<td class=dr><span class=nb><$r id=srtdiff data-sf=r4>:Diff</span></td>"; $pg .= "<td class=dr><span class=nb><$r id=srtdiff data-sf=r4>:Diff</span></td>";
$pg .= "<td class=dr><span class=nb><$r id=srtinv data-sf=r5>:Invalid</span></td>"; $pg .= "<td class=dr><span class=nb><$r id=srtshrate data-sf=r5>:Share Rate</span></td>";
$pg .= "<td class=dr><span class=nb><$r id=srtinv data-sf=r6>:Invalid</span></td>";
$pg .= '<td class=dr>Block %</td>'; $pg .= '<td class=dr>Block %</td>';
$pg .= "<td class=dr><span class=nb><$r id=srtrate data-sf=r7>:Hash</span> Rate</td>"; $pg .= "<td class=dr><span class=nb><$r id=srtrate data-sf=r8>:Hash</span> Rate</td>";
$pg .= "</tr>\n"; $pg .= "</tr>\n";
return $pg; return $pg;
} }
@ -23,7 +24,7 @@ function workhashorder($a, $b)
} }
# #
function workuser($data, $user, &$offset, &$totshare, &$totdiff, function workuser($data, $user, &$offset, &$totshare, &$totdiff,
&$totinvalid, &$totrate, &$blockacc, &$totshrate, &$totinvalid, &$totrate, &$blockacc,
&$blockreward, $old = false, $srt = false, &$blockreward, $old = false, $srt = false,
$one = false, &$title) $one = false, &$title)
{ {
@ -63,6 +64,8 @@ function workuser($data, $user, &$offset, &$totshare, &$totdiff,
'w_diffacc' => $ans['w_diffacc:'.$i], 'w_diffacc' => $ans['w_diffacc:'.$i],
'w_diffinv' => $ans['w_diffinv:'.$i], 'w_diffinv' => $ans['w_diffinv:'.$i],
'w_lastdiff' => $ans['w_lastdiff:'.$i], 'w_lastdiff' => $ans['w_lastdiff:'.$i],
'w_active_diffacc' => $ans['w_active_diffacc:'.$i],
'w_active_start' => $ans['w_active_start:'.$i],
'w_uhr' => $uhr); 'w_uhr' => $uhr);
} }
@ -99,6 +102,22 @@ function workuser($data, $user, &$offset, &$totshare, &$totdiff,
$pg .= "<td class=dr>$shareacc</td>"; $pg .= "<td class=dr>$shareacc</td>";
$pg .= "<td class=dr data-srt=$ds>$diffacc</td>"; $pg .= "<td class=dr data-srt=$ds>$diffacc</td>";
$acthr = '0';
$acthrv = 0;
$actstt = $all[$i]['w_active_start'];
if ($actstt > 0)
{
$elapsed = $ans['STAMP'] - $actstt;
if ($elapsed > 0)
{
$acthrv = $all[$i]['w_active_diffacc'] *
pow(2,32) / $elapsed;
$acthr = dsprate($acthrv);
$totshrate += $acthrv;
}
}
$pg .= "<td class=dr data-srt=$acthrv>$acthr</td>";
$dinv = $all[$i]['w_diffinv']; $dinv = $all[$i]['w_diffinv'];
$dtot = $dacc + $dinv; $dtot = $dacc + $dinv;
if ($dtot > 0) if ($dtot > 0)
@ -144,9 +163,11 @@ function workuser($data, $user, &$offset, &$totshare, &$totdiff,
return $pg; return $pg;
} }
# #
function worktotal($offset, $totshare, $totdiff, $totinvalid, $totrate, $blockacc, $blockreward) function worktotal($offset, $totshare, $totdiff, $totshrate, $totinvalid,
$totrate, $blockacc, $blockreward)
{ {
$pg = ''; $pg = '';
$totshrate = dsprate($totshrate);
$totrate = dsprate($totrate); $totrate = dsprate($totrate);
if (($offset % 2) == 0) if (($offset % 2) == 0)
$row = 'even'; $row = 'even';
@ -157,6 +178,7 @@ function worktotal($offset, $totshare, $totdiff, $totinvalid, $totrate, $blockac
$pg .= "<td class=dr>$shareacc</td>"; $pg .= "<td class=dr>$shareacc</td>";
$diffacc = number_format($totdiff, 0); $diffacc = number_format($totdiff, 0);
$pg .= "<td class=dr>$diffacc</td>"; $pg .= "<td class=dr>$diffacc</td>";
$pg .= "<td class=dr>$totshrate</td>";
$dtot = $totdiff + $totinvalid; $dtot = $totdiff + $totinvalid;
if ($dtot > 0) if ($dtot > 0)
$rej = number_format(100.0 * $totinvalid / $dtot, 3); $rej = number_format(100.0 * $totinvalid / $dtot, 3);
@ -180,6 +202,7 @@ function doworker($data, $user)
$totshare = 0; $totshare = 0;
$totdiff = 0; $totdiff = 0;
$totshrate = 0;
$totinvalid = 0; $totinvalid = 0;
$totrate = 0; $totrate = 0;
$offset = 0; $offset = 0;
@ -187,11 +210,11 @@ function doworker($data, $user)
$blockreward = 0; $blockreward = 0;
$pg .= worktitle($data, $user); $pg .= worktitle($data, $user);
$pg .= workuser($data, $user, $offset, $totshare, $totdiff, $totinvalid, $pg .= workuser($data, $user, $offset, $totshare, $totdiff, $totshrate,
$totrate, $blockacc, $blockreward, false, true, true, $totinvalid, $totrate, $blockacc, $blockreward,
$title); false, true, true, $title);
$pg .= worktotal($offset, $totshare, $totdiff, $totinvalid, $totrate, $pg .= worktotal($offset, $totshare, $totdiff, $totshrate, $totinvalid,
$blockacc, $blockreward); $totrate, $blockacc, $blockreward);
if (false && $blockacc > 0 && $blockreward > 0) if (false && $blockacc > 0 && $blockreward > 0)
{ {

40
src/ckdb.h

@ -55,7 +55,7 @@
#define DB_VLOCK "1" #define DB_VLOCK "1"
#define DB_VERSION "1.0.0" #define DB_VERSION "1.0.0"
#define CKDB_VERSION DB_VERSION"-1.113" #define CKDB_VERSION DB_VERSION"-1.120"
#define WHERE_FFL " - from %s %s() line %d" #define WHERE_FFL " - from %s %s() line %d"
#define WHERE_FFL_HERE __FILE__, __func__, __LINE__ #define WHERE_FFL_HERE __FILE__, __func__, __LINE__
@ -1735,18 +1735,32 @@ typedef struct workerstatus {
tv_t last_stats; tv_t last_stats;
tv_t last_idle; tv_t last_idle;
// Below gets reset on each block // Below gets reset on each block
double diffacc; double block_diffacc;
double diffinv; // Non-acc double block_diffinv; // Non-acc
double diffsta; double block_diffsta;
double diffdup; double block_diffdup;
double diffhi; double block_diffhi;
double diffrej; double block_diffrej;
double shareacc; double block_shareacc;
double shareinv; // Non-acc double block_shareinv; // Non-acc
double sharesta; double block_sharesta;
double sharedup; double block_sharedup;
double sharehi; double block_sharehi;
double sharerej; double block_sharerej;
// Below gets reset on each idle
double active_diffacc;
double active_diffinv; // Non-acc
double active_diffsta;
double active_diffdup;
double active_diffhi;
double active_diffrej;
double active_shareacc;
double active_shareinv; // Non-acc
double active_sharesta;
double active_sharedup;
double active_sharehi;
double active_sharerej;
tv_t active_start;
} WORKERSTATUS; } WORKERSTATUS;
#define ALLOC_WORKERSTATUS 1000 #define ALLOC_WORKERSTATUS 1000

78
src/ckdb_cmd.c

@ -1395,18 +1395,18 @@ static char *cmd_percent(char *cmd, char *id, tv_t *now, USERS *users)
ws_item = get_workerstatus(users->userid, workers->workername); ws_item = get_workerstatus(users->userid, workers->workername);
if (ws_item) { if (ws_item) {
DATA_WORKERSTATUS(workerstatus, ws_item); DATA_WORKERSTATUS(workerstatus, ws_item);
t_diffacc += workerstatus->diffacc; t_diffacc += workerstatus->block_diffacc;
t_diffinv += workerstatus->diffinv; t_diffinv += workerstatus->block_diffinv;
t_diffsta += workerstatus->diffsta; t_diffsta += workerstatus->block_diffsta;
t_diffdup += workerstatus->diffdup; t_diffdup += workerstatus->block_diffdup;
t_diffhi += workerstatus->diffhi; t_diffhi += workerstatus->block_diffhi;
t_diffrej += workerstatus->diffrej; t_diffrej += workerstatus->block_diffrej;
t_shareacc += workerstatus->shareacc; t_shareacc += workerstatus->block_shareacc;
t_shareinv += workerstatus->shareinv; t_shareinv += workerstatus->block_shareinv;
t_sharesta += workerstatus->sharesta; t_sharesta += workerstatus->block_sharesta;
t_sharedup += workerstatus->sharedup; t_sharedup += workerstatus->block_sharedup;
t_sharehi += workerstatus->sharehi; t_sharehi += workerstatus->block_sharehi;
t_sharerej += workerstatus->sharerej; t_sharerej += workerstatus->block_sharerej;
} }
/* TODO: workers_root userid+worker is ordered /* TODO: workers_root userid+worker is ordered
@ -1692,6 +1692,8 @@ static char *cmd_workers(__maybe_unused PGconn *conn, char *cmd, char *id,
double w_shareacc, w_shareinv; double w_shareacc, w_shareinv;
double w_sharesta, w_sharedup; double w_sharesta, w_sharedup;
double w_sharehi, w_sharerej; double w_sharehi, w_sharerej;
double w_active_diffacc;
tv_t w_active_start;
w_hashrate5m = w_hashrate1hr = w_hashrate5m = w_hashrate1hr =
w_hashrate24hr = 0.0; w_hashrate24hr = 0.0;
@ -1699,30 +1701,34 @@ static char *cmd_workers(__maybe_unused PGconn *conn, char *cmd, char *id,
if (!ws_item) { if (!ws_item) {
w_lastshare.tv_sec = 0; w_lastshare.tv_sec = 0;
w_lastdiff = w_diffacc = w_diffinv = w_lastdiff = w_diffacc =
w_diffsta = w_diffdup = w_diffinv = w_diffsta =
w_diffhi = w_diffrej = w_diffdup = w_diffhi =
w_shareacc = w_shareinv = w_diffrej = w_shareacc =
w_sharesta = w_sharedup = w_shareinv = w_sharesta =
w_sharehi = w_sharerej = 0; w_sharedup = w_sharehi =
w_sharerej = w_active_diffacc = 0;
w_active_start.tv_sec = 0;
} else { } else {
DATA_WORKERSTATUS(workerstatus, ws_item); DATA_WORKERSTATUS(workerstatus, ws_item);
// It's bad to read possibly changing data // It's bad to read possibly changing data
K_RLOCK(workerstatus_free); K_RLOCK(workerstatus_free);
w_lastshare.tv_sec = workerstatus->last_share.tv_sec; w_lastshare.tv_sec = workerstatus->last_share.tv_sec;
w_lastdiff = workerstatus->last_diff; w_lastdiff = workerstatus->last_diff;
w_diffacc = workerstatus->diffacc; w_diffacc = workerstatus->block_diffacc;
w_diffinv = workerstatus->diffinv; w_diffinv = workerstatus->block_diffinv;
w_diffsta = workerstatus->diffsta; w_diffsta = workerstatus->block_diffsta;
w_diffdup = workerstatus->diffdup; w_diffdup = workerstatus->block_diffdup;
w_diffhi = workerstatus->diffhi; w_diffhi = workerstatus->block_diffhi;
w_diffrej = workerstatus->diffrej; w_diffrej = workerstatus->block_diffrej;
w_shareacc = workerstatus->shareacc; w_shareacc = workerstatus->block_shareacc;
w_shareinv = workerstatus->shareinv; w_shareinv = workerstatus->block_shareinv;
w_sharesta = workerstatus->sharesta; w_sharesta = workerstatus->block_sharesta;
w_sharedup = workerstatus->sharedup; w_sharedup = workerstatus->block_sharedup;
w_sharehi = workerstatus->sharehi; w_sharehi = workerstatus->block_sharehi;
w_sharerej = workerstatus->sharerej; w_sharerej = workerstatus->block_sharerej;
w_active_diffacc = workerstatus->active_diffacc;
w_active_start.tv_sec = workerstatus->active_start.tv_sec;
K_RUNLOCK(workerstatus_free); K_RUNLOCK(workerstatus_free);
} }
@ -1815,6 +1821,15 @@ static char *cmd_workers(__maybe_unused PGconn *conn, char *cmd, char *id,
double_to_buf(w_sharerej, reply, sizeof(reply)); double_to_buf(w_sharerej, reply, sizeof(reply));
snprintf(tmp, sizeof(tmp), "w_sharerej:%d=%s%c", rows, reply, FLDSEP); snprintf(tmp, sizeof(tmp), "w_sharerej:%d=%s%c", rows, reply, FLDSEP);
APPEND_REALLOC(buf, off, len, tmp); APPEND_REALLOC(buf, off, len, tmp);
double_to_buf(w_active_diffacc, reply, sizeof(reply));
snprintf(tmp, sizeof(tmp), "w_active_diffacc:%d=%s%c", rows, reply, FLDSEP);
APPEND_REALLOC(buf, off, len, tmp);
int_to_buf((int)(w_active_start.tv_sec), reply, sizeof(reply));
snprintf(tmp, sizeof(tmp), "w_active_start:%d=%s%c", rows, reply, FLDSEP);
APPEND_REALLOC(buf, off, len, tmp);
} }
rows++; rows++;
} }
@ -1832,7 +1847,8 @@ static char *cmd_workers(__maybe_unused PGconn *conn, char *cmd, char *id,
"w_lastdiff,w_diffacc,w_diffinv," "w_lastdiff,w_diffacc,w_diffinv,"
"w_diffsta,w_diffdup,w_diffhi,w_diffrej," "w_diffsta,w_diffdup,w_diffhi,w_diffrej,"
"w_shareacc,w_shareinv," "w_shareacc,w_shareinv,"
"w_sharesta,w_sharedup,w_sharehi,w_sharerej" : "", "w_sharesta,w_sharedup,w_sharehi,w_sharerej,"
"w_active_diffacc,w_active_start" : "",
FLDSEP); FLDSEP);
APPEND_REALLOC(buf, off, len, tmp); APPEND_REALLOC(buf, off, len, tmp);

152
src/ckdb_data.c

@ -871,6 +871,18 @@ K_ITEM *_find_create_workerstatus(int64_t userid, char *workername,
return ws_item; return ws_item;
} }
// workerstatus must be locked
static void zero_on_idle(tv_t *when, WORKERSTATUS *workerstatus)
{
copy_tv(&(workerstatus->active_start), when);
workerstatus->active_diffacc = workerstatus->active_diffinv =
workerstatus->active_diffsta = workerstatus->active_diffdup =
workerstatus->active_diffhi = workerstatus->active_diffrej =
workerstatus->active_shareacc = workerstatus->active_shareinv =
workerstatus->active_sharesta = workerstatus->active_sharedup =
workerstatus->active_sharehi = workerstatus->active_sharerej = 0.0;
}
/* All data is loaded, now update workerstatus fields /* All data is loaded, now update workerstatus fields
TODO: combine set_block_share_counters() with this? */ TODO: combine set_block_share_counters() with this? */
void workerstatus_ready() void workerstatus_ready()
@ -939,6 +951,8 @@ void _workerstatus_update(AUTHS *auths, SHARES *shares,
K_WLOCK(workerstatus_free); K_WLOCK(workerstatus_free);
if (tv_newer(&(row->last_auth), &(auths->createdate))) if (tv_newer(&(row->last_auth), &(auths->createdate)))
copy_tv(&(row->last_auth), &(auths->createdate)); copy_tv(&(row->last_auth), &(auths->createdate));
if (row->active_start.tv_sec == 0)
copy_tv(&(row->active_start), &(auths->createdate));
K_WUNLOCK(workerstatus_free); K_WUNLOCK(workerstatus_free);
} }
} }
@ -960,34 +974,54 @@ void _workerstatus_update(AUTHS *auths, SHARES *shares,
copy_tv(&(row->last_share), &(shares->createdate)); copy_tv(&(row->last_share), &(shares->createdate));
row->last_diff = shares->diff; row->last_diff = shares->diff;
} }
if (row->active_start.tv_sec == 0)
copy_tv(&(row->active_start), &(shares->createdate));
switch (shares->errn) { switch (shares->errn) {
case SE_NONE: case SE_NONE:
row->diffacc += shares->diff; row->block_diffacc += shares->diff;
row->shareacc++; row->block_shareacc++;
row->active_diffacc += shares->diff;
row->active_shareacc++;
break; break;
case SE_STALE: case SE_STALE:
row->diffinv += shares->diff; row->block_diffinv += shares->diff;
row->shareinv++; row->block_shareinv++;
row->diffsta += shares->diff; row->block_diffsta += shares->diff;
row->sharesta++; row->block_sharesta++;
row->active_diffinv += shares->diff;
row->active_shareinv++;
row->active_diffsta += shares->diff;
row->active_sharesta++;
break; break;
case SE_DUPE: case SE_DUPE:
row->diffinv += shares->diff; row->block_diffinv += shares->diff;
row->shareinv++; row->block_shareinv++;
row->diffdup += shares->diff; row->block_diffdup += shares->diff;
row->sharedup++; row->block_sharedup++;
row->active_diffinv += shares->diff;
row->active_shareinv++;
row->active_diffdup += shares->diff;
row->active_sharedup++;
break; break;
case SE_HIGH_DIFF: case SE_HIGH_DIFF:
row->diffinv += shares->diff; row->block_diffinv += shares->diff;
row->shareinv++; row->block_shareinv++;
row->diffhi += shares->diff; row->block_diffhi += shares->diff;
row->sharehi++; row->block_sharehi++;
row->active_diffinv += shares->diff;
row->active_shareinv++;
row->active_diffhi += shares->diff;
row->active_sharehi++;
break; break;
default: default:
row->diffinv += shares->diff; row->block_diffinv += shares->diff;
row->shareinv++; row->block_shareinv++;
row->diffrej += shares->diff; row->block_diffrej += shares->diff;
row->sharerej++; row->block_sharerej++;
row->active_diffinv += shares->diff;
row->active_shareinv++;
row->active_diffrej += shares->diff;
row->active_sharerej++;
break; break;
} }
K_WUNLOCK(workerstatus_free); K_WUNLOCK(workerstatus_free);
@ -1001,8 +1035,10 @@ void _workerstatus_update(AUTHS *auths, SHARES *shares,
DATA_WORKERSTATUS(row, item); DATA_WORKERSTATUS(row, item);
K_WLOCK(workerstatus_free); K_WLOCK(workerstatus_free);
if (userstats->idle) { if (userstats->idle) {
if (tv_newer(&(row->last_idle), &(userstats->statsdate))) if (tv_newer(&(row->last_idle), &(userstats->statsdate))) {
copy_tv(&(row->last_idle), &(userstats->statsdate)); copy_tv(&(row->last_idle), &(userstats->statsdate));
zero_on_idle(&(userstats->statsdate), row);
}
} else { } else {
if (tv_newer(&(row->last_stats), &(userstats->statsdate))) if (tv_newer(&(row->last_stats), &(userstats->statsdate)))
copy_tv(&(row->last_stats), &(userstats->statsdate)); copy_tv(&(row->last_stats), &(userstats->statsdate));
@ -2436,12 +2472,12 @@ void zero_on_new_block()
ws_item = first_in_ktree(workerstatus_root, ctx); ws_item = first_in_ktree(workerstatus_root, ctx);
while (ws_item) { while (ws_item) {
DATA_WORKERSTATUS(workerstatus, ws_item); DATA_WORKERSTATUS(workerstatus, ws_item);
workerstatus->diffacc = workerstatus->diffinv = workerstatus->block_diffacc = workerstatus->block_diffinv =
workerstatus->diffsta = workerstatus->diffdup = workerstatus->block_diffsta = workerstatus->block_diffdup =
workerstatus->diffhi = workerstatus->diffrej = workerstatus->block_diffhi = workerstatus->block_diffrej =
workerstatus->shareacc = workerstatus->shareinv = workerstatus->block_shareacc = workerstatus->block_shareinv =
workerstatus->sharesta = workerstatus->sharedup = workerstatus->block_sharesta = workerstatus->block_sharedup =
workerstatus->sharehi = workerstatus->sharerej = 0.0; workerstatus->block_sharehi = workerstatus->block_sharerej = 0.0;
ws_item = next_in_ktree(ctx); ws_item = next_in_ktree(ctx);
} }
K_WUNLOCK(workerstatus_free); K_WUNLOCK(workerstatus_free);
@ -2511,20 +2547,25 @@ void set_block_share_counters()
pool.diffacc += sharesummary->diffacc; pool.diffacc += sharesummary->diffacc;
pool.diffinv += sharesummary->diffsta + sharesummary->diffdup + pool.diffinv += sharesummary->diffsta + sharesummary->diffdup +
sharesummary->diffhi + sharesummary->diffrej; sharesummary->diffhi + sharesummary->diffrej;
workerstatus->diffacc += sharesummary->diffacc; // Block stats only
workerstatus->diffinv += sharesummary->diffsta + sharesummary->diffdup + workerstatus->block_diffacc += sharesummary->diffacc;
sharesummary->diffhi + sharesummary->diffrej; workerstatus->block_diffinv += sharesummary->diffsta +
workerstatus->diffsta += sharesummary->diffsta; sharesummary->diffdup +
workerstatus->diffdup += sharesummary->diffdup; sharesummary->diffhi +
workerstatus->diffhi += sharesummary->diffhi; sharesummary->diffrej;
workerstatus->diffrej += sharesummary->diffrej; workerstatus->block_diffsta += sharesummary->diffsta;
workerstatus->shareacc += sharesummary->shareacc; workerstatus->block_diffdup += sharesummary->diffdup;
workerstatus->shareinv += sharesummary->sharesta + sharesummary->sharedup + workerstatus->block_diffhi += sharesummary->diffhi;
sharesummary->sharehi + sharesummary->sharerej; workerstatus->block_diffrej += sharesummary->diffrej;
workerstatus->sharesta += sharesummary->sharesta; workerstatus->block_shareacc += sharesummary->shareacc;
workerstatus->sharedup += sharesummary->sharedup; workerstatus->block_shareinv += sharesummary->sharesta +
workerstatus->sharehi += sharesummary->sharehi; sharesummary->sharedup +
workerstatus->sharerej += sharesummary->sharerej; sharesummary->sharehi +
sharesummary->sharerej;
workerstatus->block_sharesta += sharesummary->sharesta;
workerstatus->block_sharedup += sharesummary->sharedup;
workerstatus->block_sharehi += sharesummary->sharehi;
workerstatus->block_sharerej += sharesummary->sharerej;
ss_item = prev_in_ktree(ctx); ss_item = prev_in_ktree(ctx);
} }
@ -2589,20 +2630,25 @@ void set_block_share_counters()
pool.diffacc += markersummary->diffacc; pool.diffacc += markersummary->diffacc;
pool.diffinv += markersummary->diffsta + markersummary->diffdup + pool.diffinv += markersummary->diffsta + markersummary->diffdup +
markersummary->diffhi + markersummary->diffrej; markersummary->diffhi + markersummary->diffrej;
workerstatus->diffacc += markersummary->diffacc; // Block stats only
workerstatus->diffinv += markersummary->diffsta + markersummary->diffdup + workerstatus->block_diffacc += markersummary->diffacc;
markersummary->diffhi + markersummary->diffrej; workerstatus->block_diffinv += markersummary->diffsta +
workerstatus->diffsta += markersummary->diffsta; markersummary->diffdup +
workerstatus->diffdup += markersummary->diffdup; markersummary->diffhi +
workerstatus->diffhi += markersummary->diffhi; markersummary->diffrej;
workerstatus->diffrej += markersummary->diffrej; workerstatus->block_diffsta += markersummary->diffsta;
workerstatus->shareacc += markersummary->shareacc; workerstatus->block_diffdup += markersummary->diffdup;
workerstatus->shareinv += markersummary->sharesta + markersummary->sharedup + workerstatus->block_diffhi += markersummary->diffhi;
markersummary->sharehi + markersummary->sharerej; workerstatus->block_diffrej += markersummary->diffrej;
workerstatus->sharesta += markersummary->sharesta; workerstatus->block_shareacc += markersummary->shareacc;
workerstatus->sharedup += markersummary->sharedup; workerstatus->block_shareinv += markersummary->sharesta +
workerstatus->sharehi += markersummary->sharehi; markersummary->sharedup +
workerstatus->sharerej += markersummary->sharerej; markersummary->sharehi +
markersummary->sharerej;
workerstatus->block_sharesta += markersummary->sharesta;
workerstatus->block_sharedup += markersummary->sharedup;
workerstatus->block_sharehi += markersummary->sharehi;
workerstatus->block_sharerej += markersummary->sharerej;
ms_item = prev_in_ktree(ctx_ms); ms_item = prev_in_ktree(ctx_ms);
} }

Loading…
Cancel
Save