MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / check_network

Function check_network

src/doctor.rs:697–712  ·  view source on GitHub ↗

Check network connectivity.

(dc: &mut DoctorCounters)

Source from the content-addressed store, hash-verified

695
696/// Check network connectivity.
697fn check_network(dc: &mut DoctorCounters) {
698 eprintln!("\n\x1b[1mNetwork\x1b[0m");
699 if let Some(total) = crate::cloud::fetch_worldwide_total() {
700 dc.pass(&format!(
701 "Worldwide counter reachable (total: {})",
702 format_token_count(total)
703 ));
704 } else {
705 dc.warn("Worldwide counter unreachable (offline or timeout)");
706 }
707 if crate::cloud::fetch_latest_version().is_some() {
708 dc.pass("GitHub releases API reachable");
709 } else {
710 dc.warn("GitHub releases API unreachable (offline or timeout)");
711 }
712}
713
714/// Print final summary.
715fn print_summary(dc: &DoctorCounters) {

Callers 1

run_doctorFunction · 0.85

Calls 4

fetch_worldwide_totalFunction · 0.85
passMethod · 0.80
warnMethod · 0.80
fetch_latest_versionFunction · 0.70

Tested by

no test coverage detected