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

(API) Allow for caller to specify the size of upload/download tests #121

Open
cirne opened this issue Mar 27, 2023 · 1 comment
Open

(API) Allow for caller to specify the size of upload/download tests #121

cirne opened this issue Mar 27, 2023 · 1 comment

Comments

@cirne
Copy link

cirne commented Mar 27, 2023

_ = downloadRequest(_context, s, 3)

It appears that server.DownloadTest and server.UploadTest use a hard coded image size (which essentially drives the bandwidth impact of these tests) to dlSizes[3] and ulSizes[3].

var (
dlSizes = [...]int{350, 500, 750, 1000, 1500, 2000, 2500, 3000, 3500, 4000}
ulSizes = [...]int{100, 300, 500, 800, 1000, 1500, 2500, 3000, 3500, 4000} // kB
)

I am using the GO API to write a simple program that periodically runs speedtest on a regular basis. I'd like to reduce the size of each download/upload test to reduce overall bandwidth consumption since it will be run on an ongoing basis. Recognizing the is likely a tradeoff between test size/bandwith impact and accuracy, but it would be great if the developer could evaluate that tradeoff rather than rely on the hardcoded values currently provided.

@r3inbowari
Copy link
Collaborator

Hi, @cirne. I think reduce the size of each download/upload request will not reduce overall bandwidth consumption. Because reducing the size will send more download/upload requests. The overall result will not be much different.

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

No branches or pull requests

2 participants