From f4f5e7d2ad4740cf0af70da3aa3b8bacfe4d3b6e Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 6 Apr 2017 17:50:38 +1000 Subject: ctdb-protocol: Add req_tunnel counts to ctdb statistics Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/protocol/protocol.h | 2 ++ ctdb/protocol/protocol_types.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'ctdb/protocol') diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h index 94be5913781..af263519c96 100644 --- a/ctdb/protocol/protocol.h +++ b/ctdb/protocol/protocol.h @@ -404,11 +404,13 @@ struct ctdb_statistics { uint32_t req_message; uint32_t req_control; uint32_t reply_control; + uint32_t req_tunnel; } node; struct { uint32_t req_call; uint32_t req_message; uint32_t req_control; + uint32_t req_tunnel; } client; struct { uint32_t call; diff --git a/ctdb/protocol/protocol_types.c b/ctdb/protocol/protocol_types.c index 83d5d78fa6e..416d4843b74 100644 --- a/ctdb/protocol/protocol_types.c +++ b/ctdb/protocol/protocol_types.c @@ -206,9 +206,11 @@ size_t ctdb_statistics_len(struct ctdb_statistics *in) ctdb_uint32_len(&in->node.req_message) + ctdb_uint32_len(&in->node.req_control) + ctdb_uint32_len(&in->node.reply_control) + + ctdb_uint32_len(&in->node.req_tunnel) + ctdb_uint32_len(&in->client.req_call) + ctdb_uint32_len(&in->client.req_message) + ctdb_uint32_len(&in->client.req_control) + + ctdb_uint32_len(&in->client.req_tunnel) + ctdb_uint32_len(&in->timeouts.call) + ctdb_uint32_len(&in->timeouts.control) + ctdb_uint32_len(&in->timeouts.traverse) + @@ -298,6 +300,9 @@ void ctdb_statistics_push(struct ctdb_statistics *in, uint8_t *buf, ctdb_uint32_push(&in->node.reply_control, buf+offset, &np); offset += np; + ctdb_uint32_push(&in->node.req_tunnel, buf+offset, &np); + offset += np; + ctdb_uint32_push(&in->client.req_call, buf+offset, &np); offset += np; @@ -307,6 +312,9 @@ void ctdb_statistics_push(struct ctdb_statistics *in, uint8_t *buf, ctdb_uint32_push(&in->client.req_control, buf+offset, &np); offset += np; + ctdb_uint32_push(&in->client.req_tunnel, buf+offset, &np); + offset += np; + ctdb_uint32_push(&in->timeouts.call, buf+offset, &np); offset += np; @@ -527,6 +535,13 @@ static int ctdb_statistics_pull_elems(uint8_t *buf, size_t buflen, } offset += np; + ret = ctdb_uint32_pull(buf+offset, buflen-offset, + &out->node.req_tunnel, &np); + if (ret != 0) { + return ret; + } + offset += np; + ret = ctdb_uint32_pull(buf+offset, buflen-offset, &out->client.req_call, &np); if (ret != 0) { @@ -548,6 +563,13 @@ static int ctdb_statistics_pull_elems(uint8_t *buf, size_t buflen, } offset += np; + ret = ctdb_uint32_pull(buf+offset, buflen-offset, + &out->client.req_tunnel, &np); + if (ret != 0) { + return ret; + } + offset += np; + ret = ctdb_uint32_pull(buf+offset, buflen-offset, &out->timeouts.call, &np); if (ret != 0) { -- cgit v1.2.1