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

Human friendly download logs #8671

Merged
merged 3 commits into from Jul 12, 2023
Merged

Human friendly download logs #8671

merged 3 commits into from Jul 12, 2023

Conversation

viren-nadkarni
Copy link
Member

@viren-nadkarni viren-nadkarni commented Jul 11, 2023

This PR makes file sizes of downloads print as kilobytes.

Earlier:

Starting download from https://github.com/etspaceman/kinesis-mock/releases/download/0.3.10/kinesis-mock-linux-amd64-static to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static (20227140 bytes)
Written 1048576 bytes (total 1048576) to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static
Written 1048576 bytes (total 2097152) to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static
Written 1048576 bytes (total 3145728) to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static

Now:

Starting download from https://github.com/etspaceman/kinesis-mock/releases/download/0.3.10/kinesis-mock-linux-amd64-static to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static
Written 1024K (total 1024K of 19753K) to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static
Written 1024K (total 2048K of 19753K) to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static
Written 1024K (total 3072K of 19753K) to /home/viren/repo/localstack/.filesystem/var/lib/localstack/lib/kinesis-mock/0.3.10/kinesis-mock-linux-amd64-static

In this example, because of fewer zeros, you know from one glance that file is about 19 MB, which is a quality of life improvement. It's also easier to estimate the download progress.

@viren-nadkarni viren-nadkarni self-assigned this Jul 11, 2023
@viren-nadkarni viren-nadkarni added semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases semver: patch Non-breaking changes which can be included in patch releases and removed semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Jul 11, 2023
@github-actions
Copy link

github-actions bot commented Jul 11, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 25m 50s ⏱️
2 218 tests 1 883 ✔️ 335 💤 0
2 219 runs  1 883 ✔️ 336 💤 0

Results for commit c23749e.

♻️ This comment has been updated with latest results.

@coveralls
Copy link

Coverage Status

coverage: 82.18% (-0.01%) from 82.19% when pulling c23749e on http-human-readable-stats into 9fb6be1 on master.

@viren-nadkarni viren-nadkarni marked this pull request as ready for review July 12, 2023 09:06
@viren-nadkarni viren-nadkarni added this to the 2.2 milestone Jul 12, 2023
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! the design is very human!

@thrau thrau merged commit 7f57e63 into master Jul 12, 2023
25 checks passed
@thrau thrau deleted the http-human-readable-stats branch July 12, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants