In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
This article is mainly about the use of loadrunner tools for mysql performance testing, if you are interested, let's take a look at this article. I believe that after reading the use of loadrunner tools for mysql performance testing, it is of some reference value to everyone.
download
It can be downloaded from the following URL:
Http://down.51cto.com/data/403722
Installation
So easy, unzip to your loadrunner installation directory, put the extracted include and bin directories into the loadrunner installation directory! There are a lot of children's shoes shamefully put the decompressed loadrunner mysqllibs directory below, Khan ah.
Use
No nonsense, just go to the code.
Vuser_init
# define MYSQLSERVER "XXX.XXX.XXX.XXX" # ip of mysql
# define MYSQLUSERNAME "XXX" # user name
# define MYSQLPASSWORD "XXX" # password
# define MYSQLDB "XXX" # Database
# define MYSQLPORT "XXX" # Port
# include "Ptt_Mysql.h" # introduces the h file of mysql lib
Vuser_init ()
{
Return 0
}
Look, it's easy. Haha, keep going.
Action
Action ()
{
Char chQuery [128]
MYSQL * Mconn
Lr_load_dll ("libmysql.dll"); # introducing dll of libmysql
Mconn = lr_mysql_connect (MYSQLSERVER, MYSQLUSERNAME, MYSQLPASSWORD, MYSQLDB, atoi (MYSQLPORT); # connection mysql
Sprintf (chQuery, "update table name set a=a+1 where id=123;"
);
Lr_mysql_query (Mconn, chQuery); # execute sql
Lr_mysql_disconnect (Mconn); # close connection
Return 0
}
How's it going? It is still very simple, that is, define a point variable, and then introduce a dll, the rest is the familiar sql, this is already update as an example, select and insert are roughly the same, as long as a little modification, there is no example here.
As for vuser_end, there are no changes!
Monitoring msyql
Of course, since there is testing, there must be monitoring, as for how to monitor, there are many methods in my blog, you can find it in http://xqtesting.blog.51cto.
Here I would like to introduce a few more commands:
L Show innodb status
L Show processlist
L Show open tables from db_name
What exactly does it represent? let's try Baidu yourself. it's very simple.
Is the above details about using loadrunner tools for mysql performance testing helpful to you? If you want to know more about it, you can continue to follow our industry information section.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.