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

feat: set max of the RateLimiter to the rate limit in config #966

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

gaius-qi
Copy link
Member

Description

This pull request includes modifications to the rate limiter configuration in the dragonfly-client/src/resource/piece.rs file. The changes aim to make the rate limiter's maximum value configurable based on the provided configuration rather than using hardcoded constants.

Rate limiter configuration changes:

  • Updated the download rate limiter to use config.download.rate_limit for the maximum value instead of hardcoded constants.
  • Updated the upload rate limiter to use config.upload.rate_limit for the maximum value instead of hardcoded constants.
  • Updated the proxy prefetch rate limiter to use config.proxy.prefetch_rate_limit for the maximum value instead of hardcoded constants.

Related Issue

Motivation and Context

Screenshots (if appropriate)

@gaius-qi gaius-qi added the enhancement New feature or request label Feb 10, 2025
@gaius-qi gaius-qi added this to the v2.3.0 milestone Feb 10, 2025
@gaius-qi gaius-qi self-assigned this Feb 10, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner February 10, 2025 03:08
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.19%. Comparing base (40264df) to head (bcc1c69).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #966   +/-   ##
=======================================
  Coverage   33.19%   33.19%           
=======================================
  Files          59       59           
  Lines        9638     9638           
=======================================
  Hits         3199     3199           
  Misses       6439     6439           
Files with missing lines Coverage Δ
dragonfly-client/src/resource/piece.rs 55.51% <ø> (ø)

@gaius-qi gaius-qi merged commit c063a2e into main Feb 10, 2025
6 checks passed
@gaius-qi gaius-qi deleted the feature/rate-limit branch February 10, 2025 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants