MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / savings_pct

Method savings_pct

atomic-remote/src/streaming/progress.rs:173–179  ·  view source on GitHub ↗

Percentage of bytes saved by delta transfer (0.0 to 100.0).

(&self)

Source from the content-addressed store, hash-verified

171
172 /// Percentage of bytes saved by delta transfer (0.0 to 100.0).
173 pub fn savings_pct(&self) -> f64 {
174 let total = self.total_bytes();
175 if total == 0 {
176 return 0.0;
177 }
178 self.bytes_skipped as f64 / total as f64 * 100.0
179 }
180
181 /// Effective transfer rate in bytes per second.
182 ///

Callers 1

Calls 1

total_bytesMethod · 0.45

Tested by 1