| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Synapse scores real-world network quality from measurements you already have. It does not run speed tests — you collect the numbers; Synapse turns them into three metrics:
| Metric | Role | Inputs |
|---|---|---|
| Vortex | Performance / flow | down/up Mbps, ping, jitter, packet loss |
| Radiance | Wireless physical quality | RSSI, noise floor, channel width |
| Axon | Unified health | √(Vortex × Radiance), or Vortex alone on wired links |
Scores are dimensionless. Use ScoreBand for a coarse qualitative reading (critical → excellent).
[dependencies]
synapse-rs = "1.1"
# Optional Serde support
# synapse-rs = { version = "1.1", features = ["serde"] }use synapse_rs::{NetworkData, ScoreBand};
fn main() {
let data = NetworkData::new()
.with_down_mbps(150.0)
.with_up_mbps(40.0)
.with_ping_ms(18.0)
.with_jitter_ms(2.0)
.with_packet_loss_percent(0.0)
.with_rssi_dbm(-60.0)
.with_noise_dbm(-90.0)
.with_channel_width_mhz(40.0);
if let Some(axon) = data.calculate_axon() {
println!("Axon: {:.2} ({})", axon, ScoreBand::from_score(axon));
}
// Prefer try_* when you need structured errors:
match data.try_vortex() {
Ok(v) => println!("Vortex: {v:.2}"),
Err(e) => eprintln!("Vortex unavailable: {e}"),
}
}try_vortex / try_radiance / try_axon reject non-finite values, negative speeds/latency/jitter, packet loss outside 0..=100, zero channel width, and RSSI below the noise floor. The calculate_* helpers return None in those cases.
cargo run --example axon
cargo run --example vortex
cargo run --example radiance
cargo run --example axon --features serdeMIT — see LICENSE.
| Back | FazBrowse Home | New Git URL |