Enable elapsed stats calculation and slow piece stealing
This commit is contained in:
parent
ccf19b7921
commit
1cb7a7bbc6
4 changed files with 103 additions and 29 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue