skip to content
==> README.md <==
1# @ajax/mesh-net-counters
2
3meshd's live network counters: bytes and frames per peer link and kind, the control port's and the HTTP relay's.
4
5meshd's live network counters (mesh-abi "Network I/O").
6
7Per peer link, the bytes and frames by kind meshd reads and writes; the control port's and the HTTP relay's bytes and requests. Every counter is a cumulative u64 since meshd started, a relaxed atomic bumped once per frame or request by the thread that moved it; `fill` copies them into a host status block at snapshot time (viewers derive rates).
8
9```c
10#include "mesh/net_counters.h"
11```
12
13## Ported from
14
15[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-host/src/net.rs: `LinkCounters`, `Counters` (rx, tx, ctl, http, fill).
16
17## Tests
18
19- `tests/net_counters.c`: net.rs's `counters_fill_the_block`.
20
21## Licence
22
23MIT. See the repository's LICENSE.