CN103810196B - The method that database performance measurement is carried out based on business model - Google Patents

The method that database performance measurement is carried out based on business model Download PDF

Info

Publication number
CN103810196B
CN103810196B CN201210447972.6A CN201210447972A CN103810196B CN 103810196 B CN103810196 B CN 103810196B CN 201210447972 A CN201210447972 A CN 201210447972A CN 103810196 B CN103810196 B CN 103810196B
Authority
CN
China
Prior art keywords
test
information
database
business
business model
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
CN201210447972.6A
Other languages
Chinese (zh)
Other versions
CN103810196A (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.)
Advanced New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201210447972.6A priority Critical patent/CN103810196B/en
Publication of CN103810196A publication Critical patent/CN103810196A/en
Application granted granted Critical
Publication of CN103810196B publication Critical patent/CN103810196B/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

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)
  • Debugging And Monitoring (AREA)

Abstract

A kind of method that database performance measurement is carried out based on business model is provided.This method includes:The business model of the business is set up based on business;Test information corresponding with the business model is configured according to the business model, the test information configured is preserved and forms test file hereof;The configuration information obtained is read out according to the business model and to the test file, the performance of the database associated with target service is tested;And export the result of the performance of the database as test result.

Description

The method that database performance measurement is carried out based on business model
Technical field
The application is related to data library test, more particularly to a kind of side that database performance measurement is carried out based on business model Method.
Background technology
With continuing to develop for data service, database performance is largely into the embodiment of an enterprise efficiency. And to the understanding of database performance, we can only be completed by some test softwares.
The problem of software of current database performance measurement has two aspects, one be, can not be according to specific business The customization of carry out amount body.Two be, can not complicated test data comprehensively performance.A kind of in existing technology is only fixed The software that transaction model is tested, it can test some specific business functions, and such as order is issued, and as some compare Special business cannot be tested well.And there is one kind simply data base querying, addition etc. can only just test in addition, The effect that can not have been reached.
Such as general testing tool such as tpcc is commonly used in we, and sysbench, business model is relatively simple. Tpcc simulations are that bank-user is transferred accounts model, and our application system model is larger with tpcc user's model difference of transferring accounts, If testing our database using tpcc, because the difference of the model of itself is larger, the result accuracy of test is inadequate, Confidence level is not high.And the results of sysbench in itself are simpler, simple sql can only be configured and tested, database each Table and field can not be simulated according to real business, and the relation between table and table also has no idea to represent, the result of test Difference is also very big.
The mode for being capable of true analog service at present is exactly that on-line operation is really applied, by truly applying test data Pressure, and tested completely from operational angle, it is necessary to tested using substantial amounts of application server, on line database with The ratio of application server is 1:50 or so, want that the bottleneck for simulating real operational trials concrete database is needed to use substantial amounts of Test resource, flexibility is also restrained, can not test the bottleneck in final data storehouse.
The content of the invention
For drawbacks described above, the application provides a kind of method of database performance measurement, and solution is meeting business need In the case of optimize current database performance test the problem of.
The method that database performance measurement is carried out based on business model of the application, including:The industry is set up based on business The business model of business;Test information corresponding with the business model is configured according to the business model, by the test configured Information preserves and forms test file hereof;It is read out what is obtained according to the business model and to the test file The configuration information, tests the performance of the database associated with target service;And by the result of the performance of the database Exported as test result.
According to embodiments herein, in the method, the configuration is corresponding with the business model to test information also Including:Configuration connection database information, configuration creates table and defines field information, and business model information is set up in configuration.
According to embodiments herein, in the method, the configuration connection database information also includes:Configuration connection is not The database of same type, by changing the type information of database, switches between different types of database.
According to embodiments herein, in the method, the configuration creates table and defines field information, in addition to:Root Traffic table is created according to the table in tested database;Configure the table name and field of the traffic table created;The field is defined, including Definition field name, field type, field description, also, using ";" distinguish field;The field name and table in database Field name it is consistent;And the field type in the traffic table of each establishment is the different data types generated at random, word The numerical value of section is then generated at random according to business rule.
According to embodiments herein, in the method, the business model, which is set up, also to be included:Being made in business model The relation data used is abstracted into the data in a public set, the traffic table and obtained from this public set, protects Demonstrate,prove the relation between table and table.
According to embodiments herein, in the method, the configuration creates table and defines field information, in addition to:It is right The traffic table of establishment and the order of field are customized, and the information in the traffic table of establishment keeps one with the information of target service Cause, and field length, the span to each traffic table are configured.
According to embodiments herein, in the method, business model information is set up in the configuration, in addition to:According to mesh Mark business complexity and/or target service execution logic, come the mode of the execution that configures set up business model.
According to embodiments herein, in the method, business model information is set up in the configuration, in addition to:In configuration Transaction model is added in good test file.
According to embodiments herein, in the method, the configuration testing file, in addition to:Set in test file There are different labels;And label different in test file is configured, the information in each label is defined, so as to right Different information are labelled, reading during so as to test database performance to test file.
According to embodiments herein, in the method, the test file is read out, in addition to:According to reading The mark of label in test file, parses the instruction of the performance for testing the database associated with target service, The flow of the practical business is simulated to perform processing.
According to embodiments herein, in the method, the flow of the simulation practical business performs processing, also wraps Include:The information of each affairs in the business model read out, and preserved using structure chained list;And according to each thing The information of business, performs the instruction parsed.
According to embodiments herein, in the method, before the business model is set up, in addition to:To various data Storehouse progress is abstract, and field type in database table and field length are unified.
Compared with prior art, according to the technical scheme of the application, one of its advantage is can be according to specific business customizing Business model is tested, and program executive mode can be configured, preferably be simulated actual business.Not only it can guarantee that As a result correctness, moreover it is possible to ensure the authenticity of test.Its another advantage is that utilization rate of equipment and installations is high, can use seldom equipment mould Intend substantial amounts of application server, substantial amounts of test resource can be saved, flexibility is more preferable.
Scheme based on the application, it has more preferable test to current database volume, so that estimated result is optimal, root Factually the business scenario on border, with the help of test result, can select more preferable hardware or carry out better performance tuning, more close The utilization resource of reason.
Brief description of the drawings
In order to illustrate more clearly of the technical scheme of the embodiment of the present application, used required in being described below to embodiment Accompanying drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present application, for this For the those of ordinary skill of field, on the premise of not paying creative work, it can also obtain other according to these accompanying drawings Accompanying drawing.
Fig. 1 is the functional frame composition of an embodiment of database performance measurement of the application based on business model;
Fig. 2 is the flow chart of an embodiment of database performance measurement method of the application based on business model;
Fig. 3 be database performance measurement method of the application based on business model an embodiment in configuration testing The flow chart of file;And
Fig. 4 is the read test of an embodiment of database performance measurement method of the application based on business model File performs the flow chart of test.
Embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described corresponding accompanying drawing, it is clear that described embodiment is only the application one Section Example, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Go out the every other embodiment obtained under the premise of creative work, belong to the scope of the application protection.
The application sets up business model according to actual business, and actual industry is operated and reduce by simulating real user Business flow, to reach the purpose for more fully testing out database performance.Different industry can be customized according to different business Business model, saves more resources, and configuration operation versatility, transplantability are high.
Fig. 1 describes the functional framework of the database performance measurement method based on business model, that schematically shows Three main processing parts of herein described method, it includes configuration testing file module 110, read test file Perform test module 120, the module that outputs test result 130.
In configuration testing file module 110, complete pairwise testing information is configured, and it completes the configuration of test information Afterwards, test information is stored in test file, here, test file can select to use xml document.Read test file is held Row test module 120 obtains the xml document and parsed, and performs the instruction of analog service operating process, carries out at test Reason.The test result for completing test processes acquisition is sent to the module 130 that outputs test result, by the survey of the database performance Test result is exported.
Fig. 2 flow more specifically embodies the overall flow of the embodiment of the application one and the above-mentioned input of correspondence is matched somebody with somebody Put, read the specific processing mode of execution and output module.
In configuration testing file module 110, the corresponding business model 200 of target service is set up.To data repository abstraction and Relation in the abstract and relational database of affairs between each table data is abstract.Business model is generally true before test It is fixed, hereafter it can be configured by normal business model, configuration information is customized and configured according to business main flow.
Database it is abstract
Testing tool supports the data Oracle and MySQL (real work needs) of two kinds of most main flows at present, and is permitted at present Many testing tools can only test Oracle or can only test MySQL.Utilize the method for testing of the application, configuration connection database Information, both of which can be supported well(Type of database need not be considered).
The place of difference present in literary name segment type to disparate databases, test program can carry out compatible place Reason, such as Oracle represents that character types are varchar2, and is varchar in MySQL, the word that test program is uniformly used Symbol type String represents that date type and default value are different in such as Oracle and MySQL, and that unifies in a program makes Date type is represented with Date, while user can configure the default value at exact date, such as c1#Date according to type of database It is that field c1 is date type that { systimestamp }, which is represented, while being used as its default value using systimestamp (default value on date in Oracle), c2#Date { now () } represents that field c2 is date type, and its default value is now (default value on MySQL dates), so, as abstract as possible and unified configuration simplify the cost of configuration testing file.To length Different fields, the processing mode of this method is the average length for taking each field in practical business table, simplifies answering for configuration Miscellaneous degree, while preferably simulating real scene.Thus, business model need not consider type of database, and field type also to the greatest extent may be used Can unification, be switched to another data from a kind of database, configuration testing file substantially need not too big change(Match somebody with somebody Confidence is ceased substantially without modification), MySQL is switched to from Oracle Ru smooth.
To the abstract of affairs
For the related business of database, the intensive business of affairs is exactly mainly by a series of relevant issues group Into, and have certain logical order between affairs, all totally it is connected with previous step transaction operation per single stepping, while also straight The operation for having influence on next step is connect, in the test file obtained after the completion of the configuration of the application, business is remained related most heavy The part wanted, is exactly the correlation of affairs, each affairs are represented with a structure, and one is constituted by many structures Individual queue, it is necessary to assure this affairs could be run before the completion of a upper affairs, is called after the success of this transaction operation next Individual issued transaction, so, service logic is abstracted into orderly several affairs.Illustrate, firstly the need of confirmation business in transaction In stock whether, this is related to a transaction operation product, and in the case where confirming to have stock, user can just place an order A transaction is created, in the case of one transaction of establishment is successful, user can just use bank card to be paid, each process All include the processing of some some affairs.When setting up business model, it is possible to carry out flexible affairs according to these processing procedures Configuration, it is ensured that business processing authenticity.
Business is constituted by by many association affairs, is that order is performed between affairs, while a upper affairs perform knot Really, directly influence whether latter affairs perform.In the scheme of the application patent application, detailed sentence is also among affairs It can configure.For example:One business packet contains T1, T2, tri- affairs of T3, and present flow is T1->T2->T3, if business mould Type can change, such as T2, this affairs splits into T2-1, and T2-2, the flow of current business becomes T1->T2-1-> T2-2->T3, configuration is also very flexible, and T2 in configuration file is substituted for T2-1 and T2-2 just can be with;If operation flow Change, sequentially adjusted, the lower affairs order of configuration file modification also just can be with;If specific sql in affairs Sentence is performed and changed, the sql sentences in specific adjustment affairs.
It is abstract to the relation between each table data in relational database
In relational model of database, most important is exactly the incidence relation between each table, in real business scenario In, there is also such situation, than example as mentioned above, you are creating insertion inside process of exchange, acquiescence transaction record One Transaction Information, indicate " who ", " when ", " which type of article have purchased ", this corresponding Item Information Certainly it is in stock storehouse(Otherwise this transaction is created meaningless), and transaction record is to exist to contact with inventory information , when setting up business model, by the data abstractions of these relations into a public set, to ensure between each table Contact, i.e. table relation abstract processing.The data of each table are extracted from public set, it is ensured that all tables Some attributes are consistent, and remain the relation between most important table and table in relational database.Public is integrated into foundation Obtained during business model, from the data set and business model feature of traffic table, we can obtain this shared collection Close.Such as:The data of each table extract data from shared set, that is, table and shared set generate relation, share Be integrated between each table and taken a bridge.Want Table A and table B to associate, most important is exactly in the middle of Table A and table B A bridge is built, this shared set is exactly so bridge block.
The associated attribute of the table of each in database is all in a set(Model)In, the data of each table reference are all from this Taken in individual set, this set associates each table.In the test process of program at the beginning, each table is mutually solely Vertical, it is impossible to associated with other tables, it is impossible to find common ground.By the way that common attribute is stored in a shared collection In conjunction, each table is associated, it is ensured that the characteristics of most basic in relational database.Row is lifted, general we go registration One website needs to fill in many information, such as name, phone number, mailbox, ship-to etc..Assuming that these information are all It is stored in different tables.How to know that these information associations, to that people, can now be closed by a Customs Assigned Number Connection gets up, such as is added in name table in the numbering of user, cell-phone number code table, mailbox, ship-to table plus same volume Number, pass through the numbering of user, it can be appreciated that the related all information of some user, inside this, the numbering of user It is exactly that shared set element.Each table all has relation with shared set, it is believed that each table indirectly has this relation. Among each program operation process, shared element starts to need to initialize once, behind can be directly from this when use Go to obtain in set.
Pass through sequential execution affairs, it is ensured that the order that affairs are performed, remain the most important characteristic of business;Pass through Relation between table is abstracted into a shared set, to ensure the uniformity of data between each table, relation number is remained According to the most important part in storehouse, so as to ensure that the application method of testing can really simulate practical business.
In configuration testing file module 110, implement the configuration step 210 configured to test file, complete to surveying Examination information is configured.Here, test file can select to use xml document.The process of configuration testing file is as shown in Figure 3. Wherein, test information includes, and connects database information, creates table and defines field information, sets up business model information.
Wherein, the label at all levels in xml document, facilitates and is configured, while it is substantially right to add a label Configuring before does not influence, and being developed to addition in design pattern has been met well, to the principle of modification closing.Read xml File is also very convenient, and being done by corresponding several interfaces just can be with, suitable convenience and quick.
Also, xml richness label functions so that testing tool can be configured flexibly very much, fixed information configuration, Such as username and password, database schema and port etc. can be configured by fixed label, for some presence The number of the table of variable information, such as uncertain field number and change, also provides flexible configuration feature.For table Field, is represented by a well-regulated wide character, is split between each field and field with " # ", and the length of character string is It is unrestricted, thus theoretical upper table field be also do not have it is conditional, while in testing tool, having used queue to represent Field, in theory length be also not limited, for table name configure, configured by multiple identical table labels, because xml Tag length itself can be adjusted dynamically, and table quantity is also can be with dynamic configuration, equally in test process, and table is to use one Individual chained list, length be also it is unconfined, can be with dynamic configuration.
The preferably first configuration connection database information 310 of configuration step 210, is reconfigured at establishment table and defines field information 320, business model information 330 is set up in finally configuration, is completed after configuration testing information, and test information is stored in into test file In.
The process of configuration testing file will be specifically introduced below, as shown in Figure 3.
In configuration connection database information 310, to type of database, database user name, database password, database Set identification schema, database ip, these parts of database port are configured.
Such as, when supporting the MySQL databases different with the classes of Oracle two, type of database can select MySQL or Person Oracle, here, that schema is represented in Oracle is Instance Name SID in Oracle, in above-mentioned configuration connection database letter Breath 310 with " db labels " as mark when, then for for example:
The configuration information of database is in addition to type of database is inconsistent(Oracle or MySQL)Others keep one Cause.Although different inside data store internal such as Oracle and MySQL, both are almost without area from the point of view of configuration process Not, then by the application method of testing configuration means, this abstract well point encapsulates complexity, realizes method of testing It can be changed in disparate databases.
When configuration creates table and defines field information 320, the field name of table name, table to database, the field class of table Type and field description are defined and assignment.
In the database of current main flow, main data type includes:Integer, character string, time type, enumeration type (Even support itself not support in MySQL according to certain automatic increased Serial No. Sequence of rule), these types Database is all to support, meanwhile, the characteristics of being applied according to some can generate random integer data, random character string The more random characteristic of each data distribution in data, more preferable simulation application.The numerical value of field can be according to these regular next life Into preferably maintaining operational feature, more accurate representation business overall flow.
When above-mentioned configuration creates table and defines field information 320 using " tablist labels " as mark, then for for example:
Tablist labels:
In tablist labels " table name " represent table name, and medium content thereafter represents each field of table Information.
Field is mainly made up of three parts:Between title+type+field description, each field with ";" separate, field Title must be the same, including capital and small letter part with the field name of table in database.
Field type mainly includes StrRand, NumRand, Date, StrList, Func, as follows:
StrRand represents that what is preserved in random character string wherein { } is the length of random string, such as C2#StrRand { 6 }, it is a random character string to represent C2, and its length is 3.
NumRand represents random shaping, wherein what is preserved in { } is the initial value of random integers, such as C4#NumRand { 10,99 }, represent that C4 is an integer between 10 and 99.
Date represents date type, such as C9#Date { ' systimestamp ' } represent that C9 is a date, it is worth to be current System time.
StrList represents enumerated value, and its type can only be some in state set, such as C10#StrList { ' T ', ' S ' } to represent C10 can only be some in T and S state.
Func represents customized type, and its value is customized, and specific life can be being found according to correspondence title Into rule, this field can be for representing that each table is associated in relational database, and (script is most initially to write dead in program In, behind keep in mind this is released from program).Such as A1#Func { ' acc1 ' } represent that A1 is a customized type, Title is acc1, behind can be gone to search corresponding value inside func lists according to acc1 this title.
According to the configuration means of the application method of testing, the order of table and field can carry out very fine-grained customization, be The real business of simulation, table information is to maintain highly consistent, the field length of each table, span with real business It is also to be configured, it is ensured that being capable of the real pressure of analog service.The used test field length in specific test It is consistent with the average length of the field in practical business, ensure the table and field in practical business and specific test to the full extent In table it is consistent with field, to ensure that the real result of database performance measurement is accurate.
When business model information 330 is set up in configuration, one or more affairs moulds are set up according to actual specific business Type carries out the actual operation flow of simulation.Whole operation flow is made up of a series of affairs, and each transaction packet is containing some sql Sentence, mainly comprising select for update, update, insert, delete etc., each specific sql can be with industry Handling process is consistent in business.The overall flow of business is also to be simulated by multiple affairs, so ensures the authenticity of test. For example when there is large-scale activity to reach the standard grade, database there is over several times to more than ten times usually of pressure, and analog subscriber is normal Service request, is configured to multi-user's login system simultaneously in business model, and database is repeatedly inquired about in circulation.
Set up in configuration in business model information 330, during using " test labels " as mark, then for for example:
Test labels
Most important part inside ranging sequence is pressed, func, loop and transaction is contained:
func
Func this it is superincumbent it has been noted that mainly generation occurrence be customized (not possessing versatility).
Be divided into two kinds, db generations and program oneself generation, when type is " program " when occurrence be test program Generation, is otherwise represented by inquiring about db generations
Program Generating:
<func name=”acc1”type=”program”>”2088111”#Random(1,100000000,9)#” 0156”</func>Represent entitled acc1 field, it be with test program generation, it is assembled by three parts:
(the 3rd parameter of Random represents above to mend less than 91 to 100000000 integers that 2088111+ is generated at random 0)+0156
Db is generated:
<func name=”acc1”>select seq_test.nextval from dual</func>
Represent that this acc1 is obtained by inquiring about db sequence,
loop
Test loop how many times are represented, it is general to set one than larger number.
transaction:
Can there are many select, update, insert, delete, all sql inside each transaction Sentence is required for being write as the form of binding variable, such as:
<select tab=”i_tab”>select*from I_TAB where I1=:ACC1 for update wait3 </select>
Tab attributes represent that content representation specifically inquires about sql inside table name, label, and wherein binding variable title must be able to Enough in corresponding table (program goes in corresponding field name to search by binding variable name).
Special instruction:It is that can directly be write without field one by one is write out when being pure insert sentences Into:<insert tab=”m_tab”/>Program goes to search all fields according to oneself table name.
Note in transaction, in fact without any implication, is exactly only an annotation, numbering.
Business model information 330 is set up based on configuration, the method for testing of the application is also supported to add affairs, for not of the same trade or business For business, the number of times of affairs and each affairs particular content are to need to customize, and in the method for testing of the application, have used xml Pass through between the configuration of affairs, each affairs<transaction>Label is split, because xml supports multistage label, Therefore the configuration of affairs can very flexibly, in test process, and if necessary to add an affairs, correspondence increases in configuration file Plus one<transaction>Label, xml document characteristic allows affairs to be configured with very high flexibility.In the inside of program, it is also Realized by affairs chained list, the information of affairs is preserved by chained list, chained list has preferably flexibly for array Property, comparatively array has fixed length, such as can only support specific number of transactions, and the quantity of chained list affairs is unrestricted System.
Here, for more complicated issued transaction, the configuration of the application sets up business model information 330 always according to specific Business configures the mode of execution, so as to reach more preferable processing by way of configuring execution.
The processing of such as multiple logic branches, performs A, B operation or A, C operation;Simultaneously inside an affairs, Sentence can be performed according to certain probability, such as A operations are performed in the case of 20%, and 80% situation performs B operations, these behaviour Work can be performed normally well.A, B, C can be the A sentences, B sentences, C sentences for performing processing, correspond to corresponding Processing operation.
Certain logic judgment is carried out according to complicated service logic to complete operation.Such as, when A operations are successful Wait, perform B operations, otherwise performing C operations, these complicated business processing logics somewhat more truly reflect industry Operation in business.
The configuration information related to business is all saved in xml document after above-mentioned configuration, and here is an example:
Then, in read test file performs test module 120, the test file i.e. configuration file to configuring is implemented Reading and test process execution operation, i.e., read test file perform testing procedure 220, to complete the configuration to acquisition The reading of file, preservation, perform processing.Read test file, such as completed by being parsed to xml document.Program can basis Table and the configuration information of field, are read out successively in configuration file, read after completing, program parses the field of each table Type.Supporting beyond general data type, also supporting the data type of personalization, such as some O/No. information, journey Sequence can be carried out fully according to operational characteristic it is assembled, such as, and during certain class affairs is order placement service, O/No. by Some specific rule compositions:Fixed character string+date+sequence number, program can easily parse these rules.
After table and the pretreatment of each field information are completed, system can read the information of each affairs, in sequence, deposit Into a structure chained list.Several sql sentences are contained among affairs, simple business is exactly the execution successively of order, Subprogram service logic is somewhat complicated, and program can carry out certain logic judgment to complete operation.
The process of parsing test file is the process being processed to input(So far the pretreatment work of all programs is complete Into), by parsing configuration file, obtain the link information of database;By reading the configuration information with resolution table, obtain Table and the information of specific field that whole business is related to, by parsing affairs, obtain each issued transaction overall process and Perform sql logic.These prepare and pretreatment work is completed, and program has been obtained for the instruction performed, according to user configuring Thread Count size, program starts to open multiple threads, and each thread performs the instruction of business.Simulate this live business Operating process, is reruned to after specified number of times, and program operation is completed.
As shown in figure 4, obtaining test information 401 in the test file configured from xml, multithreading test 403 is opened, finally 405 are outputed test result to the module 130 that outputs test result.
In the step 230 that outputs test result is entered, the instruction that program is performed, according to the Thread Count of user configuring Size, program starts to open multiple threads, and each thread performs the instruction of business.The whole business operation process of simulation, it is similar A kind of emulation mode(Simulation to actual services processing), after the number of times specified is run to, program operation is completed, test knot Fruit is sent to the module 130 that outputs test result, the output transactions response time, maximum, when minimum response time and average response Between.
The application can be described in the general context of computer executable instructions, such as program Module or unit.Usually, program module or unit can include performing particular task or realize particular abstract data type Routine, program, object, component, data structure etc..In general, program module or unit can be by softwares, hardware or both Combination realize.The application can also be put into practice in a distributed computing environment, in these DCEs, by passing through Communication network and connected remote processing devices perform task.In a distributed computing environment, program module or unit can With positioned at including in the local and remote computer-readable storage medium including storage device.
Finally, in addition it is also necessary to explanation, term " comprising ", "comprising" or its any other variant are intended to non-exclusive Property include so that process, method, commodity or equipment including a series of key elements not only include those key elements, and Also include other key elements for being not expressly set out, or also include for this process, method, commodity or equipment inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including described Also there is other identical element in process, method, commodity or the equipment of key element.
Specific case used herein is set forth to the principle and embodiment of the application, and above example is said It is bright to be only intended to help and understand the present processes and its main thought;Simultaneously for those of ordinary skill in the art, foundation The thought of the application, will change in specific embodiments and applications, all in spirit herein and principle Within, any modification, equivalent substitution and improvements made etc. all should be included within the scope of claims hereof.To sum up institute State, this specification content should not be construed as the limitation to the application.

Claims (11)

1. a kind of method that database performance measurement is carried out based on business, methods described is included:
The business model of the business is set up to simulate the flow of the business based on business, wherein, the business includes multiple Incidence relation in the affairs and database of association between each table, the business model is included to data repository abstraction and affairs Relation in abstract and database between each table data is abstract;
Test information corresponding with the business model is configured according to the business model, the test information is stored in file Middle formation test file, wherein, the corresponding information of testing of the business model includes connection database information, creates table and definition Field information and set up business model information;
It is read out according to the business model and to the test file test information obtained, test and target industry The performance of the associated database of business;And
The result of the performance of the database is exported as test result.
2. according to the method described in claim 1, it is characterised in that
When the test information includes connection database information, configuration test packet corresponding with the business model Include:
The different types of database of configuration connection, by changing the type information of database, between different types of database Switching.
3. according to the method described in claim 1, it is characterised in that
When the test information includes creating table and defining field information, test information corresponding with the business model is configured Including:
Table in tested database creates traffic table;
Configure the table name and field of the traffic table created;
Define the field, including define field name, field type, field description, also, using ";" distinguish field;
The field name is consistent with the field name of table in database;
Field type in each traffic table created is the different data types generated at random, and the numerical value of field is then according to industry Business rule is generated at random.
4. method according to claim 3, it is characterised in that when the test information also includes setting up business model information When, configuring test information corresponding with the business model includes:
Used in business model to relation data be abstracted into data in a public set, the traffic table from this Obtained in individual public set, it is ensured that the relation between table and table.
5. method according to claim 3, it is characterised in that configuration test information corresponding with the business model is also wrapped Include:
The order of traffic table and field to establishment is customized, and the information in the traffic table of establishment is protected with the information of target service Hold consistent, and field length, the span to each traffic table are configured.
6. according to the method described in claim 1, it is characterised in that when the test information also includes setting up business model information When, test information corresponding with the business model is configured, including:
According to target service complexity and/or target service execution logic, come the side of the execution that configures set up business model Formula.
7. method according to claim 6, it is characterised in that configuration test letter corresponding with the business model Breath, in addition to:Transaction model is added in the test file configured.
8. according to the method described in claim 1, it is characterised in that described according to business model configuration and the business mould The corresponding test information of type, the test information is preserved and forms test file hereof, in addition to:
Label different in test file is configured, the information in each label is defined, wherein, set in the test file Surely there are different labels, the label is used to label to different information, to test text during so as to test database performance The reading of part.
9. according to the method described in claim 1, it is characterised in that the test file is read out, in addition to:According to reading The mark of label in the test file taken, parses the finger of the performance for testing the database associated with target service Order, simulates the flow of the target service to perform processing.
10. method according to claim 9, it is characterised in that the flow of the simulation target service performs processing, Also include:
The information of each affairs in the business model read out, and preserved using structure chained list;
According to the information of each affairs, the instruction parsed is performed.
11. according to the method described in claim 1, it is characterised in that according to business model configuration and the business model Corresponding test information includes:
It is abstract to the progress of various databases, field type in database table and field length are unified.
CN201210447972.6A 2012-11-09 2012-11-09 The method that database performance measurement is carried out based on business model Active CN103810196B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210447972.6A CN103810196B (en) 2012-11-09 2012-11-09 The method that database performance measurement is carried out based on business model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210447972.6A CN103810196B (en) 2012-11-09 2012-11-09 The method that database performance measurement is carried out based on business model

Publications (2)

Publication Number Publication Date
CN103810196A CN103810196A (en) 2014-05-21
CN103810196B true CN103810196B (en) 2017-09-22

Family

ID=50706979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210447972.6A Active CN103810196B (en) 2012-11-09 2012-11-09 The method that database performance measurement is carried out based on business model

Country Status (1)

Country Link
CN (1) CN103810196B (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446825B (en) * 2014-06-12 2020-08-11 阿里巴巴集团控股有限公司 Database testing method and device
CN106708818A (en) * 2015-07-17 2017-05-24 阿里巴巴集团控股有限公司 Pressure testing method and system
CN106407830B (en) * 2015-07-29 2020-01-21 阿里巴巴集团控股有限公司 Cloud-based database detection method and device
CN106897205B (en) * 2015-12-18 2021-01-05 创新先进技术有限公司 Test data generation method and device
CN106897123B (en) * 2015-12-21 2021-07-16 阿里巴巴集团控股有限公司 Database operation method and device
CN105740722B (en) * 2016-01-25 2018-12-04 上海新炬网络技术有限公司 A kind of camouflage method of database sensitive data
CN107168864A (en) * 2016-03-08 2017-09-15 上海大唐移动通信设备有限公司 Code stream generation method and device
CN105912681A (en) * 2016-04-14 2016-08-31 国家电网公司 Aging testing method and system for electricity marketing database
CN107885654A (en) * 2017-05-05 2018-04-06 平安科技(深圳)有限公司 Data library test method and system
CN107480053B (en) * 2017-07-21 2021-08-17 销冠网络科技有限公司 Software test data generation method and device
CN107885656B (en) * 2017-09-13 2021-02-09 平安科技(深圳)有限公司 Automatic product algorithm testing method and application server
CN107979876B (en) * 2017-11-16 2022-01-07 广州市百果园网络科技有限公司 Data transmission method and terminal
CN108009087A (en) * 2017-11-29 2018-05-08 广州品唯软件有限公司 Data library test method, device and computer-readable recording medium
CN109903109A (en) * 2017-12-08 2019-06-18 北京京东尚科信息技术有限公司 Test method and device
CN109933514B (en) * 2017-12-18 2022-07-05 北京京东尚科信息技术有限公司 Data testing method and device
CN109976995B (en) * 2017-12-28 2022-06-28 百度在线网络技术(北京)有限公司 Method and apparatus for testing
CN108984712B (en) * 2018-07-06 2022-04-26 深圳前海微众银行股份有限公司 Service scene-based number making method and device and readable storage medium
CN110688295A (en) * 2018-07-06 2020-01-14 北京京东尚科信息技术有限公司 Data testing method and device
CN109558326B (en) * 2018-12-03 2022-04-26 中国建设银行股份有限公司 Test method and device
CN109785115A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 Generation method, device and the computer equipment of test data
CN109933507B (en) * 2019-03-22 2023-02-03 北京极简智能科技有限公司 Program performance detection method, system, equipment and storage medium
CN113360362A (en) * 2020-03-03 2021-09-07 北京沃东天骏信息技术有限公司 Dynamic sql efficiency checking method and plug-in
CN111444073A (en) * 2020-03-26 2020-07-24 中国信息通信研究院 Method, device and system for testing performance of financial database
CN111767222A (en) * 2020-06-28 2020-10-13 杭州数梦工场科技有限公司 Data model verification method and device, electronic equipment and storage medium
CN112819605A (en) * 2021-01-29 2021-05-18 山东浪潮通软信息科技有限公司 Method and device for testing fund settlement service and computer readable medium
CN113204451A (en) * 2021-03-22 2021-08-03 北京中交兴路信息科技有限公司 Pressure testing method and system for Redis cluster, storage medium and terminal
CN113704107B (en) * 2021-08-26 2024-05-07 平安国际智慧城市科技股份有限公司 Application testing method, device, equipment and computer readable storage medium
CN114721958A (en) * 2022-04-18 2022-07-08 四创科技有限公司 Automatic interface testing method and terminal for multi-database system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789002A (en) * 2010-01-22 2010-07-28 浪潮(北京)电子信息产业有限公司 Database compatibility test device and method for server
CN102158373A (en) * 2011-05-12 2011-08-17 哈尔滨工业大学 Performance evaluation system of high-end server for intermediary business of bank
CN102521354A (en) * 2011-12-13 2012-06-27 北京天融信科技有限公司 Auditing and testing method and auditing and testing device for data base protocol

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8019795B2 (en) * 2007-12-05 2011-09-13 Microsoft Corporation Data warehouse test automation framework

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789002A (en) * 2010-01-22 2010-07-28 浪潮(北京)电子信息产业有限公司 Database compatibility test device and method for server
CN102158373A (en) * 2011-05-12 2011-08-17 哈尔滨工业大学 Performance evaluation system of high-end server for intermediary business of bank
CN102521354A (en) * 2011-12-13 2012-06-27 北京天融信科技有限公司 Auditing and testing method and auditing and testing device for data base protocol

Also Published As

Publication number Publication date
CN103810196A (en) 2014-05-21

Similar Documents

Publication Publication Date Title
CN103810196B (en) The method that database performance measurement is carried out based on business model
US11775745B2 (en) Database model which provides management of custom fields and methods and apparatus therfore
CN105373469B (en) A kind of software automated testing system and method based on interface
US7991800B2 (en) Object oriented system and method for optimizing the execution of marketing segmentations
CN110287097A (en) Batch testing method, device and computer readable storage medium
AU2010337218B2 (en) Specifying user interface elements
CN103810275B (en) Method and apparatus for data interaction between non-relation and relevant database
CN110088749A (en) Automated ontology generates
US8935218B2 (en) Multi-client generic persistence for extension nodes
CN107644286A (en) Workflow processing method and device
CN106980669A (en) A kind of storage of data, acquisition methods and device
US20170168664A1 (en) Real time data analytics and visualization
US7926024B2 (en) Method and apparatus for managing complex processes
CN103646049B (en) The method and system of automatically generated data form
CN106599164A (en) Support for a parameterized query/view in complex event processing
CN106648587A (en) Annotation-based Web application code generation method
CN110033206A (en) Bill of materials automatic Check method and device
CN112860260B (en) Web-based cross-platform application construction tool and method in college scene
US20160259831A1 (en) Methodology supported business intelligence (BI) software and system
EP2965492B1 (en) Selection of data storage settings for an application
CN107908794A (en) A kind of method of data mining, system, equipment and computer-readable recording medium
CN109828906A (en) UI automated testing method, device, electronic equipment and storage medium
CN110221829A (en) Information processing method and its system, computer system and computer-readable medium
CN107515866A (en) A kind of data manipulation method, device and system
CN108304591A (en) A kind of method for customizing of label, system and terminal device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191204

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Co., Ltd.