Skip to content

Commit

Permalink
fix erros & format
Browse files Browse the repository at this point in the history
  • Loading branch information
britaniar committed Dec 8, 2023
1 parent 8c7d319 commit 02703c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/loadtest/util/placement.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ func collectApplyMetrics(ctx context.Context, hubClient client.Client, deadline,
// succeeded
klog.V(3).Infof("the cluster resource placement `%s` succeeded", crpName)
endTime := time.Since(startTime)
if fleetSize, clusterNames, err = getFleetSize(crp, clusterNames); err != nil {
var newClusterNames []string
if fleetSize, newClusterNames, err = getFleetSize(crp, clusterNames); err != nil {
klog.ErrorS(err, "Failed to get fleet size.")
return "0"
}
clusterNames = newClusterNames

Check failure on line 165 in hack/loadtest/util/placement.go

View workflow job for this annotation

GitHub Actions / Lint

ineffectual assignment to clusterNames (ineffassign)
LoadTestApplyCountMetric.WithLabelValues(currency, fleetSize, "succeed").Inc()
applySuccessCount.Inc()
LoadTestApplyLatencyMetric.WithLabelValues(currency, fleetSize).Observe(endTime.Seconds())
Expand Down

0 comments on commit 02703c9

Please sign in to comment.