diff options
author | Amitay Isaacs <amitay@gmail.com> | 2017-04-06 17:50:38 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2017-10-10 11:45:19 +0200 |
commit | f4f5e7d2ad4740cf0af70da3aa3b8bacfe4d3b6e (patch) | |
tree | db12179f683b07170e1c671a6bfa32c8a93a1b47 /ctdb/protocol | |
parent | 9c51535775c9564d0f908ede6cefc2998fe7b2c4 (diff) | |
download | samba-f4f5e7d2ad4740cf0af70da3aa3b8bacfe4d3b6e.tar.gz |
ctdb-protocol: Add req_tunnel counts to ctdb statistics
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/protocol')
-rw-r--r-- | ctdb/protocol/protocol.h | 2 | ||||
-rw-r--r-- | ctdb/protocol/protocol_types.c | 22 |
2 files changed, 24 insertions, 0 deletions
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; @@ -528,6 +536,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) { return ret; @@ -549,6 +564,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) { return ret; |