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

Alpine requires coreutils to get timestamp in microseconds #104

Merged

Conversation

davidkopp
Copy link
Contributor

Fixes #103

The cause was that the timestamp only had a precision of seconds, not microseconds.

Debugging log statements:

step_time_us: 11
step_time_s: 0.00

The solution is to install coreutils if you are using an Alpine image.

In this PR I included a hint in the README and a check in the script if the timestamp has enough accuracy.
Not sure if the check is ok for you in the way I implemented it (checking the number of digits).

@ArneTR
Copy link
Member

ArneTR commented Oct 22, 2024

Thank you so much, looks really good.

The README has a part with the needed dependencies, I will add that also there.

Since you are using alpine: Did you install gawk, or which package did you use?

@ArneTR ArneTR merged commit d28c7dd into green-coding-solutions:main Oct 22, 2024
4 checks passed
@davidkopp
Copy link
Contributor Author

davidkopp commented Oct 23, 2024

Alpine includes awk from busybox: https://wiki.alpinelinux.org/wiki/Awk
I didn't have issues so far with it. So it was not necessary to install gawk.

@davidkopp davidkopp deleted the alpine-timestamp-in-microseconds branch October 23, 2024 05:05
@ArneTR
Copy link
Member

ArneTR commented Oct 23, 2024

ty, updated

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.

Measurement fails with Alpine image: Division by zero
2 participants