mirror of
https://github.com/minio/minio.git
synced 2025-01-24 13:13:16 -05:00
fix: make slice cap of right size (#17192)
This commit is contained in:
parent
fd2959fa3a
commit
9a799065b3
@ -2380,7 +2380,7 @@ func getWebhookMetrics() *MetricsGroup {
|
|||||||
}
|
}
|
||||||
mg.RegisterRead(func(ctx context.Context) []Metric {
|
mg.RegisterRead(func(ctx context.Context) []Metric {
|
||||||
tgts := append(logger.SystemTargets(), logger.AuditTargets()...)
|
tgts := append(logger.SystemTargets(), logger.AuditTargets()...)
|
||||||
metrics := make([]Metric, 0, len(tgts))
|
metrics := make([]Metric, 0, len(tgts)*4)
|
||||||
for _, t := range tgts {
|
for _, t := range tgts {
|
||||||
isOnline := 0
|
isOnline := 0
|
||||||
if t.IsOnline(ctx) {
|
if t.IsOnline(ctx) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user