CN108572914A - A kind of method and device generating the daily record for pressure test - Google Patents
A kind of method and device generating the daily record for pressure test Download PDFInfo
- Publication number
- CN108572914A CN108572914A CN201810211537.0A CN201810211537A CN108572914A CN 108572914 A CN108572914 A CN 108572914A CN 201810211537 A CN201810211537 A CN 201810211537A CN 108572914 A CN108572914 A CN 108572914A
- Authority
- CN
- China
- Prior art keywords
- daily record
- association
- master log
- log
- master
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
Abstract
This application discloses a kind of methods generating the daily record for pressure test, generate required amount of daily record group, and each daily record group is generated using following manner:Based on existing daily record topological model, the master log of preset quantity is generated, each master log record has corresponding master log information and master log mark, and the master log mark of each master log has incidence relation;According to the incidence relation for being associated with daily record of each master log and each type that the daily record topological model is characterized, the association daily record for being associated with each master log is generated;Wherein, each association log recording has corresponding association log information and corresponding association daily record mark, and the association daily record mark of each association daily record and the master log mark of associated master log have incidence relation.Accordingly, the technical program is convenient for, when utilizing the daily record for pressure test generated to carry out pressure test and equipment run-time error in network system, inquiring the daily record of relevant treatment mistake.
Description
Technical field
This application involves a kind of methods generating daily record, and in particular to a kind of side generating the daily record for pressure test
Method further relates to a kind of method for testing pressure.The application is related to a kind of device generated for pressure test simultaneously.The application is in addition
Further relate to a kind of electronic equipment generated for pressure test and a kind of computer readable storage medium.
Background technology
Network system will usually be handled a large amount of data in certain periods, for example, online retailing platform is being lifted
A large amount of order related data will be handled during row shopping mall activity, and calculate ASSOCIATE STATISTICS result.If network system
System unreasonable allocation, in the processing pressure for facing mass data, the equipment in network system is possible to run-time error, to production
Life adversely affects.Run-time error when to prevent the equipment in network system to face mass data processing pressure usually needs
It is to be understood that the maximum data pressure that network system can bear is how many, to make network system operate in the maximum data pressure
Under, or can also suitably increase the network equipment, according to the data processing pressure that may be faced to make up current network device
Handle the deficiency of data capability.Anyway, total it is to be understood that the maximum data processing pressure that current network systems can bear, this
It is generally necessary to can just be obtained by pressure test.
Network system, which carries out pressure test, in the prior art to be tested by a large amount of physical devices generation data, so
And although this test method is reliable, being difficult to the extensive quantity of tissue is tested, while cost is also relatively high.Except this it
Outside, when usually carrying out pressure test, all it is that pressure testing data is largely used to by the generation of pressure test tool, then will be produced
Input data of the raw mass data as Devices to test, while the operation conditions by monitoring Devices to test, obtain to be measured set
The maximum capacity of standby processing data.But the prior art still fails to provide a kind of daily record production of more practicable record data
Generation method.
The defect of method that the prior art generates the daily record for pressure test essentially consists in, although master log be associated with day
Exist between will and be associated with, there is also associations between master log, but association is not present sometimes between the association daily record of different master logs
Relationship, this will cause, when carrying out pressure test using these daily records and run-time error occur, can not quickly and accurately trace back to
Handle the daily record of error.In addition, when the prior art generates the daily record for pressure test, although also generating certain form of association
Daily record, but it is difficult to generate the association daily record of the behavioral data under more practical simulation actual scene, for example generation record has
The daily record of hot spot (occurrence number is more, probability of occurrence is big) data.
Invention content
The application provide it is a kind of generate for pressure test daily record method, with solve the prior art using daily record into
Row pressure test and when there is run-time error, the technical issues of can not quickly and accurately tracing back to the daily record of processing error.Separately
Outside, when the application also aims to the daily record for solving prior art generation for pressure test, it is difficult to it is real to generate more practical simulation
The technical issues of association daily record of behavioral data under the scene of border.
The application provides a kind of method generating the daily record for pressure test, generates required amount of daily record group, and
Each daily record group is generated using following manner:Based on existing daily record topological model, the master log of preset quantity, Mei Gezhu are generated
Log recording has corresponding master log information and master log mark, and the master log mark of each master log has pass
Connection relationship;According to the incidence relation for being associated with daily record of each master log and each type that the daily record topological model is characterized,
Generate the association daily record for being associated with each master log;Wherein, each association log recording have corresponding association log information and
Corresponding association daily record mark, and the association daily record mark of each association daily record and the master log mark of associated master log have
It is relevant.
Optionally, the daily record topological model includes the master log of preset quantity, and is closed respectively with some master log
The association daily record of connection, and the master log has incidence relation each other;The master log, association daily record are the topology
The node of model, incidence relation, master log and the incidence relation being associated between daily record between the master log are topological model
Connection relation between node;Each incidence relation passes through master log, the daily record identification record of association daily record.
Optionally, the daily record topological model is generated by executing following steps:According to existing each for recording user
Information recorded in each daily record of operation, parses the relationship between each daily record;According to the relationship between each daily record, present count is determined
The master log of amount, the respectively incidence relation between the associated association daily record of each master log, each master log;The Lord's Day
Will, the node that association daily record is the topological model, incidence relation, master log between the master log be associated between daily record
Incidence relation, the connection relation between topological model node;Each incidence relation passes through master log, association daily record
Daily record identification record.
Optionally, the master log mark of each master log is with incidence relation and each association daily record
Being associated with daily record mark and the master log mark of associated master log has incidence relation, the incidence relation therein specific
It is that daily record mark is identical.
Optionally, have for the daily record of each daily record group of the daily record of pressure test and can recognize that as pressure testing data
Mark is pressed to know.
Optionally, the daily record mark uses the mark with specific meanings.
Optionally, in the step of generation is associated with the association daily record of each master log, it is based upon each record type
Association log field it is preset accounting in relevant log field, it is each to generate each master log mapped at random
The association log field of record type.
Optionally, some or the certain fields with scope limitation recorded in the association log information passes through execution
Following steps generate:Read pre-loaded target dimension table;In the selectable range that the target dimension table records relevant field
In, select some or certain optional values as the field value for being associated with field described in log information.
Optionally, the field value selected in the dimension table meets the probability distribution rule for presetting coefficient of kurtosis.
Optionally, the optional value in the dimension table includes any one of following categorical data:Movable identification information number
According to, station address information data.
Optionally, some or the certain fields in the association log information are enumeration type, then its field value is from pre-
First in determining enumerated value range of choice, select to determine with preset method of determination.
Optionally, some or the certain fields in the association log information are rule type, then its field value according to
Pre-defined rule generates.
Optionally, described to generate required amount of daily record group, the quantity of daily record group therein is on time dimension according to pre-
If rate generate.
Optionally, described to generate required amount of daily record group, daily record group quantity therein is limited to pre- according to time dimension
In fixed quantitative range.
The application also provides a kind of method that the daily record generated according to the above method carries out pressure test, including:
According to the incidence relation of its corresponding association daily record of each master log in each daily record group and recorded letter
Breath, determines the corresponding data exchange process of client and server;According to the phase of identified client and server
The data exchange process answered generates corresponding script sentence using script function;According to corresponding script sentence, generate corresponding
Process or thread;Obtain the target capabilities data of Devices to test.
The application also provides a kind of device generating the daily record for pressure test, and described device includes:Master log generates
Unit is configured to be based on existing daily record topological model, generates the master log of preset quantity, and each master log record has corresponding
Master log information and master log mark, and each master log master log mark have incidence relation;It is associated with day
Will generation unit, be configured to each master log characterized according to the daily record topological model and each type is associated with daily record
Incidence relation, generate and be associated with the association daily record of each master log;Wherein, each association log recording has corresponding association day
Will information and corresponding association daily record mark, and the master of association the daily record mark and associated master log of each association daily record
Daily record mark has incidence relation.
Optionally, described device further includes:Resolution unit is configured to according to existing for recording what user respectively operated
Information recorded in each daily record parses the relationship between each daily record;Incidence relation determination unit, be configured to according to each daily record it
Between relationship, determine the master log of preset quantity, respectively between the associated association daily record of each master log, each master log
Incidence relation;The master log is associated with the node that daily record is the topological model, incidence relation, master between the master log
Daily record and the incidence relation being associated between daily record, the connection relation between topological model node;Each incidence relation is logical
The daily record identification record crossed master log, be associated with daily record.
Optionally, the master log generation unit further includes:It is associated with log field and generates subelement, be configured to be based upon
The association log field of each record type it is preset accounting in relevant log field, generate each master log at random
The association log field of each record type of mapped.
Optionally, the master log generation unit further includes:Target dimension table reading subunit is configured to read advance add
The target dimension table of load;Field value selects subelement, is configured to select some or certain optional values in the target dimension table
To in the selectable range of relevant field record, selecting some or certain optional values as institute in the association log information
State the field value of field.
The application also provides a kind of device carrying out pressure test to the daily record generated according to above-mentioned apparatus, including:It hands over
Mutual process determination unit is configured to the incidence relation according to its corresponding association daily record of each master log in each daily record group
And recorded information, determine the corresponding data exchange process of client and server;Script sentence generation unit, matches
It sets for the corresponding data exchange process according to identified client and server, is generated using script function corresponding
Script sentence;Process or thread generation unit are configured to, according to corresponding script sentence, generate corresponding process or thread;
Target capabilities data capture unit is configured to obtain the target capabilities data of Devices to test.
Optionally, described device further includes:Resolution unit is configured to according to existing for recording what user respectively operated
Information recorded in each daily record parses the relationship between each daily record;Incidence relation determination unit, be configured to according to each daily record it
Between relationship, determine the master log of preset quantity, respectively between the associated association daily record of each master log, each master log
Incidence relation;The master log is associated with the node that daily record is the topological model, incidence relation, master between the master log
Daily record and the incidence relation being associated between daily record, the connection relation between topological model node;Each incidence relation is logical
The daily record identification record crossed master log, be associated with daily record.
Optionally, the master log generation unit further includes:It is associated with log field and generates subelement, be configured to be based upon
The association log field of each record type it is preset accounting in relevant log field, generate each master log at random
The association log field of each record type of mapped.
Optionally, the master log generation unit further includes:Target dimension table reading subunit is configured to read advance add
The target dimension table of load;Field value selects subelement, is configured to select some or certain optional values in the target dimension table
To in the selectable range of relevant field record, selecting some or certain optional values as institute in the association log information
State the field value of field.
The application also provides a kind of daily record that is generated of device of the daily record to above-mentioned generation for pressure test and presses
The device of power test, which is characterized in that including:Interactive process determination unit is configured to according to each master in each daily record group
The incidence relation of its corresponding association daily record of daily record and recorded information, determine the corresponding of client and server
Data exchange process;Script sentence generation unit is configured to the corresponding number according to identified client and server
According to interactive process, corresponding script sentence is generated using script function;Process or thread generation unit are configured to according to corresponding
Script sentence, generate corresponding process or thread;Target capabilities data capture unit is configured to obtain the mesh of Devices to test
Mark performance data.
The application also provides a kind of electronic equipment for generating the daily record for pressure test, the electronic equipment packet
It includes:Display;Processor;Memory, the program retried for storing scheduling, described program are reading execution by the processor
When, execute following operation:Required amount of daily record group is generated, and each daily record group is generated using following manner, based on existing
Daily record topological model, generate the master log of preset quantity, each master log record has corresponding master log information and Lord's Day
Will identifies, and the master log mark of each master log has incidence relation;It is characterized according to the daily record topological model
Each master log and each type the incidence relation for being associated with daily record, generate and be associated with the association daily record of each master log;Its
In, each log recording that is associated with has corresponding association log information and corresponding association daily record mark, and is each associated with daily record
Association daily record mark and the master log mark of associated master log there is incidence relation.
The application also provides a kind of computer readable storage medium, is stored thereon with for generating the day for being used for pressure test
The program of will, which is characterized in that when the program is read out by the processor execution, execute following operation:Generate required amount of daily record
Group, and each daily record group is generated using following manner, is based on existing daily record topological model, is generated the Lord's Day of preset quantity
Will, each master log record have corresponding master log information and master log mark, and the master log of each master log
Mark has incidence relation;The each master log characterized according to the daily record topological model and each type are associated with daily record
Incidence relation generates the association daily record for being associated with each master log;Wherein, each association log recording has corresponding association daily record
Information and corresponding association daily record mark, and the Lord's Day of association the daily record mark and associated master log of each association daily record
Will mark has incidence relation.
Compared with prior art, the present invention has the following advantages:In addition to each master log in master log set is recorded
Except the mark for having the master log set, the association daily record of each each type of master log mapped also with corresponding Lord's Day
The mark of master log set described in will is associated, can be inquired and the master log by any one master log in this way
The association daily record that associated master log, association daily record associated with the master log, associated master log map.This programme
Convenient for when utilizing the daily record for pressure test generated to carry out pressure test and equipment run-time error in network system,
Inquire the daily record of relevant treatment mistake;By using the technical program, additionally it is possible to according to data with existing, obtain closing between daily record
The incidence relation of reason improves pressure and surveys effect to which more rational pressure measured data be arranged.
Description of the drawings
Fig. 1 is a kind of process flow of embodiment of the method provided by the present application for generating the daily record for pressure test
Figure;
Fig. 2 is a kind of reality for the method that the daily record that method according to Fig. 1 provided by the present application generates carries out pressure test
Apply the process chart of example;
Fig. 3 shows the daily record group that the method according to figure 1 for generating the daily record for pressure test is generated
A kind of embodiment schematic diagram.
Fig. 4 is the structural representation of one embodiment of the device provided by the present application for generating the daily record for pressure test
Figure.
Specific implementation mode
Many details are elaborated in the following description in order to fully understand the application.But the application can be with
Much implement different from other manner described here, those skilled in the art can be without prejudice to intension of the present invention the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
Fig. 1 shows a kind of processing stream of embodiment of the method provided by the present application for generating the daily record for pressure test
Cheng Tu, Fig. 3 show the one of the daily record group that the method according to figure 1 for generating the daily record for pressure test is generated
The schematic diagram of kind embodiment.With reference to Fig. 1 and Fig. 3 to it is provided by the present application generate for pressure test daily record method into
Row is described in detail.
The method that the daily record for pressure test is generated shown in Fig. 1, includes the following steps:
Step S101 generates required amount of daily record group, and each daily record group is generated using following manner:Based on existing
Daily record topological model, generate the master log of preset quantity, each master log record has corresponding master log information and Lord's Day
Will identifies, and the master log mark of each master log has incidence relation.
" topological model " is the method for quoting research is unrelated with size, shape in topology point, line, and research object is taken out
As becoming a point, the mapping relations between point are abstracted as a line, are exactly Top Modules by the geometric figure that Points And lines form
Type.
" daily record " refers to that the record of recording data information, such as record have the daily record of " order information ", record to have " payment
The daily record of information ".For daily record general record in journal file, a journal file generally comprises some client or some clothes
Several daily records recorded in business device.Under usual context, some journal file is often known as daily record, by certain tool of journal file
The daily record of body is known as log recording.In this document, a certain specific log recording of item is called with daily record.
Daily record in same file or different files, can have incidence relation;Several days with incidence relation
Will constitutes a daily record group.For example, in the network platform does shopping scene, with the various operation requests of user, server also can
It executes various corresponding operations and generates the daily record group for recording these operation datas.In general, the daily record that will produce is mainly on the books
There are " order daily record " (such as user's daily shopping order), " daily record of kinds of goods detailed description " (such as object that the user of order detail submits
The daily record of date, the application method of product etc. being discussed in detail), " the terminal daily record " that generates order (for example recite terminal device
The daily record of type, it may be possible to mobile phone terminal, tablet computer terminal, computer terminal), " payment daily record " of user (for example recite
The daily record of time of payment, payment etc.), user's " payment terminal daily record " (for example recite the type of payment terminal, it may be possible to
Mobile phone terminal, tablet computer terminal, computer terminal), " means of payment daily record " (such as recite account in full payment, payment in due course letter
Breath etc.).
If each daily record in a daily record group is abstracted into a point, the incidence relation between daily record is abstracted into one
Bar line, the abstract geometry that line that the is point for being abstracted out by daily record and being abstracted by the incidence relation between daily record forms
Figure just constitutes " daily record topological model ".
" master log " refers to the type or significance level according to recorded information, and is identified the daily record of " main ".
Such as record has the daily record of " order information ", record to have the daily record of " payment information ", this two classes day aims at user from shopping platform
Buy commodity scene in be record most important information daily record, generation it is also most with the connection relation of other daily records, therefore
It can be confirmed to be " master log ".
Wherein, " order information ", the master log information that " payment information " is corresponding master log that user submits.
Each master log, which also record, to be had " master log mark ", master log identify to identify the information recorded in master log with
Just it is distinguished with other similar informations, for example record has the master log mark of the master log of the shopping " order information " of user's submission can
Think " Order No.OnlinePurchase " (see Fig. 4), record has the master log mark of the master log of user's " payment information "
Can be " bankAgentMode Order No. " (see Fig. 4).
Illustrate that " the master log mark of each master log, which has, closes according to the example of two master logs mark in the preceding paragraph
Connection relationship ".Record has the master log mark " Order of the master log of " order information " of user's submission from the preceding paragraph
It can be " bankAgentMode that No.OnlinePurchase " and record, which have the mark of the master log of user's " payment information ",
Order No. ", which can be seen that in the respective master log mark of two master logs, all contains " Order No. ", thus two Lord's Days
Will realizes association by the master log mark that is mutually related.
Certainly, for the two master logs mark example in, be by the way that there is phase in different master log marks
Same field " Order No. " realizes association.
Furthermore it is also possible to be to realize association by two identical master log marks.For example, when analog subscriber passes through one
When order has purchased two pieces identical product, two master logs with identical master log mark, the master log mark can be generated
Knowledge is " Order No.OnlinePurchase ", the two master logs will pass through identical master log mark and realize association.
" master log of preset quantity " refers to the number based on master log in the default model of existing daily record topological model
Amount is fixed.There are the master log of " purchase order information " and record to have " use for example, the master log in above-mentioned example only records
The master log of family payment information ".
As for " generating required amount of daily record group ", such as generate 100,000 daily record groups.In practice, software can be utilized to survey
Trial work have, such as LoadRunner (a kind of load testing tool of forecasting system behavior and performance) Virtual User
Generator (Virtual User generator) records each daily record having in the daily record group of various information to generate 100,000.The void
Quasi- generator can generate Virtual User, each step life of pre-recorded operation flow (such as placing an order) can also be performed
At corresponding daily record.Parameterization operations can be carried out with Virtual User Generator, are given birth to a purchase order data
At process for, parameterization operations can by the data (such as order number or customer name) in record, by other variable values Lai
Instead of.Possible order number and customer name can be arbitrarily taken in these variables, to simulate the operation behavior of multiple actual users.
Step S102, each master log characterized according to the daily record topological model and each type are associated with daily record
Incidence relation generates the association daily record for being associated with each master log;Wherein, each association log recording has corresponding association daily record
Information and corresponding association daily record mark, and the Lord's Day of association the daily record mark and associated master log of each association daily record
Will mark has incidence relation.
Existing " daily record topological model " can also characterize master log and the association of all types of association daily records in daily record group and close
System.By " the detailed description daily record of article ", (for example the date of article, application method etc. is detailed in advance for the existing daily record topological model
The daily record of introduction), generate order " terminal daily record " (for example recite the daily record of terminal equipment type, it may be possible to mobile phone terminal,
Tablet computer terminal, computer terminal) etc. with user submit " order daily record " on contents associated daily record be determined as
The association daily record of the master log.Similarly, can by user's " payment terminal daily record " (for example recite the type of payment terminal, can
Can be mobile phone terminal, tablet computer terminal, computer terminal), " means of payment daily record " (such as recite account in full payment, prop up on schedule
Pay information etc.) etc. with " the payment daily record " of user on contents associated daily record be determined as the master log be associated with day
Will.
Above-mentioned association daily record can use the Software Testing Tool such as LoadRunner described in step S101 (a kind of pre-
The load testing tool of examining system behavior and performance) it generates.
For example, having the master log of shopping " order information " based on the record generated in step S101, according to existing daily record
The master log that topological model is characterized and the incidence relation being associated between daily record can generate the associated each type of the master log
Association daily record.For example, the association log recording of one of which type has " order source-information " (as come from computer end, still
From cell phone end), a further type of association log recording have " the category information of cargo " (such as liquor, such as
Fresh class) etc..
For another example having the master log of " payment information " for the record generated based on step S101, according to existing daily record
The master log that topological model is characterized and the incidence relation being associated between daily record, can generate the pass of each type of the master log
Join daily record.For example, the association log recording of one of which type has " payment payment client information " (such as Alipay payment, mobile phone words
Take deduction payment), a further type of association log recording have " time of payment information " (such as in full amount pay, payable by installment
Deng).
" each association log recording has association log information accordingly and corresponding association daily record mark, and each closes
The association daily record mark for joining daily record and the master log mark of associated master log have incidence relation ", it is released by following example
It is bright.For example, the association daily record mark of one of them " detailed description daily record of article " association daily record of type in this way is " Yonghe County's soya-bean milk
Order No.”.Association daily record mark is realized by " order No " identifies " Order with master log
The association of No.OnlinePurchase ".
By above description it is found that above-mentioned existing daily record topological model may include the master log of preset quantity, Yi Jifen
Not with the associated association daily record of some master log, and the master log each other have incidence relation;The master log,
Be associated with the node that daily record is the topological model, the incidence relation, master log between the master log be associated between daily record
Incidence relation, the connection relation between topological model node;Each incidence relation passes through master log, the day of association daily record
Will identification record.
Meanwhile above-mentioned existing daily record topological model can be generated by executing following steps:
1st step is parsed according to existing for recording information recorded in each daily record that user respectively operates between each daily record
Relationship;
For example there are daily record, the record of shopping " order information " (such as order number, lower single time etc.) according to existing record
The daily record for having " the category information of cargo " (such as liquor, such as fresh class), it is known that the cargo of the category is at some
What the time enough bought, so that it is determined that go out the incidence relation between the two daily records,.
2nd step determines the master log of preset quantity, closes respectively with each master log according to the relationship between each daily record
The incidence relation of connection being associated between daily record, each master log;
For example, in above-mentioned 1st step, " order information " (such as order number, lower single time etc.) is clearly shopping at network scene
In very important information, it is thus determined that be " master log ", and " the category information of cargo " (such as liquor, such as fresh class)
It is determined as the association daily record of aforementioned master log.
The master log (" order information ", such as order number, lower single time etc.), association daily record (such as liquor, such as
Fresh class) be the topological model node, incidence relation, master log between master log and association pass be associated between daily record
System, the connection relation between topological model node;Each incidence relation is identified by the daily record of master log, association daily record
Record.It has been addressed before example, details are not described herein.
After step S101 and step S102, following technique effect may be implemented:It is generated according to the present embodiment
Between daily record, there is association between not single master log and association daily record, between master log there is also association, other different master logs
Association daily record between there is also incidence relation, for example the association daily record of different master logs all records the mark of " Order No. "
Know and association is realized with this.When carrying out pressure test using these daily records and run-time error occur, can quickly and accurately trace
To the daily record of error.
In the step of " generation is associated with the association daily record of each master log " in the present embodiment S102, specific implementation side
Formula is:
Step S102-1, the association log field for being based upon each record type are preset in the relevant log field of institute
Accounting, generate the association log field of each each record type of master log mapped at random.
For example, when the quantity of the daily record group of generation is 100,000, this 100,000 daily record groups can correspond to 100,000 " kinds of goods
Type daily record ".It can be according to each record type in some association log field (such as " Yonghe County's soya-bean milk " this record type
Record value as " kinds of goods type " log field) in preset accounting (such as 20%), to determine with the record type
It is associated with the quantity (i.e. 20,000) of log field (such as " Yonghe County's soya-bean milk " field).
Association log field as the certain proportion quantity (such as 20%) determined and the Lord's Day in which daily record group
Will association generates, and can be determined according to random number to distribute.The numerical value of " random number " is used to characterize the association daily record of each type
Random generation state.For example the numerical value " 1 " of random number represents the association daily record for generating a certain type, random number " 0 " represents not
Generate the association daily record of a certain type.Specifically, as described above, determining the association of 20,000 " Yonghe County's soya-bean milk " kinds of goods types
Daily record be assigned to be associated with the master log in which daily record group of 100,000 master log set generation when, can be by a series of
Step determines:The probability of occurrence for setting random number " 1 ", then starts a query at random number;Determined whether according to the numerical value of random number
Association daily record is generated for the master log in current master log set;" Yonghe County's soya-bean milk " kinds of goods type is generated if random number is 1
Association daily record, otherwise do not generate.20,000 daily record groups just can be randomly selected from 100,000 daily record groups in this way, and are based on day
Corresponding master log and the incidence relation for being associated with daily record in the daily record group that will topological model is characterized generate related to corresponding master log
The association daily record of connection.It should be noted that " random number " can be generated by random number generator.
In this realization method, the association log field for being based upon each record type is preset in the relevant daily record word of institute
Accounting in section, generates the association log field of each each record type of master log mapped, may be implemented as follows at random
Technique effect:It can make the behavioral data under the more practical simulation actual scene of the certain form of association daily record of generation.Than
Such as, in shopping at network application scenarios, the possible association daily record of " kinds of goods type " for " Yonghe County's soya-bean milk " only accounts in relevant daily record
20%, rather than 80%, by the association log field of each record type it is preset in relevant log field
Accounting, and the ratio for being associated with daily record, more practical simulation practical application scene just can be preferably controlled by random number.
In the optional realization method step S102-1 of the present embodiment, what is recorded in the association log information has range
Some or certain fields of limitation, which pass through, to be executed following steps and generates:
Step S102-1-1 reads pre-loaded target dimension table;
" dimension table " can be record the table of target information, such as described in the table field " Yonghe County's soya-bean milk ", " rice
The kinds of goods type information such as fragrant village's moon cake ", " millet 4A mobile phones ", " Maxoner air purifiers ".
" pre-loaded " can refer to the dimension table in above-mentioned example and come into process or thread, in state can be read.
Step S102-1-2 selects some or certain in the selectable range that the target dimension table records relevant field
A little field values that value may be selected as field described in the association log information.
According to the data read in dimension table, for example read data are " Yonghe County's soya-bean milk ", then make read data
It, should type of " Yonghe County's soya-bean milk " field value for recording association daily record for the field value of field described in the association log information
For " Yonghe County's soya-bean milk kinds of goods type ".
It is optional in the dimension table in the optional realization method step S102-1-1 of the present embodiment, step S102-1-2
It selects value and meets the probability distribution rule for presetting coefficient of kurtosis.
Wherein, the characteristic of " coefficient of kurtosis " characterization probability density distribution curve peak value height at average value.For example, just
The kurtosis (coefficient) of state distribution is constant 3, and equally distributed kurtosis (coefficient) is constant 1.8.In statistics is put into practice, we are often
The reference of condition is distributed using the two typical distribution curves as evaluation sample data sequence.For example, if above-mentioned field value
" Yonghe County's soya-bean milk ", " Dao Xiangcun moon cake ", " millet 4A mobile phones ", " Maxoner air purifiers " are set in advance as meeting default peak
Degree coefficient is 1.8 to be uniformly distributed, then it represents that the probability that each data occur is almost the same, is all 25%.For another example, if on
State field value " Yonghe County's soya-bean milk ", " Dao Xiangcun moon cake ", " millet 4A mobile phones ", " Maxoner air purifiers " be set in advance as it is pre-
It being first set as meeting the normal distribution that default coefficient of kurtosis is 3, then it represents that the probability difference that each data occur is larger, such as
The probability that " Yonghe County's soya-bean milk ", " Dao Xiangcun moon cake " occur may be 40%, and " millet 4A mobile phones ", " Maxoner air purification
The probability that device " occurs may be 10%.
Optionally, field value can be also used for recording other than the above-mentioned kinds of goods type for recording association daily record:Activity
ID information data, station address information data.For example, representation of activity information data " 1212 " characterization order complementary goods is ginseng
Add the cargo of double 12 advertising campaigns of the shopping network platform;Station address information data " huadong " characterization is related living for another example
It is dynamic to be directed to East China user.
Optionally, some or the certain fields in the association log information are enumeration type, then its field value is from pre-
First in determining enumerated value range of choice, select to determine with preset method of determination.For example, for recording in " user sources province "
The association log field value of association daily record only selected from field value identified below:Such as " Beijing ", " shanghai,
" shenzhen " etc..
Optionally, some in the association log information or certain fields can be rule type, then its field value
It is generated according to pre-defined rule.For example, the field value for recording order number, generates according to equally distributed coding rule.Each word
Segment value sequence can be " 2017111101 ", " 20171102 ", " 20171103 " etc..
Optionally, described to generate required amount of daily record group, the quantity of daily record group therein is on time dimension according to pre-
If rate generate.For example, often generating 1000 daily record groups, it is limited in 0.5 second and generates.
Optionally, described to generate required amount of daily record group, daily record group quantity therein is limited to pre- according to time dimension
In fixed quantitative range.For example, every 1 second, the quantity for generating daily record group is limited within the scope of 1000-1500.
Optionally, have for the daily record of each daily record group of the daily record of pressure test and can recognize that as pressure testing data
Mark is pressed to know.For example, the mark available word segment value " used for yace " assists in identifying.
Optionally, the daily record mark uses the mark with specific meanings.For example, the field value chosen can use the Chinese
Language phonetic, English word (such as bank agent), can be explicitly shown the meaning understood convenient for user.
Present invention also provides one embodiment that the daily record generated according to preceding method carries out the method for pressure test
Flow chart, referring to Fig. 2.The method that the daily record that is generated according to the above method carries out pressure test includes:
Step S201, according to the incidence relation of its corresponding association daily record of each master log in each daily record group and institute
The information of record determines the corresponding data exchange process of client and server;
As an example, include two master logs that are mutually related than a daily record group as discussed above, i.e. user
" order daily record " (such as user's daily shopping order) for submitting, user " payment daily record " (for example, recite the time of payment,
The daily record of payment etc.).Meanwhile the master log " order daily record " that user submits includes corresponding association daily record, i.e. order
Described " the detailed description daily record of article " (such as daily record being discussed in detail of the date of article, application method etc.) generates order
" terminal daily record " (for example recite the daily record of terminal equipment type, it may be possible to which mobile phone terminal, tablet computer terminal, computer are whole
End).The master log " payment daily record " of user includes corresponding association will, and such as " daily record of user's payment terminal " (for example recites
The type of payment terminal, it may be possible to mobile phone terminal, tablet computer terminal, computer terminal), " means of payment daily record " (for example record
Account in full payment, payment in due course information etc.).
According to the information recorded in the above incidence relation and each daily record, it is known that the interaction of client and server
Process is:
According to the order request that user submits, corresponding order daily record is generated;
The detailed description information of article described in user's order daily record is obtained, and generates the detailed description day of article described in order
Will;
The information for obtaining the terminal for generating order, generates the terminal daily record of order;
According to the payment request that user submits, generates corresponding user and pay daily record;
The information recorded in daily record is paid according to user, generates means of payment daily record;
User's payment terminal information is obtained, and generates user's payment terminal daily record.
Step S202 utilizes script letter according to the corresponding data exchange process of identified client and server
Number generates corresponding script sentence;
" script " refers to the program that a kind of plain text preserves, and computer script program in general is to determine a series of
Control computer carries out the combination of arithmetic operation action.
After the corresponding data exchange process for determining client and server based on step S201, can by really
The corresponding data exchange process of fixed client and server generates corresponding script sentence using script function.Specifically
Ground can utilize testing tool LoadRunner to generate script sentence.
Step S203, according to corresponding script sentence, generates corresponding process or thread after receiving traffic order;
In general, the program just executed in a computer is called process (Process), without being referred to as program
(Program).So-called thread (Thread) is the basic executable unit in process.
After generating corresponding script sentence based on step S202, the pressure scheduling in pressure test tool LoadRunner
Tool can generate actual process according to the content recorded in script sentence.For example to simulate 100,000 in a test scene
The operation behavior of a user, then pressure generator can be in 100,000 processes of generation or thread, and each process or thread are to corresponding
Script sentence explain and execute.
Step S204 obtains the target capabilities data of Devices to test.
" Devices to test " refers to the target device for needing to detect its runnability, handling mass data ability, such as certain
One server." target capabilities data ", can be the utilization rates of central processing unit, use memory, disk input and output speed
Rate and network throughput.Wherein, the utilization rate of central processing unit refers to the occupied central processing of active program
The ratio of resource in unit.Resource includes arithmetic unit component, arithmetic and logic unit, controller part, posts in central processing unit
Storage component etc..Memory that active program is just occupying is referred to memory.Disk input and output rate refers to unit
The number that disk read-write operates in time.Network throughput refers to the quantity of processing user request in the unit interval.In practice,
The acquisition of target capabilities data can be carried out using Load Runner.
Fig. 4 is that a kind of structure of one embodiment of device generating the daily record for pressure test provided by the present application is shown
It is intended to.Since device embodiment is substantially similar to embodiment of the method, so describing fairly simple, relevant part refers to
The corresponding explanation of the embodiment of the method for above-mentioned offer.Device embodiment described below is only schematical.The application
The degree of offer retries device, including:Master log generation unit 401, association daily record generation unit 402.In the present embodiment, Lord's Day
Will generation unit 401 is configured to be based on existing daily record topological model, generates the master log of preset quantity, each master log
Record has corresponding master log information and master log mark, and there is the master log mark of each master log association to close
System;It is associated with daily record generation unit 402, is configured to each master log characterized according to the daily record topological model and each class
The incidence relation of the association daily record of type, generates the association daily record for being associated with each master log;Wherein, each association log recording has
Corresponding association log information and corresponding association daily record mark, and the association daily record mark of each association daily record with it is associated
Master log master log mark have incidence relation.
Optionally, described device further includes:Resolution unit is configured to according to existing for recording what user respectively operated
Information recorded in each daily record parses the relationship between each daily record;Incidence relation determination unit, be configured to according to each daily record it
Between relationship, determine the master log of preset quantity, respectively between the associated association daily record of each master log, each master log
Incidence relation;The master log is associated with the node that daily record is the topological model, incidence relation, master between the master log
Daily record and the incidence relation being associated between daily record, the connection relation between topological model node;Each incidence relation is logical
The daily record identification record crossed master log, be associated with daily record.
Optionally, the master log generation unit further includes:It is associated with log field and generates subelement, be configured to be based upon
The association log field of each record type it is preset accounting in relevant log field, generate each master log at random
The association log field of each record type of mapped.
Optionally, the master log generation unit further includes:Target dimension table reading subunit is configured to read advance add
The target dimension table of load;Field value selects subelement, is configured to select some or certain optional values in the target dimension table
To in the selectable range of relevant field record, selecting some or certain optional values as institute in the association log information
State the field value of field.
The application also provides a kind of device carrying out pressure test to the daily record generated according to above-mentioned apparatus, including:It hands over
Mutual process determination unit is configured to the incidence relation according to its corresponding association daily record of each master log in each daily record group
And recorded information, determine the corresponding data exchange process of client and server;Script sentence generation unit, matches
It sets for the corresponding data exchange process according to identified client and server, is generated using script function corresponding
Script sentence;Process or thread generation unit are configured to, according to corresponding script sentence, generate corresponding process or thread;
Target capabilities data capture unit is configured to obtain the target capabilities data of Devices to test.
The application also proposes a kind of electronic equipment for generating the daily record for pressure test, since electronic equipment is implemented
Example is substantially similar to embodiment of the method, so describing fairly simple, relevant part, the method for referring to above-mentioned offer is implemented
The corresponding explanation of example.The embodiment of electronic device described below is only schematical.What the application proposed is used to give birth to
At the electronic equipment of the daily record for pressure test, including:Display;Processor;Memory, the journey retried for storing scheduling
Sequence, described program execute following operation when reading execution by the processor:Required amount of daily record group is generated, and every
A daily record group is generated using following manner, is based on existing daily record topological model, is generated the master log of preset quantity, each Lord's Day
Will record has corresponding master log information and master log mark, and the master log mark of each master log has association
Relationship;It is raw according to the incidence relation for being associated with daily record of each master log and each type that the daily record topological model is characterized
At the association daily record for being associated with each master log;Wherein, each association log recording has corresponding association log information and phase
The association daily record mark answered, and the association daily record mark of each association daily record and the master log mark of associated master log have
Incidence relation.
The application also proposes a kind of computer readable storage medium, due to the basic phase of computer readable storage medium embodiment
It is similar to embodiment of the method, so describing fairly simple, relevant part refers to the correspondence of the embodiment of the method for above-mentioned offer
Explanation.The embodiment of calculation as described below machine readable storage medium storing program for executing is only schematical.One kind that the application proposes
Computer readable storage medium is stored thereon with the program for generating the daily record for being used for pressure test, and the program is by processor
When reading execution, following operation is executed:Required amount of daily record group is generated, and each daily record group is generated using following manner,
Based on existing daily record topological model, the master log of preset quantity is generated, each master log record has corresponding master log information
And master log mark, and the master log mark of each master log has incidence relation;According to the daily record Top Modules
The incidence relation for being associated with daily record of each master log that type is characterized and each type generates the association for being associated with each master log
Daily record;Wherein, each association log recording has association log information accordingly and corresponding association daily record mark, and each closes
The association daily record mark for joining daily record and the master log mark of associated master log have incidence relation.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield range should be subject to the range that the application claim defined.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
1, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media
Method or technology realize information storage.Information can be computer-readable instruction, data structure, the module of program or other numbers
According to.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or
Other magnetic storage apparatus or any other non-transmission medium can be used for storage and can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), is such as modulated
Data-signal and carrier wave.
2, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program production
Product.Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It can be used in the computer that one or more wherein includes computer usable program code moreover, the application can be used
The computer program product implemented on storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Form.
Claims (10)
1. a kind of method generating the daily record for pressure test, which is characterized in that generate required amount of daily record group, and every
A daily record group is generated using following manner:
Based on existing daily record topological model, the master log of preset quantity is generated, each master log record has corresponding master log
Information and master log mark, and the master log mark of each master log has incidence relation;
According to the incidence relation for being associated with daily record of each master log and each type that the daily record topological model is characterized, generate
It is associated with the association daily record of each master log;Wherein, each association log recording has corresponding association log information and corresponding
Association daily record mark, and the association daily record mark of each association daily record and the master log mark of associated master log have and close
Connection relationship.
2. the method according to claim 1 for generating the daily record for pressure test, which is characterized in that
The daily record topological model includes the master log of preset quantity, and respectively with some master log associated association day
Will, and the master log has incidence relation each other;The master log, the section that association daily record is the topological model
Point, incidence relation, master log and the incidence relation being associated between daily record between the master log, between topological model node
Connection relation;Each incidence relation passes through master log, the daily record identification record of association daily record.
3. the method according to claim 1 for generating the daily record for pressure test, which is characterized in that
The daily record topological model is generated by executing following steps:
According to the existing information for recording recorded in each daily record that user respectively operates, the relationship between each daily record is parsed;
According to the relationship between each daily record, determine preset quantity master log, respectively with each master log associated association day
Incidence relation between will, each master log;
The master log, the node that association daily record is the topological model, incidence relation, master log between the master log with
The incidence relation being associated between daily record, the connection relation between topological model node;Each incidence relation passes through Lord's Day
Will, the daily record identification record for being associated with daily record.
4. the method according to claim 1 for generating the daily record for pressure test, which is characterized in that each Lord's Day
Association daily record mark and associated master log of the master log mark of will with incidence relation and each association daily record
Master log mark there is incidence relation, the incidence relation therein is specifically, and daily record mark is identical.
5. the method according to claim 4 for generating the daily record for pressure test, which is characterized in that be used for pressure test
Daily record each daily record group daily record have can recognize that for pressure testing data pressure mark knowledge.
6. the method according to claim 1 for generating the daily record for pressure test, which is characterized in that the generation association
In in the association daily record of each master log the step of, the association log field for being based upon each record type is preset related in institute
Join the accounting in log field, generates the association log field of each each record type of master log mapped at random.
7. the method according to claim 6 for generating the daily record for pressure test, which is characterized in that the association daily record
Some or the certain fields with scope limitation recorded in information, which passes through, to be executed following steps and generates:
Read pre-loaded target dimension table;
In the selectable range that the target dimension table records relevant field, select some or certain optional values as institute
State the field value of field described in association log information.
8. the method according to claim 7 for generating the daily record for pressure test, which is characterized in that in the dimension table
The field value of selection meets the probability distribution rule for presetting coefficient of kurtosis.
9. the method according to claim 8 for generating the daily record for pressure test, which is characterized in that in the dimension table
Any one that value includes following categorical data may be selected:Movable ID information data, station address information data.
10. a kind of method that the daily record generated according to claim 1 carries out pressure test, which is characterized in that including:
According to the incidence relation of its corresponding association daily record of each master log in each daily record group and recorded information, really
Determine the corresponding data exchange process of client and server;
According to the corresponding data exchange process of identified client and server, corresponding foot is generated using script function
This sentence;
According to corresponding script sentence, corresponding process or thread are generated;
Obtain the target capabilities data of Devices to test.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810211537.0A CN108572914B (en) | 2018-03-14 | 2018-03-14 | Method and device for generating log for pressure test |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810211537.0A CN108572914B (en) | 2018-03-14 | 2018-03-14 | Method and device for generating log for pressure test |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108572914A true CN108572914A (en) | 2018-09-25 |
CN108572914B CN108572914B (en) | 2020-12-18 |
Family
ID=63574495
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810211537.0A Active CN108572914B (en) | 2018-03-14 | 2018-03-14 | Method and device for generating log for pressure test |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108572914B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110597777A (en) * | 2019-09-18 | 2019-12-20 | 金瓜子科技发展(北京)有限公司 | Log processing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102929936A (en) * | 2012-09-26 | 2013-02-13 | 东软集团股份有限公司 | Log recording method, log inquiring method and system |
CN104346365A (en) * | 2013-07-30 | 2015-02-11 | 阿里巴巴集团控股有限公司 | Device and method for determining specific service associated logs |
CN107704357A (en) * | 2017-08-28 | 2018-02-16 | 北京小度信息科技有限公司 | Daily record generation method and device |
-
2018
- 2018-03-14 CN CN201810211537.0A patent/CN108572914B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102929936A (en) * | 2012-09-26 | 2013-02-13 | 东软集团股份有限公司 | Log recording method, log inquiring method and system |
CN104346365A (en) * | 2013-07-30 | 2015-02-11 | 阿里巴巴集团控股有限公司 | Device and method for determining specific service associated logs |
CN107704357A (en) * | 2017-08-28 | 2018-02-16 | 北京小度信息科技有限公司 | Daily record generation method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110597777A (en) * | 2019-09-18 | 2019-12-20 | 金瓜子科技发展(北京)有限公司 | Log processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108572914B (en) | 2020-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109474578A (en) | Message method of calibration, device, computer equipment and storage medium | |
CN106055464B (en) | Data buffer storage testing schooling pressure device and method | |
CN106484610A (en) | A kind of Beta method and apparatus | |
CN104572122A (en) | Software application data generating device and method | |
CN109309596B (en) | Pressure testing method and device and server | |
CN106327196A (en) | Payment threshold acquisition method and device | |
CN109299178A (en) | A kind of application method and data analysis system | |
CN108536521A (en) | Based on emulation platform offline environment checking method and device | |
CN110929965A (en) | Project risk assessment method and device | |
CN112287352A (en) | Software quality evaluation method, device and storage medium | |
CN107665463A (en) | Method for processing resource, device, storage medium and the computer equipment of investment product | |
CN110069376A (en) | Several method, apparatus, storage medium and computer equipment are made in a kind of association | |
CN111401722B (en) | Intelligent decision method and intelligent decision system | |
CN106408319A (en) | Distribution data management system and method | |
CN106227662B (en) | A kind of smart television application audit test macro and method | |
CN114240177A (en) | Government affair data quality assessment method and system | |
CN114511235A (en) | Process evaluation method and system | |
CN110362630A (en) | Data managing method, device, equipment and computer readable storage medium | |
CN108572914A (en) | A kind of method and device generating the daily record for pressure test | |
KR102160379B1 (en) | Testing method for decentralized application based on blockchain and testing apparatus | |
CN108389104B (en) | Simulation verification method and device for network activities | |
CN116069577A (en) | Interface testing method, equipment and medium for RPC service | |
CN112799951B (en) | Method and equipment for generating automatic test case for charging system | |
CN115037663A (en) | Application system update test method and device | |
CN111274138B (en) | Method and device for testing account merging function |
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 |