-
Notifications
You must be signed in to change notification settings - Fork 257
Add weighted scoring to NS API #6144
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
base: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
eb2df3e to
90e07d9
Compare
| (file_download_score, ping_ips_performance) | ||
| }) | ||
| .unwrap_or(0f64); | ||
| .unwrap_or((0.0, 0.0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say define a helper struct, like
struct NodeScore {
download_speed_score: f64,
ping_ips_score: f64
}rather than passing an (f64, f64) tuple, because somebody, at some point, will accidentally mix them up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or maybe you could even include there mixnet_performance and have fn calculate_weighted_score(&self) -> f64 so that it would be slightly more maintainable and easier to adjust the inidividual weights
This change is