You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Just in case someone might have the same issue as I do, if you are use ghz for pressure testing a grpc service whose request has int64 variable in it, you might lose precision when passing in. I tested some smaller numbers and it was fine. I debugged into it and it seems that the json.Unmarshal([]byte(*data), &dataObj) caused it.
To Reproduce
As the setup above.
Expected behavior
Something like this should have been passed to the server.
{"uuid": {"most_significant_bits": -1472264933949945808, "least_significant_bits": -5032223331569284245}
Actual behavior
{"uuid":{"least_significant_bits":-5032223331569284000,"most_significant_bits":-1472264933949945900}
(the bits are weirdly truncated)
Environment
OS: Win10 powershell & wsl.
ghz: 0.120.0
The text was updated successfully, but these errors were encountered:
jmchn
changed the title
Passing int64 losses precision sometime.
Passing int64 losses precision sometimes.
Jun 24, 2024
Proto file(s)
message UUID {
int64 most_significant_bits = 1;
int64 least_significant_bits = 2;
}
Command line arguments / config
ghz --proto .\some.proto --call some.service.method --insecure -d "uuid": {"most_significant_bits": -1472264933949945808, "least_significant_bits": -5032223331569284245}}}}}}" --rps 100 --connections 20 --concurrency 50 -m " --debug debug.out localhost:xxxx
Describe the bug
Just in case someone might have the same issue as I do, if you are use ghz for pressure testing a grpc service whose request has int64 variable in it, you might lose precision when passing in. I tested some smaller numbers and it was fine. I debugged into it and it seems that the json.Unmarshal([]byte(*data), &dataObj) caused it.
To Reproduce
As the setup above.
Expected behavior
Something like this should have been passed to the server.
{"uuid": {"most_significant_bits": -1472264933949945808, "least_significant_bits": -5032223331569284245}
Actual behavior
{"uuid":{"least_significant_bits":-5032223331569284000,"most_significant_bits":-1472264933949945900}
(the bits are weirdly truncated)
Environment
The text was updated successfully, but these errors were encountered: