test: Mend the transfer benchmark

This commit is contained in:
Jakob Borg
2018-02-03 10:28:37 +01:00
parent c0ab669142
commit 2fdf9bc55d
2 changed files with 26 additions and 9 deletions

View File

@@ -453,7 +453,10 @@ func startWalker(dir string, res chan<- fileInfo, abort <-chan struct{}) chan er
f = fileInfo{
name: rn,
mode: info.Mode(),
mod: info.ModTime().Truncate(time.Microsecond).UnixNano(),
// comparing timestamps with better precision than a second
// is problematic as there is rounding and truncatign going
// on at every level
mod: info.ModTime().Unix(),
size: info.Size(),
}
sum, err := md5file(path)