CN110147328B - Database performance test method, system, electronic equipment and storage medium - Google Patents

Database performance test method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN110147328B
CN110147328B CN201910441407.0A CN201910441407A CN110147328B CN 110147328 B CN110147328 B CN 110147328B CN 201910441407 A CN201910441407 A CN 201910441407A CN 110147328 B CN110147328 B CN 110147328B
Authority
CN
China
Prior art keywords
target
database
test
source code
target database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910441407.0A
Other languages
Chinese (zh)
Other versions
CN110147328A (en
Inventor
徐新功
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910441407.0A priority Critical patent/CN110147328B/en
Publication of CN110147328A publication Critical patent/CN110147328A/en
Application granted granted Critical
Publication of CN110147328B publication Critical patent/CN110147328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a database performance test method, a database performance test system, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: determining a target database to be tested; the target database is connected with the client through an SDK; acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK; and performing performance test on the target database by using the updated source code packet. According to the database performance test method, for the database which uses the SDK to interact with the client, the development efficiency of the performance test is improved.

Description

Database performance test method, system, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and more particularly, to a database performance testing method and system, an electronic device, and a computer readable storage medium.
Background
Most of performance test software in the prior art can only process services of a public protocol, and for databases which use an SDK to interact with a client, such as CouchBase, a developer is required to rewrite a test tool to construct the pressure of performance test when the performance test is performed, meanwhile, the collection of performance data is also realized in the process of pressure test, and the development workload is large and the efficiency is low.
Therefore, how to improve the development efficiency of the performance test of the database using the SDK to interact with the client is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a database performance test method and system, electronic equipment and a computer readable storage medium, and the development efficiency of performance test of a database which uses an SDK to interact with a client is improved.
In order to achieve the above object, the present application provides a database performance testing method, including:
determining a target database to be tested; the target database is connected with the client through an SDK;
acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK;
and performing performance test on the target database by using the updated source code packet.
Wherein updating the source code package using a singleton schema for the target test tool to connect with the target database through the SDK comprises:
creating a socket single instance for connecting with the SDK in the source code packet, and creating a test class for testing the target database by using the socket single instance; wherein the test class inherits the target class in the source code packet.
Wherein the test class comprises:
a first function for obtaining parameters;
a second function for linking the target database;
a third function for performing pressure measurement on an interface of the target database connected with the SDK;
a fourth function for disconnecting from the target database.
Wherein the target test tool is specifically a Jmeter.
Wherein the target database comprises CouchBase.
The performance test of the target database by using the updated source code packet comprises the following steps:
compiling the updated source code package, and storing the compiled file into a dependency directory of the target test tool;
and performing performance test on the target database by using the test script of the target test tool.
To achieve the above object, the present application provides an electronic device including a memory and a processor, the memory storing a database performance test program executable on the processor, the database performance test program being implemented when executed by the processor: determining a target database to be tested; the target database is connected with the client through an SDK; acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK; and performing performance test on the target database by using the updated source code packet.
Wherein the database performance test program when executed by the processor further implements: creating a socket single instance for connecting with the SDK in the source code packet, and creating a test class of the target database by using the socket single instance; wherein the test class inherits the target class in the source code packet.
To achieve the above object, the present application provides a database performance test system, including:
the determining module is used for determining a target database to be tested; the target database is connected with the client through an SDK;
the updating module is used for acquiring a source code packet of a target test tool and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK;
and the test module is used for performing performance test on the target database by utilizing the updated source code packet.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon a database performance test program which, when executed by a processor, implements the steps of the database performance test method as described above.
To achieve the above object, the present application provides a computer program product comprising computer instructions which, when run on a computer, enable the computer to perform the database performance test method of any one of the above.
According to the scheme, the database performance testing method provided by the application comprises the following steps: determining a target database to be tested; the target database is connected with the client through an SDK; acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK; and performing performance test on the target database by using the updated source code packet.
According to the database performance testing method, for the database which uses the SDK to interact with the client, the updated source code package is used for performance testing. Based on the source code package of the existing test tool, the source code package is updated by using a single-case mode, and the updated source code package can enable the multithreading of the test tool to be connected with a data stream through the SDK, so that the test tool is used for performing performance test on the database. For databases of different types, the updated source code package can be used, and a developer only needs to realize connection with the database and test requests, so that the development workload is small and the efficiency is high. The application also provides a database performance test system, an electronic device and a computer readable storage medium, and the technical effects can be achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a database performance testing method disclosed in an embodiment of the present application;
FIG. 2 is a flow chart of another database performance testing method disclosed in an embodiment of the present application;
FIG. 3 is a block diagram of a database performance testing system disclosed in an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a block diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
The embodiment of the application discloses a database performance test method, which improves the development efficiency of performance test of a database which uses an SDK to interact with a client.
Referring to fig. 1, a flowchart of a database performance testing method disclosed in an embodiment of the present application, as shown in fig. 1, includes:
s101: determining a target database to be tested; the target database is connected with the client through the SDK.
The execution subject of the embodiment is a client, and the client is connected with the target database through the SDK, and the purpose of the embodiment is to perform performance test on the target database. The target database here may include CouchBase, couchBase, a nosql database, which is connected by CouchBase-SDK in the production environment to perform the censoring.
S102: and acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK.
In this embodiment, the performance test is performed on the target database using an existing test tool, which may be specifically a Jmeter. The source code package of the target test tool is obtained, the source code package is updated by utilizing a single-case mode, and the updated source code package can realize the common SDK between the multithread of the target test tool and the client, namely, the connection between the target test tool and the target database is realized. After the connection is successful, the existing logic of the target test tool can be utilized to perform performance test on the target database.
S103: and performing performance test on the target database by using the updated source code packet.
In this step, performance testing of the target database, including pressure testing of the target database and collection of performance data, may be implemented by using the updated source code packet, where the performance data may include QPS, success rate, distribution of response time, and the like, and is not specifically limited herein.
Preferably, the step may include: compiling the updated source code package, and storing the compiled file into a dependency directory of the target test tool; and performing performance test on the target database by using the test script of the target test tool. In a specific implementation, the updated source code package is compiled according to the test environment, for example, the test environment is eclipse, that is, the updated source code package is compiled into jar files, the jar files are stored in the dependency catalog of the target test tool, and after the client starts the target test tool, the target database can be tested by using the test scripts therein.
According to the database performance testing method provided by the embodiment of the application, for the database which uses the SDK to interact with the client, the updated source code package is used for performance testing. Based on the source code package of the existing test tool, the source code package is updated by using a single-case mode, and the updated source code package can enable the multithreading of the test tool to be connected with a data stream through the SDK, so that the test tool is used for performing performance test on the database. For databases of different types, the updated source code package can be used, and a developer only needs to realize connection with the database and test requests, so that the development workload is small and the efficiency is high.
The embodiment of the application discloses a database performance test method, and compared with the previous embodiment, the embodiment further describes and optimizes the technical scheme. Specific:
referring to fig. 2, a flowchart of another database performance testing method provided in an embodiment of the present application, as shown in fig. 2, includes:
s201: determining a target database to be tested; the target database is connected with the client through an SDK;
s202: acquiring a source code packet of a target test tool;
s203: creating a socket single instance for connecting with the SDK in the source code packet, and creating a test class of the target database by using the socket single instance; wherein the test class inherits the target class in the source code packet.
In this embodiment, the connection between the target test tool and the target database may be implemented through a socket single instance, that is, the target test tool installed on the client connects to the target database through the SDK used by the connection between the client and the target database.
The connection between the target test tool and the target database is realized, and test classes of the target database are required to be rewritten. On the basis of the socket single instance, a test class for testing the target database is created, wherein the test class can comprise: a first function for obtaining parameters; a second function for linking the target database; a third function for performing pressure measurement on an interface of the target database connected with the SDK; a fourth function for disconnecting from the target database.
The parameters may include a user name, a password, a server node, etc. for database connection, which are not particularly limited herein, the first function is used to transfer parameters of the front end to the back end, the second function uses the parameters to connect the target database, the third function is used to perform pressure measurement on an interface of the target database after the connection is successful, and the fourth function is used to disconnect the target test tool from the target database after the test is completed.
S204: compiling the updated source code package, and storing the compiled file into a dependency directory of the target test tool;
s205: and performing performance test on the target database by using the test script of the target test tool.
An application embodiment provided in the present application, specifically, a method for testing performance of a Jmeter on CouchBase, may include the following steps:
step one: downloading the JMter source code package, integrating the JMter source code package into Eclipse, downloading the official SDK of CouchBase, and importing the dependency library of the JMter.
Step two: the method comprises the steps that a buckett single instance is created in CouchUtil, so that the same SDK connection is established between the multithread of the Jmeter and CouchBase, and the SDK connection is multiplexed;
the specific codes are as follows:
step three: newly built test class CouchTest and inherit the abstract javasamplerclient in Sample component. The test class includes the following functions:
getDefaultParameters: setting elements and default values on a GUI interface;
setupest: initializing operation for performance test, namely establishing connection with CouchBase;
runTest: the method is used for content to be executed in single performance test, such as the CouchBase interface of the pressure test, the addition, deletion, verification and the like of data;
a teardownntest: the method is used for cleaning operation before performance test is finished, namely disconnection with CouchBase is realized.
Step four: the source code package is compiled and exported as a jar package, which is placed under the dependency directory lib/ext of the Jmeter. Starting jmeter.bat, starting to write the pressure measurement script, and storing the script as a jmx file. The following is shown
Step five: and jmx script is executed on the Linux test client side provided with the Jmter, so that the performance test of the CouchBase is completed.
The following describes a database performance test system provided in the embodiments of the present application, and the database performance test system described below and the database performance test method described above may be referred to each other.
Referring to fig. 3, a structure diagram of a database performance test system provided in an embodiment of the present application, as shown in fig. 3, includes:
a determining module 301, configured to determine a target database to be tested; the target database is connected with the client through an SDK;
the updating module 302 is configured to obtain a source code packet of a target test tool, and update the source code packet by using a single instance mode, so that the target test tool is connected with the target database through the SDK;
and the testing module 303 is configured to perform performance testing on the target database by using the updated source code packet.
According to the database performance test system provided by the embodiment of the application, for a database which uses the SDK to interact with a client, the updated source code package is used for performance test. Based on the source code package of the existing test tool, the source code package is updated by using a single-case mode, and the updated source code package can enable the multithreading of the test tool to be connected with a data stream through the SDK, so that the test tool is used for performing performance test on the database. For databases of different types, the updated source code package can be used, and a developer only needs to realize connection with the database and test requests, so that the development workload is small and the efficiency is high.
On the basis of the above embodiment, as a preferred implementation manner, the updating module 302 specifically creates a socket single instance for connecting with the SDK in the source code packet, and creates a module for testing a test class of the target database by using the socket single instance; wherein the test class inherits the target class in the source code packet.
Based on the above embodiment, as a preferred implementation manner, the test class includes:
a first function for obtaining parameters;
a second function for linking the target database;
a third function for performing pressure measurement on an interface of the target database connected with the SDK;
a fourth function for disconnecting from the target database.
Based on the above embodiment, as a preferred implementation, the target test tool is specifically a Jmeter.
Based on the above examples, as a preferred implementation, the target database includes CouchBase.
Based on the above embodiment, as a preferred implementation manner, the test module 303 includes:
the compiling unit is used for compiling the updated source code package and storing the compiled file into the dependency directory of the target test tool;
and the testing unit is used for performing performance test on the target database by using the test script of the target testing tool.
The application also provides electronic equipment which can be a PC (Personal Computer ) or terminal equipment such as a smart phone, a tablet computer, a palm computer, a portable computer and the like.
Referring to fig. 4, a block diagram of an electronic device provided in an embodiment of the present application, as shown in fig. 4, may include a memory 11, a processor 12, and a bus 13.
The memory 11 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software for installing the electronic device and various types of data, such as codes of the database performance test program 01, etc., but also for temporarily storing data that has been output or is to be output.
The processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip in some embodiments, for executing program code or processing data stored in the memory 11, implementing the database performance test method provided in any of the above embodiments, for example, executing the database performance test program 01, etc.
The bus 13 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
In the embodiment of the application, for the database which uses the SDK to interact with the client, the updated source code package is used for performance test. Based on the source code package of the existing test tool, the source code package is updated by using a single-case mode, and the updated source code package can enable the multithreading of the test tool to be connected with a data stream through the SDK, so that the test tool is used for performing performance test on the database. For databases of different types, the updated source code package can be used, and a developer only needs to realize connection with the database and test requests, so that the development workload is small and the efficiency is high.
On the basis of the above embodiment, as a preferred implementation manner, referring to fig. 5, the electronic device further includes:
an input interface 14 for obtaining externally imported computer programs, parameters and instructions, which are controlled by the processor 12 and stored in the memory 11. The input interface 14 may be coupled to an input device for receiving parameters or instructions manually entered by a user. The input device may be a touch layer covered on the display screen, or may be a key, a track ball or a touch pad arranged on the terminal housing, or may be a Keyboard (Keyboard), a touch pad or a mouse, etc.
A display unit 15 for displaying data processed by the processor 12 and for displaying a visual user interface. The display unit 15 may be an LED display, a liquid crystal display, a touch-control type liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like.
A network port 16 for communication connection with external terminal devices. The communication technology adopted by the communication connection can be a wired communication technology or a wireless communication technology, such as a mobile high definition link technology (MHL), a Universal Serial Bus (USB), a High Definition Multimedia Interface (HDMI), a wireless fidelity technology (WiFi), a Bluetooth communication technology with low power consumption, a communication technology based on IEEE802.11s, and the like.
Fig. 5 shows only an electronic device with components 11-16 and database performance test program 01, it will be understood by those skilled in the art that the structure shown in fig. 5 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. A database performance testing method, comprising:
determining a target database to be tested; the target database is connected with the client through the SDK;
acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK;
performing performance test on the target database by using the updated source code packet;
the performance test of the target database by using the updated source code packet comprises the following steps:
compiling the updated source code package, and storing the compiled file into a dependency directory of the target test tool;
and performing performance test on the target database by using the test script of the target test tool.
2. The database performance testing method of claim 1, wherein updating the source code package using a singleton schema for the target test tool to connect to the target database through the SDK comprises:
creating a socket single instance for connecting with the SDK in the source code packet, and creating a test class for testing the target database by using the socket single instance; wherein the test class inherits the target class in the source code packet.
3. The database performance testing method according to claim 2, wherein the test class comprises:
a first function for obtaining parameters;
a second function for linking the target database;
a third function for performing pressure measurement on an interface of the target database connected with the SDK;
a fourth function for disconnecting from the target database.
4. The method of claim 1, wherein the target test tool comprises a Jmeter.
5. The database performance testing method of claim 1, wherein the target database comprises CouchBase.
6. An electronic device comprising a memory and a processor, the memory having stored thereon a database performance test program executable on the processor, the database performance test program when executed by the processor implementing: determining a target database to be tested; the target database is connected with the client through the SDK; acquiring a source code packet of a target test tool, and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK; performing performance test on the target database by using the updated source code packet;
wherein the database performance test program, when executed by the processor, specifically implements: compiling the updated source code package, and storing the compiled file into a dependency directory of the target test tool; and performing performance test on the target database by using the test script of the target test tool.
7. The electronic device of claim 6, wherein the database performance test program, when executed by the processor, further implements: creating a socket single instance for connecting with the SDK in the source code packet, and creating a test class of the target database by using the socket single instance; wherein the test class inherits the target class in the source code packet.
8. A database performance testing system, comprising:
the determining module is used for determining a target database to be tested; the target database is connected with the client through the SDK;
the updating module is used for acquiring a source code packet of a target test tool and updating the source code packet by using a single instance mode so that the target test tool is connected with the target database through the SDK;
the test module is used for performing performance test on the target database by utilizing the updated source code packet;
wherein, the test module includes:
the compiling unit is used for compiling the updated source code package and storing the compiled file into the dependency directory of the target test tool;
and the testing unit is used for performing performance test on the target database by using the test script of the target testing tool.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a database performance test program, which, when executed by a processor, implements the steps of the database performance test method according to any one of claims 1 to 5.
CN201910441407.0A 2019-05-24 2019-05-24 Database performance test method, system, electronic equipment and storage medium Active CN110147328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910441407.0A CN110147328B (en) 2019-05-24 2019-05-24 Database performance test method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910441407.0A CN110147328B (en) 2019-05-24 2019-05-24 Database performance test method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110147328A CN110147328A (en) 2019-08-20
CN110147328B true CN110147328B (en) 2023-07-18

Family

ID=67593249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910441407.0A Active CN110147328B (en) 2019-05-24 2019-05-24 Database performance test method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110147328B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127321B (en) * 2021-04-21 2022-11-18 平安银行股份有限公司 Data reading method, device and equipment based on Jmeter and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425683A (en) * 2012-05-18 2013-12-04 上海宝信软件股份有限公司 Database performance test system
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
CN107885654A (en) * 2017-05-05 2018-04-06 平安科技(深圳)有限公司 Data library test method and system
CN107145786A (en) * 2017-05-08 2017-09-08 四川长虹电器股份有限公司 The safety test system and method for test is injected based on database
US10216823B2 (en) * 2017-05-31 2019-02-26 HarperDB, Inc. Systems, methods, and apparatus for hierarchical database
CN108415835B (en) * 2018-02-22 2019-07-30 北京百度网讯科技有限公司 Distributed data library test method, device, equipment and computer-readable medium
CN109086198B (en) * 2018-05-29 2022-09-13 北京五八信息技术有限公司 Database test method and device and storage medium
CN109460367A (en) * 2018-11-16 2019-03-12 四川长虹电器股份有限公司 Method based on the sustainable integrated automation performance test of Jmeter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425683A (en) * 2012-05-18 2013-12-04 上海宝信软件股份有限公司 Database performance test system
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform

Also Published As

Publication number Publication date
CN110147328A (en) 2019-08-20

Similar Documents

Publication Publication Date Title
US10044215B2 (en) Method, apparatus, and server for updating software
WO2017166447A1 (en) Method and device for loading kernel module
CN108459964B (en) Test case selection method, device, equipment and computer readable storage medium
CN109729386B (en) Video file playing starting method and system, electronic equipment and storage medium
CN105357204B (en) Method and device for generating terminal identification information
US9612641B2 (en) Adjusting the connection idle timeout in connection pools
WO2018040270A1 (en) Method and device for loading linux-system elf file in windows system
CN110320378B (en) Method, apparatus, device and computer readable storage medium for applying for a quality control test
WO2013187175A1 (en) Service provision system, service computer, and terminal
JP2018508892A (en) Method and apparatus for assigning device fingerprints to Internet devices
US20130060967A1 (en) Discovery And Configuration Of New Devices Added Via Dynamic Reconfiguration
CN106796521B (en) API version control independent of product release
CN113504918A (en) Equipment tree configuration optimization method and device, computer equipment and storage medium
CN110147328B (en) Database performance test method, system, electronic equipment and storage medium
CN110244963B (en) Data updating method and device and terminal equipment
US10482237B2 (en) Method for processing security of application and electronic device supporting the same
EP2930616B1 (en) Device and method for generating application package
CN110959102B (en) Sensor management unit, sensor device, sensor management method, and storage medium
US9003364B2 (en) Overriding system attributes and function returns in a software subsystem
US20170032292A1 (en) Method and Apparatus for Extracting Mobile Application Suitability Features for a Mobile Business Application
US9201937B2 (en) Rapid provisioning of information for business analytics
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN107609119B (en) File processing method, mobile terminal and computer readable storage medium
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN110858143A (en) Installation package generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant