Kyle Kim (kimkyle@) e1d936b339
Add network-bytes-in and network-bytes-out metric support under CLUSTER SLOT-STATS command (#20) (#720)
Adds two new metrics for per-slot statistics, network-bytes-in and
network-bytes-out. The network bytes are inclusive of replication bytes
but exclude other types of network traffic such as clusterbus traffic.

#### network-bytes-in
The metric tracks network ingress bytes under per-slot context, by
reverse calculation of `c->argv_len_sum` and `c->argc`, stored under a
newly introduced field `c->net_input_bytes_curr_cmd`.

#### network-bytes-out
The metric tracks network egress bytes under per-slot context, by
hooking onto COB buffer mutations.

#### sample response
Both metrics are reported under the `CLUSTER SLOT-STATS` command.
```
127.0.0.1:6379> cluster slot-stats slotsrange 0 0
1) 1) (integer) 0
    2) 1) "key-count"
       2) (integer) 0
       3) "cpu-usec"
       4) (integer) 0
       5) "network-bytes-in"
       6) (integer) 0
       7) "network-bytes-out"
       8) (integer) 0
```

---------

Signed-off-by: Kyle Kim <kimkyle@amazon.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
2024-07-26 16:06:16 -07:00
..
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-04-16 21:17:38 +02:00
2024-06-07 01:40:55 +02:00
2024-07-17 13:59:33 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-06-07 01:40:55 +02:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-06-07 01:40:55 +02:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-05-17 13:35:31 +02:00