MCPcopy Create free account
hub / github.com/RetypeOS/parcode / print_metric

Function print_metric

examples/audit.rs:294–302  ·  view source on GitHub ↗
(label: &str, par: std::time::Duration, bin: std::time::Duration)

Source from the content-addressed store, hash-verified

292// --- UTILS ---
293
294fn print_metric(label: &str, par: std::time::Duration, bin: std::time::Duration) {
295 let p_ms = par.as_micros() as f64 / 1000.0;
296 let b_ms = bin.as_micros() as f64 / 1000.0;
297 let ratio = b_ms / p_ms;
298 println!(
299 "{:<15} | Parcode: {:>8.2} ms | Bincode: {:>8.2} ms | Speedup: {:>5.1}x",
300 label, p_ms, b_ms, ratio
301 );
302}
303
304fn print_ram(label: &str, par: usize, bin: usize) {
305 let p_mb = par as f64 / 1048576.0;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected