Hi Community,
I have designed my load test structure in the below mentioned format:
A test file to make the flow of API calls
A http helper file just to call k6/http methods and return the response
Client files for each micro services which extends the http helper to make api calls
A base helper file which returns new instance for each micro service clients whenever any API is called from test file
In the above design, a new object for the client instances will be created for every api call made in the test execution. This creates enormous amount of client objects during a load test. (In my case, 5 minutes of run with 50 Vus made 50k http calls and so 50k objects for the client instances)
How these objects will be garbage collected as their scope is completed after the completion of api request? Will K6 handle this design efficiently as it uses GoLang as underlying language? Will this consume huge memory when compared to the design that creating one single object for each micro service client at start of test and reusing the same for executing the http requests?
Thanks