Skip to content

Commit

Permalink
added sorting when using cache
Browse files Browse the repository at this point in the history
  • Loading branch information
eze-kiel committed Apr 20, 2021
1 parent ff29c75 commit 6ebaa84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/slowql-digest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ func main() {
if err != nil {
a.logger.Errorf("cannot compute statistics: %s. This can lead to inacurrate stats")
}
stats, err = sortResults(stats, o.order, o.dec)
if err != nil {
a.logger.Errorf("cannot sort results: %s", err)
o.order = "random"
stats, err = sortResults(stats, o.order, o.dec)
if err != nil {
a.logger.Fatalf("cannot sort results: %s", err)
}
}
showResults(stats, o.order, o.top, o.dec, res.TotalDuration)
return
}
Expand Down Expand Up @@ -242,7 +251,7 @@ Fingerprint : %s
Schema : %s
Min/Max/Mean time : %s/%s/%s
p50/p95 : %s/%s
Concurrency : %2.2f%%
Concurrency : %2.4f%%
Standard deviation : %s
Cum Query Time : %s
Cum Lock Time : %s
Expand Down

0 comments on commit 6ebaa84

Please sign in to comment.