Skip to content

Commit

Permalink
chore: pre-allocate with surplus
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolay-komarevskiy committed Aug 26, 2024
1 parent 818ae53 commit 84f876c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl NodeWithMetrics {
node,
window_size,
is_healthy: false,
latencies: VecDeque::with_capacity(window_size),
availabilities: VecDeque::with_capacity(window_size),
latencies: VecDeque::with_capacity(window_size + 1),
availabilities: VecDeque::with_capacity(window_size + 1),
score: 0.0,
}
}
Expand Down

0 comments on commit 84f876c

Please sign in to comment.