Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple: switch to math/rand/v2 #7711

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcoferrer
Copy link
Contributor

@marcoferrer marcoferrer commented Oct 8, 2024

Fixes #7293

This PR replaces usage of math/rand with math/rand/v2.

RELEASE NOTES: none

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.76%. Comparing base (5f178a8) to head (cc929ad).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7711      +/-   ##
==========================================
- Coverage   81.77%   81.76%   -0.02%     
==========================================
  Files         361      361              
  Lines       27826    27825       -1     
==========================================
- Hits        22756    22752       -4     
- Misses       3865     3867       +2     
- Partials     1205     1206       +1     
Files with missing lines Coverage Δ
balancer/endpointsharding/endpointsharding.go 66.92% <100.00%> (ø)
balancer/grpclb/grpclb_picker.go 97.43% <100.00%> (ø)
balancer/leastrequest/leastrequest.go 88.88% <ø> (ø)
balancer/pickfirst/pickfirst.go 84.42% <ø> (+0.68%) ⬆️
balancer/rls/internal/adaptive/adaptive.go 100.00% <ø> (ø)
balancer/roundrobin/roundrobin.go 100.00% <100.00%> (ø)
balancer/weightedroundrobin/balancer.go 80.58% <ø> (ø)
internal/backoff/backoff.go 87.09% <ø> (ø)
internal/resolver/dns/dns_resolver.go 90.86% <100.00%> (ø)
internal/transport/http2_server.go 90.93% <100.00%> (-0.82%) ⬇️
... and 8 more

... and 17 files with indirect coverage changes

@marcoferrer marcoferrer marked this pull request as ready for review October 8, 2024 23:48
@marcoferrer marcoferrer requested a review from ash2k October 9, 2024 17:15
@easwars easwars changed the title switch to math/rand/v2 multiple: switch to math/rand/v2 Oct 9, 2024
@easwars easwars added the Type: Internal Cleanup Refactors, etc label Oct 9, 2024
@easwars easwars added this to the 1.68 Release milestone Oct 9, 2024
@purnesh42H purnesh42H modified the milestones: 1.68 Release, 1.69 Release Oct 16, 2024
@purnesh42H purnesh42H requested review from easwars and removed request for ash2k October 16, 2024 06:09
@@ -19,7 +19,7 @@
package grpclb

import (
"math/rand"
"math/rand/v2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be a little painful. But could you please rename this import as rand "math/rand/v2", so that we can track the package name from use sites. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to using math/rand/v2 to get perf enhancements
5 participants