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

update: use bandwidth metering when cache is enabled #45

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

daytime-em
Copy link
Collaborator

@daytime-em daytime-em commented May 3, 2024

We don't need to change the DefaultBandwidthMeter because the DataSource is entirely responsible for reporting its own bandwidth stats. The approach we take instead is to report data transfer only when the DataSource is transferring from a remote data source.

  • MuxDataSource never reports its own data transfer stats. Instead it attaches the BandwidthMeter to the DataSources delegated-to, which are responsible for reporting their stats normally.
  • RevalidatingDataSource reports its own stats directly only if we have a response body to download (eg, an expired entry)

@daytime-em daytime-em requested a review from a team as a code owner May 3, 2024 16:25
@daytime-em daytime-em marked this pull request as draft May 3, 2024 16:36
@daytime-em
Copy link
Collaborator Author

Drafting for now, will revisit when we are not doing as much

Base automatically changed from releases/v1.0.0 to main May 20, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants