I'm using a JMeter for MS SQL server performance testing.
- I've been monitoring the SQL throughput metrics while manually clicking on elements on GUI - I've noticed that database is making close to 0 compilations during that.
- Then I've used SQL profiler during these clicks to record the database calls being made and put them to JMeter test plan.
- I've ran the JMeter test plan, and displayed the metrics and here the JMeter creates a huge amount of compilations compared (it seems like it's almost copying batch requests).
Any ideas how to prevent these compilations from being made, please?
I tried to isolate the queries to single ones - to be able to better monitor it. Also I tried to play with JMeter pooling options, however nothing seemed to help.
Thank you for your help! :)
1条答案
按热度按时间7hiiyaii1#
I think when you manually "click on elements" you don't do this non-stop, there are pauses between operations while you move the mouse or wait for the page to load.
JMeter executes JDBC Request as fast as it can (as fast as the database responds) so you should mimic the delays between queries using i.e. Constant Timer or other suitable one, see A Comprehensive Guide to Using JMeter Timers
Also your approach might be not the best, I think you should test the database directly only if you're sure that the database is the bottleneck. You should rather simulate a real user using a real browser as there might be other bottlenecks in API or backend before the database query so it could be a better idea to configure JMeter to behave like a real browser in terms of handling embedded resources, cookies and other headers , cache , AJAX requests and so on.