Open Thibobbs opened 2 years ago
@Thibobbs
I was expecting to have a vusers.session_length similar to the max http.response_time
Note that http.response_time is TTFB, and vusers.session_length is TTLB. Other than that, I'm hoping parallel is working as intended.
Could it be because of the maxSockets param? https://www.artillery.io/docs/guides/guides/http-reference#max-sockets-per-virtual-user
I just encountered the same behavior with parallel get requests executed sequentially.
Here are the lines that cause this behavior: https://github.com/artilleryio/artillery/blob/d77b7a298a9723641ae655afb5566489f3f4635a/packages/core/lib/engine_http.js#L908-L912
add a beforeScenario custom script
[...]
beforeScenario:
- "setMaxSocketCount"
the setMaxSocketCount script:
export async function setMaxSocketCount(context, eventEmitter) {
/**
* @type {http.Agent} httpAgent
*/
const httpAgent = context._httpAgent
httpAgent.maxSockets = 10
httpAgent.maxFreeSockets = 10
/**
* @type {https.Agent} httpsAgent
*/
const httpsAgent = context._httpsAgent
httpsAgent.maxSockets = 10
httpsAgent.maxFreeSockets = 10
}
Maybe some kind of PR would solve this issue:
const agentOpts = Object.assign(DEFAULT_AGENT_OPTIONS, {
maxSockets: this.config.http && this.config.http.maxSockets ? this.config.http.maxSockets : 1,
maxFreeSockets: this.config.http && this.config.http.maxSockets ? this.config.http.maxSockets : 1,
});
Hello,
I'm trying to make parallel requests with artillery and I saw that this feature is supposed to be supported (not in the doc though). Unfortunately, it doesn't seem to do anything different than normal request behaviour.
Version info:
This is my yml file :
I was expecting to have a vusers.session_length similar to the max http.response_time. But here are the logs :
As you can see, artillery seems to trigger the requests sequencially instead of being parallelized. There is little to no difference when I remove "parallel" from the flow.
Thank you in advance.