fix output format for summary

This commit is contained in:
six-ddc 2022-02-19 10:07:21 +08:00
parent 8b16c126a3
commit 7ec8b398be
2 changed files with 4 additions and 4 deletions

View File

@ -181,7 +181,7 @@ func main() {
desc += fmt.Sprintf(" for %s", duration.String())
}
desc += fmt.Sprintf(" using %d connection(s).", *concurrency)
fmt.Fprintln(outStream,desc)
fmt.Fprintln(outStream, desc)
// charts listener
var ln net.Listener
@ -191,9 +191,9 @@ func main() {
errAndExit(err.Error())
return
}
fmt.Fprintln(outStream,"@ Real-time charts is listening on http://%s", ln.Addr().String())
fmt.Fprintf(outStream, "@ Real-time charts is listening on http://%s\n", ln.Addr().String())
}
fmt.Fprintln(outStream,"")
fmt.Fprintln(outStream, "")
// do request
go requester.Run()

View File

@ -68,7 +68,7 @@ func (p *Printer) PrintLoop(snapshot func() *SnapshotReport, interval time.Durat
var backCursor string
cl := clearLine
if p.summary {
if p.summary || interval == 0 {
cl = nil
}
echo := func(isFinal bool) {