Skip to content

Commit

Permalink
Sort hosts on detailed output (#218)
Browse files Browse the repository at this point in the history
Order was random due to map type.
  • Loading branch information
klauspost authored Jun 27, 2022
1 parent 2f3dcee commit bf0c376
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ func printMixedOpAnalysis(ctx *cli.Context, aggr aggregate.Aggregated, details b
console.SetColor("Print", color.New(color.FgWhite))
console.Println("\nThroughput by host:")

for ep, totals := range eps {
for _, ep := range ops.HostNames {
totals := eps[ep]
console.SetColor("Print", color.New(color.FgWhite))
console.Print(" * ", ep, ": Avg: ", totals.StringDetails(details), ".")
if totals.Errors > 0 {
Expand Down Expand Up @@ -569,7 +570,8 @@ func printRequestAnalysis(ctx *cli.Context, ops aggregate.Operation, details boo
console.SetColor("Print", color.New(color.FgHiWhite))
console.Println("\nRequests by host:")

for ep, s := range reqs.ByHost {
for _, ep := range ops.HostNames {
s := eps[ep]
if s.Requests <= 1 {
continue
}
Expand Down

0 comments on commit bf0c376

Please sign in to comment.