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

Merged
merged 6 commits into from
Oct 29, 2024
Merged

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.80%. Comparing base (6fd86d3) to head (9119f36).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7711      +/-   ##
==========================================
- Coverage   81.84%   81.80%   -0.04%     
==========================================
  Files         374      374              
  Lines       38151    38149       -2     
==========================================
- Hits        31224    31208      -16     
- Misses       5663     5672       +9     
- Partials     1264     1269       +5     
Files with missing lines Coverage Δ
balancer/endpointsharding/endpointsharding.go 64.86% <100.00%> (ø)
balancer/grpclb/grpclb_picker.go 96.70% <100.00%> (ø)
balancer/leastrequest/leastrequest.go 87.34% <ø> (ø)
balancer/pickfirst/pickfirst.go 83.95% <ø> (ø)
balancer/rls/internal/adaptive/adaptive.go 100.00% <ø> (ø)
balancer/roundrobin/roundrobin.go 100.00% <100.00%> (ø)
balancer/weightedroundrobin/balancer.go 79.45% <ø> (ø)
internal/backoff/backoff.go 83.33% <ø> (ø)
internal/resolver/dns/dns_resolver.go 89.39% <100.00%> (ø)
internal/transport/http2_server.go 91.03% <100.00%> (+0.09%) ⬆️
... and 8 more

... and 15 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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for making these changes.

Copy link
Member

@arvindbr8 arvindbr8 left a comment

Choose a reason for hiding this comment

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

Sorry should have been faster in reviewing this PR with such a horizontal span. I resolved the conflict.

LGTM! Thanks for taking care of this

@arvindbr8 arvindbr8 merged commit 52d7f6a into grpc:master Oct 29, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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