Performance 08 Articles-mysql Database performance basics

Source: Internet
Author: User

To create a database test plan:

Create 10 concurrent users, each user sends two SQL requests to the database server, and each user runs the test 3 times. Therefore, the total number of tests sent is (10 concurrent users) * (2 requests) * (Repeats 3 times) =60JDBC requests. To build this test plan, the test elements that testers need to use include the thread group, the JDBC request, and the graphical result (graph Results).

? 1. Adding concurrent users

The first thing to do is to add a thread group and modify its default configuration.

2. Adding a JDBC Request

Defines the actions that the JDBC request needs to complete. Select the thread group, right-click and choose Add-Configure component-jdbc Connection configuration command from the popup shortcut menu. Then select the new test element that you just added and set it up. Let's say we're using a local MySQL database.

Variable Name Bound to Pool: This value should be unique throughout the test plan so that the JDBC sampler distinguishes between different connection configurations.

Database url:jdbc:mysql://localhost:3306/mydb, DB connection string.

JDBC Driver class:com.mysql.jdbc.Driver, database driver.

Username:guest, database user name.

Passsword:password for guest, corresponding database user password.

Other input fields can leave the default values intact.

JMeter uses the default configuration set in Control Panel to create a database connection pool that can be referenced by a JDBC request. Testers can add multiple JDBC configurations to the test plan, but they must have different names. In addition, multiple JDBC requests can reference the same connection pool.

Select the JDBC users thread group, then right-click and select the "Add"-"Sampler"-"jdbc Request" command from the popup shortcut menu.

In the test plan, the JDBC request is sent, and of course the actual work must be modified to accommodate the particular database.

The JDBC request edits the following properties:

1) name

2) Enter the name of the connection pool: MySQL (same as the name of the JDBC Configuration component).

3) Enter the SQL query statement.

3. Add listeners to view/store test results

? ? The last step that needs to be done is to add a listener to the test plan. The test element is responsible for storing the results of all JDBC requests in a single file and presenting them in a visual model.

Select the thread group and right-click to add listener-graphical results.

Long press QR Code recognition concern, your support is our greatest power.

Public Number: Testing DreamWorks

QQ Group: 300897805

  

?

Performance 08 Articles-mysql Database performance basics

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.