Enable elapsed stats calculation and slow piece stealing

This commit is contained in:
Igor Katson 2021-06-30 00:32:38 +01:00
parent ccf19b7921
commit 1cb7a7bbc6
4 changed files with 103 additions and 29 deletions

View file

@ -143,6 +143,17 @@ impl ChunkTracker {
piece.index, chunk_info, chunk_range,
);
// TODO: remove me, it's for debugging
// {
// use std::io::Write;
// let mut f = std::fs::OpenOptions::new()
// .write(true)
// .create(true)
// .open("/tmp/chunks")
// .unwrap();
// write!(f, "{:?}", &self.have).unwrap();
// }
if chunk_range.all() {
return Some(ChunkMarkingResult::Completed);
}