JMeter - After Delete SQL, should I run a explicit commit - jmeter

I have this SQL that I'm running through the JMeter script using JDBC request.
Query Type: Update Statement
SQL:
delete from auth_table where auth_key < to_char(trunc(sysdate-${RetentionDays}),'YYYYMMDD') and rownum< ${NumberOfRecords}+1
Do I need to add another JDBC request only for commit?

The issue is with RetentionDays value being defined as 0. If it is a non-zero value it works

Depends on Auto Commit flag in JDBC Connection Configuration
Turn auto commit on or off for the connections

Normally JMeter shouldn't "hang" the main idea of the database load testing is that you should be sending exactly the same requests as your application (or other database data producer/consumer) does. You can look into your database logs and compare the requests which application and JMeter send, identify and eliminate the differences.
If you don't have access to the database server instance you can try the following JMeter-side troubleshootings:
Take a thread dump, it can be done either from JMeter GUI directly
or using JDK built-in tools, this way you will see where exactly JMeter "hangs"
Another option is increasing JMeter logs verbosity for JDBC test elements, it can be done by adding the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.jdbc" level="debug" />

Related

Issue on Performance testing of H2 database using Jmeter JDBC requests

Facing some issue while running the performance testing of H2 database for a corda project.
JDBC requests in Jmeter is used for this testing .
some screenshots of Jmeter is given.
jdbc connection issue
jdbc reruest
result
Your question doesn't provide any error details therefore we cannot come up with the comprehensive solution, going forward make sure to include the screenshot or text of the "Sampler Result" tab of the View Results Tree listener and at least the relevant part(s) of the jmeter.log file into your question.
The most possible reason is using the wrong validation query, what you supplied is for Oracle DB, for H2 you should be using just Select 1
Also make sure to put the H2 JDBC Driver to JMeter Classpath and restart JMeter to pick up the .jar
Check out The Real Secret to Building a Database Test Plan With JMeter article for more information on the database load testing using JMeter.
P.S. Be informed that having JMeter and the application under test on the same machine is some form of a performance-testing anti-pattern as both are very resource intensive and in case of CPU/RAM/whatever lack you won't get reliable results.

how to create XX number of users in mongoDB using jmeter and use these users to test login/authorization performance scenarios

We are using MongoDB and need to create n users to test the performance of login scenarios by passing these users in JMeter, I can use CSV file to pass username/password values however for this I need to first create 500 users in DB. I saw some info on the net saying to use MongoDB script to generate data but this is Depreciated.
Please suggest how can I create these users.
how to create XX number of users in MongoDB using JMeter and use these users to test login/authorization performance scenarios.
MongoDB test elements were marked as "deprecated" due to low interest of the users in this functionality, however they still can be used.
Add the next line to user.properties file (lives under "bin" folder of your JMeter installation)
not_in_menu=
this way you will be able to restore the access to deprecated test elements via JMeter GUI
Restart JMeter to pick the property up
You should now see and use MongoDB Source Config and MongoDB Script test elements to establish MongoDB Connection and execute arbitrary queries.
See How to Load Test MongoDB with JMeter article for detailed information on working with MongoDB with JMeter.

What steps are included when Jmeter measuring JDBC response time

I am using Jmeter to send JDBC requests to a database.
I was wondering what steps are included when measuring response time.
For example, I am sending a select request to database.
I was the first query response time is larger than ours and I am assuming the first requests require establishing connection to the database and the rest requests are using connection pooling.
I want to know what Jmeter has done to the result set. Does Jmeter just iterate through all rows? Does it fetch all columns values? Can I know which part of source code does Jmeter actually execute when calculating response time?
Basically everything is included, to wit:
Open (or get) the connection
Execute query
Close the connection
You can check the details in JDBCSampler.java or enable debug logging for JDBC protocol by adding the next line to user.properties file (lives in JMeter's "bin" folder)
log_level.jmeter.protocol.jdbc=DEBUG
or passing it to JMeter startup script via -J command-line argument as
jmeter -Jlog_level.jmeter.protocol.jdbc=DEBUG -n -t test.jmx ...
The whole ResultSet is being returned from the query to JMeter, you can work with it via JMeter Variables or scripting, see Debugging JDBC Sampler Results in JMeter guide for more details.

How to get throughput( in influx db) of each sampler i have in jmeter test

I want to plot the graphs of throughput/unit time in grafana using influx db of each samplers i have in my jmeter test.I can get the overall throughput of a test/unit time (using additional tables delta and total in influx db).
Can somebody help me to get this done.
Or is there any way to get sampler wise throughput in influx db in the same way as we get count of sample zz “jmeter.zz.a.count".May be by using user.properties/jmeter.properties.
Any kind of help in this appreciable.
Jmeter backend listener, by default, will not poll sampler results to influx. To start with, you need to mark summaryOnly to "false" as shown below:
And then, you can make use of a modified jar file (you can search for this on testautomationguru(dot)com. There is a modified jar file you can download and replace in this lib/ext folder. This modified jar will allow the backend listener to write the sampler metrics directly into influx.
These are the same metrics that you will see in your command line
Once you have the jar replaced in lib/ext, you need to pass in the influx details via cli or update them in user.properties files
Now, if you go into your influx DB, and enter the query "select * from samples", you should see metrics like below
Now go to grafana and graph it

Fetch response times in JMeter running remotely

Ok so I set up my JMeter to run remotely using one slave computer (possibly more to come), and it's working out for the most part EXCEPT that I can't fetch the response time over time-graphs function using the JMeter plugin. I'm still able to use the "PerfMon Metrics" tool to get the CPU/Memory values from the slave computer, so I don't understand how I'm not able to get the response time results.
Does anyone have any experience using that function?
I would check the master- slave configuration: be sure that
the same Jmeter release is used
same directory tree structure is used
Jmeter-plugins are installed on both systems
...
If you use a standard "Summary report" listener, and save data to a file in the master, then you can reload and analyse the data off line with any listener.
HTH

Resources