1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

API stats - display pool byte transfer stats

This commit is contained in:
Kano 2012-12-13 01:09:03 +11:00
parent 138465bf0c
commit 800ea01658
2 changed files with 7 additions and 0 deletions

View File

@ -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)

4
api.c
View File

@ -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)