Open codebien opened 2 years ago
Maybe it also can be taken into account: https://community.k6.io/t/grpc-response-is-camelcase-instead-of-snake-case/3266
Hi, any progress on this? We are running into issues with an system under test that returns 5Mb json responses, resulting in high cpu and memory usage of k6 and a response times overhead of approximately 100ms. It would be nice to have an option equivalent to discardResponseBodies
for grpc.
Hey @DanielPerfana .
I'm sorry for not getting back to you sooner. Unfortunately, there are no updates on this.
However, your request for an equivalent to the HTTP module discardResponseBodies
sounds interesting. I'll bring it to the upcoming team sync and reply. Maybe we could extract this into separate minor issues and implement it sooner than removing the strict JSON dependency.
Hi, @olegbespalov!
Any updates about the discardResponseBodies
equivalent? Has the team decided to decline this option or not?
It could be useful to remove the tightly coupled dependency that the gRPC module has from
protojson
. https://github.com/grafana/k6/blob/57e994242f10122bccfbda229c4b29499a42457b/js/modules/k6/grpc/client.go#L232-L241The
protojson
dependency is a requirement for thejs/k6/grpc
module for creating requests when the JavaScript objects are used for passing data.However, in the case of extensions, this requirement could be removed where the generated Go structs could be directly used without the requirement for marshaling/unmarshaling from JSON.
We could add a field into the new
grpcext.Request
for providing the required marshaler/unmarshaler.