CN110147328A - A kind of database performance measurement method, system, electronic equipment and storage medium - Google Patents

A kind of database performance measurement method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN110147328A
CN110147328A CN201910441407.0A CN201910441407A CN110147328A CN 110147328 A CN110147328 A CN 110147328A CN 201910441407 A CN201910441407 A CN 201910441407A CN 110147328 A CN110147328 A CN 110147328A
Authority
CN
China
Prior art keywords
database
target
source code
code packet
sdk
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.)
Granted
Application number
CN201910441407.0A
Other languages
Chinese (zh)
Other versions
CN110147328B (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

Abstract

This application discloses a kind of database performance measurement method, system and a kind of electronic equipment and computer readable storage mediums, this method comprises: determining target database to be tested;Wherein, the target database is connected by SDK with the client;The source code packet for obtaining target detection tool updates the source code packet using singleton pattern, so that the target detection tool is connected by the SDK with the target database;The target database is tested for the property using updated source code packet.Database performance measurement method provided by the present application improves the development efficiency of its performance test for the database for using SDK and client to interact.

Description

A kind of database performance measurement method, system, electronic equipment and storage medium
Technical field
This application involves field of computer technology, more specifically to a kind of database performance measurement method, system and A kind of electronic equipment and a kind of computer readable storage medium.
Background technique
Major part Performance measurement software in the prior art can only handle the service of publicly-owned agreement, for using SDK and visitor The database that family end interacts, such as CouchBase need developer to rewrite test when to its performance test Tool, carrys out the pressure of structural behavior test, while the collection of performance data is also realized during pressing survey, and development amount is big And it is inefficient.
Therefore, for the database for using SDK and client to interact, the development efficiency of its performance test how is improved It is those skilled in the art's technical issues that need to address.
Summary of the invention
The application's is designed to provide a kind of database performance measurement method, system and a kind of electronic equipment and a kind of meter Calculation machine readable storage medium storing program for executing improves the exploitation effect of its performance test for the database for using SDK and client to interact Rate.
To achieve the above object, this application provides a kind of database performance measurement methods, comprising:
Determine target database to be tested;Wherein, the target database is connected by SDK with the client;
The source code packet for obtaining target detection tool updates the source code packet using singleton pattern, so as to the target detection Tool is connected by the SDK with the target database;
The target database is tested for the property using updated source code packet.
Wherein, described to update the source code packet using singleton pattern, so as to the target detection tool by the SDK with The target database is connected, comprising:
Bucket singleton of the creation for being connect with the SDK in the source code packet, and utilize the bucket singleton Create the test class for testing the target database;Wherein, the target class in source code packet described in the test Similar integral.
Wherein, include: in the test class
For first function getparms;
For connecting the second function of the target database;
Interface for connecting to the target database with the SDK carries out the third function of pressure survey;
For disconnecting the 4th function connecting with the target database.
Wherein, the target detection tool is specially Jmeter.
Wherein, the target database includes CouchBase.
It is wherein, described that the target database is tested for the property using updated source code packet, comprising:
Updated source code packet is compiled, and the file after compiling is stored to the dependence catalogue of the target detection tool In;
The target database is tested for the property using the test script of the target detection tool.
To achieve the above object, this application provides a kind of electronic equipment, the electronic equipment includes memory and processing Device is stored with the database performance measurement program that can be run on the processor, the database performance on the memory Test program is realized when being executed by the processor: determining target database to be tested;Wherein, the target database passes through SDK is connected with the client;The source code packet for obtaining target detection tool updates the source code packet using singleton pattern, so as to The target detection tool is connected by the SDK with the target database;Using updated source code packet to the target Database is tested for the property.
Wherein, it also realizes when the database performance measurement program is executed by the processor: being created in the source code packet The bucket singleton for connecting with the SDK is built, and creates the test of the target database using the bucket singleton Class;Wherein, the target class in source code packet described in the test Similar integral.
To achieve the above object, this application provides a kind of database performance test systems, comprising:
Determining module, for determining target database to be tested;Wherein, the target database by SDK with it is described Client is connected;
Update module updates the source code packet using singleton pattern for obtaining the source code packet of target detection tool, so as to The target detection tool is connected by the SDK with the target database;
Test module, for being tested for the property using updated source code packet to the target database.
To achieve the above object, this application provides a kind of computer readable storage medium, the computer-readable storages It is stored with database performance measurement program on medium, realizes when the database performance measurement program is executed by processor as above-mentioned The step of database performance measurement method.
To achieve the above object, this application provides a kind of computer program products, including computer instruction, when it is being counted When running on calculation machine, computer is allowed to execute database performance measurement method described in any of the above-described.
By above scheme it is found that a kind of database performance measurement method provided by the present application, comprising: determine to be tested Target database;Wherein, the target database is connected by SDK with the client;Obtain the source code of target detection tool Packet updates the source code packet using singleton pattern, so that the target detection tool passes through the SDK and the target database It is connected;The target database is tested for the property using updated source code packet.
Database performance measurement method provided by the present application makes the database for using SDK and client to interact It is tested for the property with updated source code packet.Source code packet based on existing testing tool carries out it using singleton pattern It updates, the multithreading of testing tool can be made to connect data flow with by SDK using updated source code packet, to utilize test Tool is tested for the property database.For different types of database, above-mentioned updated source code packet can be used, is opened Hair personnel need to only realize the connection and test request with database, and development amount is smaller, efficiency is higher.The application also mentions A kind of database performance test system and a kind of electronic equipment and a kind of computer readable storage medium have been supplied, has equally been able to achieve State technical effect.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of database performance measurement method disclosed in the embodiment of the present application;
Fig. 2 is the flow chart of another kind database performance measurement method disclosed in the embodiment of the present application;
Fig. 3 is a kind of structure chart of database performance test system disclosed in the embodiment of the present application;
Fig. 4 is the structure chart of a kind of electronic equipment disclosed in the embodiment of the present application;
Fig. 5 is the structure chart of another kind electronic equipment disclosed in the embodiment of the present application.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
The embodiment of the present application discloses a kind of database performance measurement method, for using SDK to interact with client Database, improve the development efficiency of its performance test.
Referring to Fig. 1, a kind of flow chart of database performance measurement method disclosed in the embodiment of the present application, as shown in Figure 1, packet It includes:
S101: target database to be tested is determined;Wherein, the target database passes through SDK and the client phase Even.
The executing subject of the present embodiment is client, which is connect by SDK with target database, the present embodiment Purpose is to be tested for the property target database.Target database herein may include CouchBase, CouchBase It is a kind of nosql database, the database connected by CouchBase-SDK in production environment changes completing additions and deletions and look into.
S102: obtaining the source code packet of target detection tool, the source code packet is updated using singleton pattern, so as to the target Testing tool is connected by the SDK with the target database.
In the present embodiment, target database is tested for the property using existing testing tool, target detection tool It can be specially Jmeter.The source code packet for obtaining target detection tool, updates the source code packet, updated source using singleton pattern The multithreading and the above-mentioned SDK of client public of target detection tool, i.e. realization target detection tool and target may be implemented in code packet The connection of database.After successful connection, the existing logic that can use target detection tool carries out performance survey to target database Examination.
S103: the target database is tested for the property using updated source code packet.
In this step, it may be implemented to be tested for the property target database using updated source code packet, including right Target database carries out the collection of pressure survey and performance data, and performance data herein may include QPS, success rate, response time Distribution situation etc., herein without specifically limiting.
Preferably, this step may include: the updated source code packet of compiling, and the file after compiling is stored to the mesh In the dependence catalogue for marking testing tool;Performance is carried out to the target database using the test script of the target detection tool Test.In specific implementation, updated source code packet is compiled according to test environment, such as test environment is eclipse, i.e., it will more Source code packet after new is compiled as jar file, is stored into the dependence catalogue of target detection tool, and client terminal start-up target is surveyed After trial work tool, it can use test script therein and target database tested.
Database performance measurement method provided by the embodiments of the present application, for the number for using SDK and client to interact According to library, it is tested for the property using updated source code packet.Source code packet based on existing testing tool, utilizes singleton pattern pair It is updated, and the multithreading of testing tool can be made to connect data flow with by SDK using updated source code packet, thus sharp Database is tested for the property with testing tool.For different types of database, above-mentioned updated source can be used Code packet, developer need to only realize the connection and test request with database, and development amount is smaller, efficiency is higher.
The embodiment of the present application discloses a kind of database performance measurement method, relative to a upper embodiment, the present embodiment pair Technical solution has made further instruction and optimization.It is specific:
Referring to fig. 2, the flow chart of another database performance measurement method provided by the embodiments of the present application, as shown in Fig. 2, Include:
S201: target database to be tested is determined;Wherein, the target database passes through SDK and the client phase Even;
S202: the source code packet of target detection tool is obtained;
S203: bucket singleton of the creation for being connect with the SDK in the source code packet, and utilize the bucket Singleton creates the test class of the target database;Wherein, the target class in source code packet described in the test Similar integral.
In the present embodiment, the connection of target detection tool and target database can be realized by bucket singleton, i.e., The target detection tool being installed in client connect the SDK used with target database by the client and connects the number of targets According to library.
The connection for realizing target detection tool and target database, also needs to rewrite the test class to target database. On the basis of bucket singleton, it may include: for obtaining in the test class that creation, which is used for the test class of test target database, Take the first function of parameter;For connecting the second function of the target database;For to the target database with it is described The interface of SDK connection carries out the third function of pressure survey;For disconnecting the 4th function connecting with the target database.
Above-mentioned parameter may include user name, password, the server node etc. for database connection, herein without Specific to limit, first function is used to for the parameter of front end being transferred to rear end, and second function carries out target data using these parameters The connection in library carries out pressure survey using interface of the third function to target database after successful connection, after the completion of test, utilizes the 4th The connection of function disconnection target detection tool and target database.
S204: updated source code packet is compiled, and the file after compiling is stored to the dependence of the target detection tool In catalogue;
S205: the target database is tested for the property using the test script of the target detection tool.
A kind of Application Example provided by the present application, performance test of the specially Jmeter to CouchBase is described below Method may comprise steps of:
Step 1: downloading Jmeter source code packet, and be integrated into Eclipse, the official SDK of CouchBase is downloaded, and lead Enter the dependence library of Jmeter.
Step 2: creating buckect singleton in CouchUtil, so that the multithreading of Jmeter and CouchBase are established The same SDK is connected and is multiplexed the SDK connection;
Specific code are as follows:
Step 3: newly-built test class CouchTest, and inherit in Sample component AbstractJavaSamplerClient.Comprising with minor function in test class:
GetDefaultParameters: element and default value for being arranged on gui interface;
SetupTest: for the initialization operation of performance test, that is, the connection with CouchBase is established;
RunTest: the content needed to be implemented for single performance test, such as the CouchBase interface of pressure survey and data Additions and deletions, which change, looks into;
TeardownTest: the cleaning operation before terminating for performance test realizes the company disconnected with CouchBase It connects.
Step 4: jar packet is exported as after compiling source code packet, which is placed on to the dependence catalogue lib/ext of Jmeter Below.Start jmeter.bat, starts to write pressure survey script, save as jmx file.As follows
Step 5: jmx script is executed on the Linux test client of installation Jmter, completes the performance of CouchBase Test.
A kind of database performance test system provided by the embodiments of the present application is introduced below, one kind described below Database performance test system can be cross-referenced with a kind of above-described database performance measurement method.
Referring to Fig. 3, a kind of structure chart of database performance test system provided by the embodiments of the present application, as shown in figure 3, packet It includes:
Determining module 301, for determining target database to be tested;Wherein, the target database passes through SDK and institute Client is stated to be connected;
Update module 302 updates the source code packet using singleton pattern for obtaining the source code packet of target detection tool, So that the target detection tool is connected by the SDK with the target database;
Test module 303, for being tested for the property using updated source code packet to the target database.
Database performance test system provided by the embodiments of the present application, for the number for using SDK and client to interact According to library, it is tested for the property using updated source code packet.Source code packet based on existing testing tool, utilizes singleton pattern pair It is updated, and the multithreading of testing tool can be made to connect data flow with by SDK using updated source code packet, thus sharp Database is tested for the property with testing tool.For different types of database, above-mentioned updated source can be used Code packet, developer need to only realize the connection and test request with database, and development amount is smaller, efficiency is higher.
On the basis of the above embodiments, the update module 302 is specially described as a preferred implementation manner, Bucket singleton of the creation for being connect with the SDK in source code packet, and created using the bucket singleton for testing State the module of the test class of target database;Wherein, the target class in source code packet described in the test Similar integral.
On the basis of the above embodiments, include: in the test class as a preferred implementation manner,
For first function getparms;
For connecting the second function of the target database;
Interface for connecting to the target database with the SDK carries out the third function of pressure survey;
For disconnecting the 4th function connecting with the target database.
On the basis of the above embodiments, the target detection tool is specially as a preferred implementation manner, Jmeter。
On the basis of the above embodiments, the target database includes as a preferred implementation manner, CouchBase。
On the basis of the above embodiments, the test module 303 includes: as a preferred implementation manner,
Compilation unit is stored for compiling updated source code packet, and by the file after compiling to the target detection work In the dependence catalogue of tool;
Test cell carries out performance survey to the target database for the test script using the target detection tool Examination.
Present invention also provides a kind of electronic equipment, which can be PC (Personal Computer, individual Computer), it is also possible to the terminal devices such as smart phone, tablet computer, palm PC, portable computer.
Referring to fig. 4, the structure chart of a kind of electronic equipment provided by the embodiments of the present application, as shown in figure 4, may include storage Device 11, processor 12 and bus 13.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory, Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 It can be the internal storage unit of electronic equipment, such as the hard disk of the electronic equipment in some embodiments.Memory 11 is another It is also possible to the External memory equipment of electronic equipment in some embodiments, such as the plug-in type hard disk being equipped on electronic equipment, intelligence Energy storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include the internal storage unit of electronic equipment or set including external storage It is standby.Memory 11 can be not only used for the application software and Various types of data of storage installation electronic equipment, such as database performance is surveyed The code etc. for trying program 01, can be also used for temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, realize the database performance measurement method that any of the above-described embodiment provides, such as execute database performance Test program 01 etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA) Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 4 only with one slightly Line indicates, it is not intended that an only bus or a type of bus.
The embodiment of the present application for the database that uses SDK and client interacts, using updated source code packet into Row performance test.Source code packet based on existing testing tool is updated it using singleton pattern, utilizes updated source Code packet can make the multithreading of testing tool connect data flow with by SDK, thus using testing tool to database progressive It can test.For different types of database, above-mentioned updated source code packet can be used, developer need to only realize and number According to the connection and test request in library, development amount is smaller, efficiency is higher.
On the basis of the above embodiments, preferably, referring to Fig. 5, the electronic equipment further include:
Input interface 14 is controlled through processor 12 and is saved for obtaining computer program, parameter and the instruction of external importing Into memory 11.The input interface 14 can be connected with input unit, receive parameter or instruction that user is manually entered.This is defeated Entering device can be the touch layer covered on display screen, be also possible to the key being arranged in terminal enclosure, trace ball or Trackpad, It is also possible to keyboard (Keyboard), Trackpad or mouse etc..
Display unit 15, for the data of the processing of video-stream processor 12 and for showing visual user interface.It should Display unit 15 can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light- Emitting Diode, Organic Light Emitting Diode) touch device etc..
The network port 16, for being communicatively coupled with external each terminal device.Skill is communicated used by the communication connection Art can be cable communicating technology or wireless communication technique, as mobile high definition chained technology (MHL), universal serial bus (USB), High-definition media interface (HDMI), Bluetooth Communication Technology, the low-power consumption bluetooth communication technology, is based on adopting wireless fidelity technology (WiFi) The communication technology etc. of IEEE802.11s.
Fig. 5 illustrates only the electronic equipment with component 11-16 and database performance measurement program 01, art technology Personnel it is understood that the structure shown in Fig. 5 does not constitute the restriction to electronic equipment, may include than illustrate it is less or More components perhaps combine certain components or different component layouts.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead Body medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of database performance measurement method characterized by comprising
Determine target database to be tested;Wherein, the target database is connected by SDK with client;
The source code packet for obtaining target detection tool updates the source code packet using singleton pattern, so as to the target detection tool It is connected by the SDK with the target database;
The target database is tested for the property using updated source code packet.
2. database performance measurement method according to claim 1, which is characterized in that described using described in singleton pattern update Source code packet, so that the target detection tool is connected by the SDK with the target database, comprising:
Bucket singleton of the creation for being connect with the SDK in the source code packet, and created using the bucket singleton For testing the test class of the target database;Wherein, the target class in source code packet described in the test Similar integral.
3. database performance measurement method according to claim 2, which is characterized in that include: in the test class
For first function getparms;
For connecting the second function of the target database;
Interface for connecting to the target database with the SDK carries out the third function of pressure survey;
For disconnecting the 4th function connecting with the target database.
4. database performance measurement method according to claim 1, which is characterized in that the target detection tool specifically includes Jmeter。
5. database performance measurement method according to claim 1, which is characterized in that the target database includes CouchBase。
6. according to claim 1 to database performance measurement method described in any one of 5, which is characterized in that described to utilize update Source code packet afterwards is tested for the property the target database, comprising:
Updated source code packet is compiled, and the file after compiling is stored into the dependence catalogue of the target detection tool;
The target database is tested for the property using the test script of the target detection tool.
7. a kind of electronic equipment, which is characterized in that the electronic equipment includes memory and processor, is stored on the memory There is the database performance measurement program that can be run on the processor, the database performance measurement program is by the processor It is realized when execution: determining target database to be tested;Wherein, the target database is connected by SDK with the client; The source code packet for obtaining target detection tool updates the source code packet using singleton pattern, so that the target detection tool passes through The SDK is connected with the target database;The target database is tested for the property using updated source code packet.
8. electronic equipment as claimed in claim 7, which is characterized in that the database performance measurement program is held by the processor It is also realized when row: bucket singleton of the creation for being connect with the SDK in the source code packet, and it is mono- using the bucket Example creates the test class of the target database;Wherein, the target class in source code packet described in the test Similar integral.
9. a kind of database performance test system characterized by comprising
Determining module, for determining target database to be tested;Wherein, the target database passes through SDK and the client End is connected;
Update module updates the source code packet using singleton pattern, so as to described for obtaining the source code packet of target detection tool Target detection tool is connected by the SDK with the target database;
Test module, for being tested for the property using updated source code packet to the target database.
10. a kind of computer readable storage medium, which is characterized in that be stored with database on the computer readable storage medium Performance test program is realized as described in any one of claim 1 to 6 when the database performance measurement program is executed by processor The step of database performance measurement method.
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 true CN110147328A (en) 2019-08-20
CN110147328B 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)

Cited By (1)

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

Citations (9)

* 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
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform
CN107145786A (en) * 2017-05-08 2017-09-08 四川长虹电器股份有限公司 The safety test system and method for test is injected based on database
CN108415835A (en) * 2018-02-22 2018-08-17 北京百度网讯科技有限公司 Distributed data library test method, device, equipment and computer-readable medium
WO2018202173A1 (en) * 2017-05-05 2018-11-08 平安科技(深圳)有限公司 Method and system for database testing
US20180349463A1 (en) * 2017-05-31 2018-12-06 HarperDB, Inc. Systems, methods, and apparatus for hierarchical database
CN109086198A (en) * 2018-05-29 2018-12-25 北京五八信息技术有限公司 Test method, device and the storage medium of database
CN109460367A (en) * 2018-11-16 2019-03-12 四川长虹电器股份有限公司 Method based on the sustainable integrated automation performance test of Jmeter

Patent Citations (9)

* 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
CN103729361A (en) * 2012-10-12 2014-04-16 百度在线网络技术(北京)有限公司 Method and device for testing performance of database
CN104461856A (en) * 2013-09-22 2015-03-25 阿里巴巴集团控股有限公司 Performance test method, device and system based on cloud computing platform
WO2018202173A1 (en) * 2017-05-05 2018-11-08 平安科技(深圳)有限公司 Method and system for database testing
CN107145786A (en) * 2017-05-08 2017-09-08 四川长虹电器股份有限公司 The safety test system and method for test is injected based on database
US20180349463A1 (en) * 2017-05-31 2018-12-06 HarperDB, Inc. Systems, methods, and apparatus for hierarchical database
CN108415835A (en) * 2018-02-22 2018-08-17 北京百度网讯科技有限公司 Distributed data library test method, device, equipment and computer-readable medium
CN109086198A (en) * 2018-05-29 2018-12-25 北京五八信息技术有限公司 Test method, device and the storage medium of database
CN109460367A (en) * 2018-11-16 2019-03-12 四川长虹电器股份有限公司 Method based on the sustainable integrated automation performance test of Jmeter

Cited By (1)

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

Also Published As

Publication number Publication date
CN110147328B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
US8510422B2 (en) Systems and methods for extension of server management functions
US20180157477A1 (en) Versioned extension points of graphical user interfaces
CN108768875A (en) Gray scale dissemination method, device and the computer readable storage medium of application
CN105144074B (en) It is stored using the block of hybrid memory device
CN109325053A (en) Data processing method, device and the computer readable storage medium of reporting system
CN109783350A (en) Interface test method, device and computer readable storage medium
CN102446114A (en) Method and system used for optimizing virtual graphics processing unit utilization
CN109634523A (en) A kind of disk management method, system and electronic equipment and storage medium
CN103345406A (en) System and method for achieving cloud virtual mobile terminal of intelligent mobile terminal
US20160098256A1 (en) Visual tool and architecting logical layers of software components
CN106662993B (en) For updating the method in library and for its terminal and system
CN109688033A (en) A kind of network bandwidth evaluating method, device, system and storage medium
CN109582325A (en) Method for upgrading software, robot and the computer readable storage medium of robot
CN109413207A (en) A kind of file uploading method, system, device and computer readable storage medium
CN107506494B (en) Document handling method, mobile terminal and computer readable storage medium
CN109739738A (en) Event log management method, system and relevant apparatus based on HTML5
CN109697338A (en) A kind of software installation hold-up interception method and relevant apparatus
CN110147328A (en) A kind of database performance measurement method, system, electronic equipment and storage medium
CN108351790A (en) Non-monotonic final convergence for expectation state configuration
CN110515671A (en) Initial method, apparatus for initializing, terminal device and readable storage medium storing program for executing
CN109976744B (en) Visual programming method, system and terminal equipment
CN110244963A (en) Data-updating method, device and terminal device
CN109857579A (en) A kind of data processing method and relevant apparatus
US10643252B2 (en) Banner display method of electronic device and electronic device thereof
CN109740342A (en) Obtain method, system, computer installation and storage medium that shell executes permission

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