Skip to content

Commit

Permalink
Use float for speed.
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost committed Oct 2, 2019
1 parent 29f61c4 commit 2a50b5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion s2/cmd/s2c/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Options:`)
elapsed := time.Since(start)
mbpersec := (float64(input) / (1024 * 1024)) / (float64(elapsed) / (float64(time.Second)))
pct := float64(wc.n) * 100 / float64(input)
fmt.Printf("%d -> %d [%.02f%%]; %dMB/s\n", input, wc.n, pct, int(mbpersec))
fmt.Printf("%d -> %d [%.02f%%]; %.01fMB/s\n", input, wc.n, pct, mbpersec)
}
if *remove {
closeOnce.Do(func() {
Expand Down
2 changes: 1 addition & 1 deletion s2/cmd/s2d/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Options:`)
elapsed := time.Since(start)
mbPerSec := (float64(output) / (1024 * 1024)) / (float64(elapsed) / (float64(time.Second)))
pct := float64(output) * 100 / float64(rc.n)
fmt.Printf("%d -> %d [%.02f%%]; %dMB/s\n", rc.n, output, pct, int(mbPerSec))
fmt.Printf("%d -> %d [%.02f%%]; %.01fMB/s\n", rc.n, output, pct, mbPerSec)
}
if *remove {
closeOnce.Do(func() {
Expand Down

0 comments on commit 2a50b5f

Please sign in to comment.