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

fix how byteSize is calculated for different input formats #11

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

prezha
Copy link
Contributor

@prezha prezha commented Dec 7, 2024

this pr aims to improve handling of different input size formats

details: kubernetes/minikube#20044 (comment)

before

Dec 07 17:23:29 pr-20044-1733346028 nerdctld[109281]: 2024/12/07 17:23:29 strconv.ParseFloat: parsing "0B": invalid syntax
Dec 07 17:23:29 pr-20044-1733346028 systemd[1]: nerdctld.service: Main process exited, code=exited, status=1/FAILURE

after

Dec 07 22:16:36 pr-20044-1733346028 nerdctld[319578]: [GIN-debug] Listening and serving HTTP on listener what's bind with address@/run/nerdctld.sock
Dec 07 22:17:02 pr-20044-1733346028 nerdctld[319578]: [GIN] 2024/12/07 - 22:17:02 | 200 |       2.223µs |                 | HEAD     "/_ping"
Dec 07 22:17:02 pr-20044-1733346028 nerdctld[319578]: [GIN] 2024/12/07 - 22:17:02 | 200 |        1.66µs |                 | HEAD     "/_ping"
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 0B
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 0B
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 97.51MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 97.51MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 97.51MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 98.02MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 98.02MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 98.02MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 31.47MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 31.47MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 31.47MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 66.5MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 66.5MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 66.5MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 151.3MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 151.3MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 151.3MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 741.4kB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 741.4kB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 741.4kB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 95.33MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 95.33MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 95.33MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 70.7MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 70.7MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 70.7MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 91.71MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 91.71MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 91.71MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 97.51MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 97.51MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: 2024/12/07 22:17:03 byteSize: 97.51MB
Dec 07 22:17:03 pr-20044-1733346028 nerdctld[319578]: [GIN] 2024/12/07 - 22:17:03 | 200 |   44.563787ms |                 | GET      "/v1.44/images/json"

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