Skip to content

Commit

Permalink
koordlet: reduce unnecessary call of Err() for better performance (#2071
Browse files Browse the repository at this point in the history
)

Signed-off-by: yangfeiyu <yangfeiyu20102011@163.com>
  • Loading branch information
yangfeiyu20102011 committed May 30, 2024
1 parent a685498 commit 8e41abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/koordlet/metriccache/metric_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func (r *aggregateResult) AddSeries(series promstorage.Series) error {
}
it := series.Iterator()
for it.Next() {
if it.Err() != nil {
return it.Err()
if err := it.Err(); err != nil {
return err
}
t, v := it.At()
r.points = append(r.points, &Point{
Expand Down

0 comments on commit 8e41abc

Please sign in to comment.