fix trimming

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-06-26 21:57:57 +02:00
parent db5929f4a5
commit 04edeccbf4
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -298,8 +298,12 @@ var importAnalyzeCmd = &cli.Command{
})
if len(expensiveInvocs) != 0 {
leastExpensiveInvoc = expensiveInvocs[len(expensiveInvocs)-1].Invoc.Duration
n := 30
if len(expensiveInvocs) < n {
n = len(expensiveInvocs)
}
expensiveInvocs = expensiveInvocs[:n]
}
expensiveInvocs = expensiveInvocs[:30]
}
}()
}