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

[FR] show file size and download speed #530

Open
DevliegereM opened this issue Nov 5, 2024 · 1 comment
Open

[FR] show file size and download speed #530

DevliegereM opened this issue Nov 5, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@DevliegereM
Copy link

PLEASE NOTE THAT FEATURE REQUESTS ARE ONLY CONSIDERED AGAINST v.28.0+

Is your feature request related to a problem? Please describe.
No problem.

Describe the solution you'd like
When downloading the InstallAssistant.pkg it would be nice to see how big the file size is and what the download speed is. This is to prevent users from complaining due to the filesize and the download speed. Currently nothing is shown and some of my users have a limited data plan.

Describe alternatives you've considered
No alternative but just a reminder that the download size is always around 15GB and can take a long while if you have slow download speeds.

Additional context
Screenshot 2024-11-05 at 13 12 14
Screenshot attached shows how we implemented it currently in our script when upgrading to macOS 15.

@DevliegereM DevliegereM added the enhancement New feature or request label Nov 5, 2024
@DevliegereM DevliegereM changed the title [FR] [FR] show file size and download speed Nov 5, 2024
@DevliegereM
Copy link
Author

DevliegereM commented Nov 5, 2024

Code how we pull the information:
Download Size:

byteSize=$( ljt '0.size' "$workdir/mist-list.json" )
gigaByteSize=$( echo "$byteSize" | awk '{ split( "B KB MB GB TB PB EB ZB YB" , v ); s=1; while( $1>1024 && s<9 ){ $1/=1024; s++ } printf "%.2f %s", $1, v[s] }' )

Download Speed in Mbps:

networkQuality -s -v -c > /var/tmp/networkQuality.json
downloadSpeed=$( ljt 'dl_throughput' < "/var/tmp/networkQuality.json" )
mbps=$( echo "scale=2; ( $downloadSpeed / 1000000 )" | bc )
rm /var/tmp/networkQuality.json

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

No branches or pull requests

2 participants