From 3bfb1711d63a86b4b70ba5c4af2d212f8f668a71 Mon Sep 17 00:00:00 2001 From: Forrest Voight Date: Wed, 21 Mar 2012 14:13:43 -0400 Subject: [PATCH] added efficiency to local_stats --- p2pool/web.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/p2pool/web.py b/p2pool/web.py index d7c6332..959faf7 100644 --- a/p2pool/web.py +++ b/p2pool/web.py @@ -142,6 +142,8 @@ def get_web_root(tracker, current_work, current_work2, get_current_txouts, datad if datum['dead']: miner_dead_hash_rates[datum['user']] = miner_dead_hash_rates.get(datum['user'], 0) + datum['work']/dt + (stale_orphan_shares, stale_doa_shares), shares, _ = get_stale_counts() + return json.dumps(dict( my_hash_rates_in_last_hour=dict( note="DEPRECATED", @@ -163,6 +165,7 @@ def get_web_root(tracker, current_work, current_work2, get_current_txouts, datad ), miner_hash_rates=miner_hash_rates, miner_dead_hash_rates=miner_dead_hash_rates, + efficiency_if_miner_perfect=(1 - stale_orphan_shares/shares)/(1 - global_stale_prop) if shares else None, # ignores dead shares because those are miner's fault and indicated by pseudoshare rejection )) def get_peer_addresses(): -- 1.7.1