skip to content
==> README.md <==
1# @ajax/mesh-peer-view
2
3Two pieces of the fleet thread's scheduler glue: a migrated view arriving as F_VIEW chunks from its
4source (`mpv_take`: the total must fit the program's view and stay the same across chunks, no chunk may
5pass it, and a duplicate chunk counts once), and a member's load smoothed over its once-a-second
6samples (`mpv_load_add`, a time constant of about 5 samples) so a tenant's spike does not look busy.
7
8## Ported from
9
10[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) `crates/mesh-host/src/peer_sched.rs`:
11`ViewWait`, `view_take`, `LoadAvg`, `LOAD_ALPHA`.
12
13## Tests
14
15`tests/view.c`: the Rust's `view_chunks_are_bounded_and_counted_once` (review finding 11), and the
16smoothing.
17
18## Licence
19
20MIT. See the repository's LICENSE.