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

Suggestion: display disk and size attributes with appropriate byte size units #820

Open
williamtheaker opened this issue May 10, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@williamtheaker
Copy link
Contributor

It would be easier to understand disk usage if the disk and VM size exposed by commands like tart list and tart get were formatted with appropriate byte modifier.

Current:

tart list
Source Name           Disk Size State
local  sonoma-vanilla 51   17   stopped

Reporting the disk allocation size as 51GB would be slightly easier to grok and match the behavior of similar tools like Docker and Podman:

podman system df -v
Images space usage:

REPOSITORY                 TAG         IMAGE ID      CREATED     SIZE        SHARED SIZE  UNIQUE SIZE  CONTAINERS
docker.io/library/alpine   20240329    f8052e6d8143  6 weeks     8.986MB     0B           8.986MB      0
docker.io/library/busybox  latest      23d6e6de0b63  11 months   4.289MB     0B           4.289MB      0

Containers space usage:

CONTAINER ID  IMAGE       COMMAND     LOCAL VOLUMES  SIZE        CREATED     STATUS      NAMES

Local Volumes space usage:

VOLUME NAME                                                       LINKS       SIZE
bfdd925af2aa4ca248f1eb4d2f85a3248ccba91234c5bb5ead4696b50d0e04e4  0           452B

For example, the base size ofghcr.io/cirruslabs/debian:latest is 1.4GB, but Tart reports it as "1," which is less precise.

It might even be useful to rename Disk to something like "Allocated" since the current terminology can be kind of confusing.

@fkorotkov fkorotkov added enhancement New feature or request good first issue Good for newcomers labels May 28, 2024
@fkorotkov
Copy link
Contributor

For backward compatibility we can persist the behaviour for json output and add GB for humans. Going from ints to floats is definitely a breaking change and only useful for small Linux images so IMO we can skip it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants