From 800ea016583b891a795941ca91323502682edd37 Mon Sep 17 00:00:00 2001 From: Kano Date: Thu, 13 Dec 2012 01:09:03 +1100 Subject: [PATCH] API stats - display pool byte transfer stats --- API-README | 3 +++ api.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/API-README b/API-README index b5ec4536..5e41d9b9 100644 --- a/API-README +++ b/API-README @@ -394,6 +394,9 @@ Enforced output limitation: however, JSON brackets will be correctly closed and the JSON id will be set to 0 (instead of 1) if any data was truncated +Modified API commands: + 'stats' - add 'Times Sent', 'Bytes Sent', 'Times Recv', 'Bytes Recv' + ---------- API V1.21 (cgminer v2.10.0) diff --git a/api.c b/api.c index bfd7f69f..a993483b 100644 --- a/api.c +++ b/api.c @@ -2875,6 +2875,10 @@ static int itemstats(struct io_data *io_data, int i, char *id, struct cgminer_st root = api_add_diff(root, "Max Diff", &(pool_stats->max_diff), false); root = api_add_uint32(root, "Min Diff Count", &(pool_stats->min_diff_count), false); root = api_add_uint32(root, "Max Diff Count", &(pool_stats->max_diff_count), false); + root = api_add_uint64(root, "Times Sent", &(pool_stats->times_sent), false); + root = api_add_uint64(root, "Bytes Sent", &(pool_stats->bytes_sent), false); + root = api_add_uint64(root, "Times Recv", &(pool_stats->times_received), false); + root = api_add_uint64(root, "Bytes Recv", &(pool_stats->bytes_received), false); } if (extra)