You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release v3.0.0
Modernise the example, add link-capacity utilisation, and tidy the rate
maths.
- migrate the example from the retired cmdparser_cpp to usage_cpp: the
options are now declared as a usage_t, help text is generated, and the
numeric interval is validated by the parser. The cmdparser submodule is
replaced by usage; common is still required by the library itself.
- add interface_t::link_speed() (Mbit/s from /sys/class/net/<if>/speed, 0
when unavailable) and interface_t::link_percent() (utilisation relative
to the link's capacity) alongside the existing peak-relative percent(),
so both metrics are available depending on the use case.
- replace the magic 1.049/8.3886 factors (which netted to ~x8) with an
honest bytes*8 bit conversion, and use decimal kilo/mega/giga (1000)
instead of binary (1024) for network rates. Displayed numbers shift
slightly.
Bug fixes:
- guard interface_t::update() against counter resets/wraps that would
otherwise underflow into an astronomically large bogus rate
- guard the unguarded front()/back() in clean_up() and pass unsigned char
to isspace()/isalpha()
- drop the declared-but-undefined bps_t(interface_t&) and default the
bps_t copy constructor (silences -Wdeprecated-copy)
Bump the common submodule to a revision that builds on current compilers
(GCC 15), wire the example's keep (-k) option so it actually keeps the
unit, and refresh the GitHub Actions (checkout@v5, create/upload actions
@v2, push/pull_request triggers, submodules in the release checkout).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>