I have a jmeter project where I am trying to performance test a UI and I am using webdriver sampler for the same (My first project with webdriver sampler)
To generate proper load on the server, I am using http sampler thread group where I usually provide high number of users (for load generation) and use 1 thread for the webdriver sampler to measure user rendering metrics. The execution is in such a way that the threads are executed at every 10 seconds. I have tried to use the "Synchronizing timer" in jmeter to ensure that the thread groups gets executed at the same time.
I am facing the issue as the http sampler and webdriver sampler threads do not start at the same time. There is a difference of 1-5 secs. I also see in my server logs that the hit from the UI came at a different time.
Here is the Thread start time from jmeter ('Start Time' column in 'View Results in Table' listener)
http Sampler thread: 00:02:47.846
Webdriver sampler thread: 00:02:51.902
Here are the logs from server logs:
Windows Server 2016 2020-12-26T00:02:51,245 ################## this may be call from http sampler
Windows Server 2016 2020-12-26T00:02:52,399 ################## this may be call from webdriver sampler
As we can see, although the threads got initiated at different times in jmeter, but due to the synchronizing timer, the calls must have been made at about the same time. But, there is still a mismatch of ~1 sec (as observed in server logs).
Due to this mismatch, the rendering time is not getting calculated accurately as the server is not under load when the webdriver sampler call comes in. I tried to use the synchronizing time, thread startup delays but they are not solving the issue. I am not sure if this is due to any extra overhead that the webdriver sampler may have.
Is this a common use case while using webdriver sampler and is there a way to fix this and have both the threads hit the server at the same time?
Extra setup Info: The jmeter and AUT are on the same server.