tag1consulting / goose

Load testing framework, inspired by Locust
https://tag1.com/goose
Apache License 2.0
799 stars 71 forks source link

Make GooseUser and GooseUserData cloneable #595

Closed S7evinK closed 3 months ago

S7evinK commented 3 months ago

As the title describes, this implements Clone and Debug for GooseUser and GooseUserData.

In our use-case we need to pass GooseUser to a SDK which is doing all the network requests.

jeremyandrews commented 3 months ago

Interesting, thanks for the PR. Be sure to run through cargo fmt which enforce our coding standards.

In your use case, does Goose provide you any metrics? When you clone and pass off the GooseUser, is something other than Reqwest making the requests? Why not set up a proxy? I'm trying to better understand your use case, and the implications of this change.

S7evinK commented 3 months ago

Thanks for the quick reply. :)

Goose provides metrics in our case which we need to sanitize, as having metrics for each "room" (e.g. /_matrix/client/v3/rooms/{roomId}/join) doesn't make sense as we care about the /join endpoint only. The underlying matrix-rust-sdk uses reqwest as well, but if we pass it the client provided by GooseUser, we're losing the metrics.