-
Notifications
You must be signed in to change notification settings - Fork 74
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
Timeout metrics are six orders of magnitude too long #315
Comments
Hey @hho, Thanks for reporting this issue. This looks like a conversion issue between Go and JS values. If you have time to look into the code, it'd be great. Otherwise, I need to find some time to do it. |
TBH I'm struggling to learn Go, but I think found it (#316). (I've also adapted the tests, not sure if you want those changes too?) |
@hho The tests pass, so I think we can leave it. Thanks for spotting this issue and fixing it! 🙏 |
@mostafa Somehow the new release still shows this bug, but if I build the v0.29.0 tag myself it's fixed… Could it be there's something wrong with the build? It seems like it just downloaded an earlier build instead of rebuilding it? |
@hho This is strange. I'll see if I can reproduce this on my machine. Are you using arm64 or amd64 builds? |
@hho Can you also give me an snippet of the script you use to test? (please redact sensitive information before posting) |
I used this command to build the executable on my machine: GOOS=darwin GOARCH=arm64 xk6 build --output xk6-kafka --with github.com/mostafa/xk6-kafka@v0.29.0 And this is the result of running xk6-kafka v0.55.0 (go1.23.3, darwin/arm64)
Extensions:
github.com/mostafa/xk6-kafka v0.29.0, k6/x/kafka [js] |
I'm using linux/amd64. You can reproduce it with the included Using the downloaded release binary
Note for example the Rebuilding the checked out code
Now the bug is fixed (timeout correctly shown as 10s). Rebuilding from the v0.29.0 go module
Building without the When you check the list of builds, you see that the |
OK, I've read up a bit on Go modules… It's indeed like I thought: The module Later updating the tag does not change the published module anymore, as explained on the Go blog:
This is why |
I'll fix it. |
As explained in the FAQ, the timeout values are configured in nanoseconds.
And it works: When I set
batchTimeout
to500e6
I get 500ms of timeout.However, the metric reported after the test says:
which equates to 500000 seconds. So the given metric is 1000000× too large.
I believe the same applies to
kafka_writer_read_timeout
andkafka_writer_write_timeout
.The text was updated successfully, but these errors were encountered: