mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-18 00:14:12 +00:00
preallocate lastcontexts map
This commit is contained in:
@@ -24,7 +24,7 @@ func TimelineCLI(timeline types.Timeline, verbosity types.Verbosity) {
|
||||
// a slice keeps its order
|
||||
keys, currentContext := initKeysContext(timeline) // currentcontext to follow when important thing changed
|
||||
latestContext := timeline.GetLatestContextsByNodes() // so that we have fully updated context when we print
|
||||
lastContext := map[string]types.LogCtx{} // just to follow when important thing changed
|
||||
lastContext := make(map[string]types.LogCtx, len(timeline)) // just to follow when important thing changed
|
||||
|
||||
w := tabwriter.NewWriter(os.Stdout, 8, 8, 3, ' ', tabwriter.DiscardEmptyColumns)
|
||||
defer w.Flush()
|
||||
|
Reference in New Issue
Block a user