CN108829802A - It is associated with log back method and device - Google Patents

It is associated with log back method and device Download PDF

Info

Publication number
CN108829802A
CN108829802A CN201810574029.9A CN201810574029A CN108829802A CN 108829802 A CN108829802 A CN 108829802A CN 201810574029 A CN201810574029 A CN 201810574029A CN 108829802 A CN108829802 A CN 108829802A
Authority
CN
China
Prior art keywords
log
press machine
threads
group
business
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810574029.9A
Other languages
Chinese (zh)
Other versions
CN108829802B (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.)
PEOPLE'S BANK OF CHINA NATIONAL CLEARING CENTER
Original Assignee
PEOPLE'S BANK OF CHINA NATIONAL CLEARING CENTER
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 PEOPLE'S BANK OF CHINA NATIONAL CLEARING CENTER filed Critical PEOPLE'S BANK OF CHINA NATIONAL CLEARING CENTER
Priority to CN201810574029.9A priority Critical patent/CN108829802B/en
Publication of CN108829802A publication Critical patent/CN108829802A/en
Application granted granted Critical
Publication of CN108829802B publication Critical patent/CN108829802B/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/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3495Performance evaluation by tracing or monitoring for systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of association log back method and device, which includes:Application class and business association will be carried out using log, and application sorted every will sequentially be stored using log according to business association relationship, and the business association relationship includes:Latter business becomes dependent upon in the completion of previous business;It by the application log cutting sequentially stored is multiple groups log according to the quantity of press machine and the sets of threads quantity of each press machine, and by every group of log transmission after cutting to corresponding press machine;It controls the per thread in the sets of threads of press machine and is successively read one barrel of log in corresponding log group, and log transmission is carried out with the transmission speed of setting, to meet test throughput demands;When the transmission speed is restricted, increases press machine quantity, log group number and sets of threads number, carry out the linear expansion of handling capacity.Using the present invention, it can rapidly, high-throughput be associated the playback of log.

Description

It is associated with log back method and device
Technical field
The present invention relates to log playback technology fields, especially with regard to a kind of association log back method and device.
Background technique
It is computer by extracting using journal file to test environment progress playback operation for computer system production environment A kind of important test method of system.There are two types of existing log playback technologies:
1) log plays back one by one, i.e., reads and be sent to the operation system of test environment one by one.But due to being between business Interrelated or complementary, simply playback technology does not judge the association between them, the processing of operation system one by one Success rate is very low, cannot play good test effect.
2) business association in log replayed section is completed using data base querying technology.The technology will need to be played back day Will deposits in database, and the first stroke log playback (transmission) in associated services is extremely tested to the operation system of environment first, when After above-mentioned operation system is handled and returned the result, second of associated services is inquired in the database according to above-mentioned return the result Log, and above-mentioned second log is played back into the operation system that (transmission) extremely tests environment, and so on, complete institute's relevant day The playback of will.But in this technology, business association operation depend on database real-time query, when need with high throughput into When row log plays back, database becomes the bottleneck of entire test environment.Therefore this technology is not suitable for the log of high-throughput Playback is not suitable for being tested for the property using log playback mode.
Summary of the invention
The embodiment of the invention provides a kind of association log back method and devices, rapidly, high-throughput to carry out It is associated with the playback of log.
To achieve the goals above, the embodiment of the invention provides a kind of association log back method, which is returned The method of putting includes:
Application class and business association will be carried out using log, and according to business association relationship to using sorted every It is sequentially stored using log, the business association relationship includes:Latter business becomes dependent upon in previous business It completes;
It by the application log cutting sequentially stored is more according to the quantity of press machine and the sets of threads quantity of each press machine Group log, and by every group of log transmission after cutting to corresponding press machine;
It controls the per thread in the sets of threads of press machine and is successively read one barrel of log in corresponding log group, and with setting Transmission speed carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increase press machine quantity, log group number and sets of threads number, carries out handling capacity Linear expansion.
In one embodiment, application class and business association will be carried out using log, and according to business association relationship to application Sorted every is sequentially stored using log, including:
The application log is divided into multiclass according to type of service;
It is associated in classification where aiming at day to every application in every class application log, obtains this using log Association log;
This business and associated services are sequentially stored classifiedly in different buckets according to the business association relationship.
In one embodiment, if the quantity of the press machine is N, the sets of threads quantity of each press machine is M;According to press machine Quantity and the sets of threads quantity of each press machine by the application log cutting sequentially stored be multiple groups log, and will be after cutting Every group of log transmission to corresponding press machine, including:
Log cutting will be applied for N in each bucket according to the sets of threads quantity N of the quantity M of press machine and each press machine × M group, and serial number is distinguished into each grouping;
It is a log group that identical packet assembling will be numbered in different buckets, and all log groups are transmitted to corresponding pressure Machine is played back by corresponding sets of threads, the corresponding sets of threads of each log group.
In one embodiment, one barrel of day that the per thread in the sets of threads of press machine is successively read in corresponding log group is controlled Will, and log transmission is carried out with the transmission speed of setting, including:
P thread is configured for per thread group, P is the barrelage of every class application log;
P thread of control successively starts to read P barrels of logs at set time intervals, and with the progress of the transmission speed of setting Log is sent.
To achieve the goals above, the embodiment of the present invention provides a kind of association log playback reproducer, including:
Log storage unit, for application class and business association will to be carried out using log, and according to business association relationship Application sorted every is sequentially stored using log, the business association relationship includes:The beginning of latter business Completion dependent on previous business;
Log cutting unit, for will sequentially be stored according to the sets of threads quantity of the quantity of press machine and each press machine It is multiple groups log using log cutting, and by every group of log transmission after cutting to corresponding press machine;
Log transmission unit, the per thread in sets of threads for controlling press machine are successively read in corresponding log group One barrel of log, and log transmission is carried out with the transmission speed of setting, to meet test throughput demands;
Linear expansion unit, for increasing press machine quantity, log group number and line when the transmission speed is restricted Journey group number, carries out the linear expansion of handling capacity.
In one embodiment, the log storage unit includes:
Categorization module, for the application log to be divided into multiclass according to type of service;
Relating module is obtained for being associated in the classification where aiming at day to every application in every class application log To the association log of this application log;
Storage module, for sequentially being stored classifiedly this business and associated services not according to the business association relationship In same bucket.
In one embodiment, the log cutting unit includes:
Cutting module, for according to the sets of threads quantity N of the quantity M of press machine and each press machine by answering in each bucket It is N × M group with log cutting, and serial number is distinguished into each grouping;
Log group generation module is a log group for will number identical packet assembling in different buckets, by all days Will group is transmitted to corresponding pressure machine, is played back by corresponding sets of threads, the corresponding sets of threads of each log group.
In one embodiment, the log transmission unit includes:
Configuration module, for configuring P thread for per thread group, P is the barrelage of every class application log;
Sending module successively starts to read P barrels of logs at set time intervals for controlling P thread, and with setting Transmission speed carry out log transmission.
To achieve the goals above, the embodiment of the invention also provides a kind of computer equipments, including memory, processor And the computer program that can be run on a memory and on a processor is stored, when the processor executes the computer program Realize following steps:
Application class and business association will be carried out using log, and according to business association relationship to using sorted every It is sequentially stored using log, the business association relationship includes:Latter business becomes dependent upon in previous business It completes;
It by the application log cutting sequentially stored is more according to the quantity of press machine and the sets of threads quantity of each press machine Group log, and by every group of log transmission after cutting to corresponding press machine;
It controls the per thread in the sets of threads of press machine and is successively read one barrel of log in corresponding log group, and with setting Transmission speed carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increase press machine quantity, log group number and sets of threads number, carries out handling capacity Linear expansion.
To achieve the goals above, it the embodiment of the invention also provides a kind of computer readable storage medium, stores thereon There is computer program, the computer program realizes following steps when being executed by processor:
Application class and business association will be carried out using log, and according to business association relationship to using sorted every It is sequentially stored using log, the business association relationship includes:Latter business becomes dependent upon in previous business It completes;
It by the application log cutting sequentially stored is more according to the quantity of press machine and the sets of threads quantity of each press machine Group log, and by every group of log transmission after cutting to corresponding press machine;
It controls the per thread in the sets of threads of press machine and is successively read one barrel of log in corresponding log group, and with setting Transmission speed carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increase press machine quantity, log group number and sets of threads number, carries out handling capacity Linear expansion.
Using the present invention, it can rapidly, high-throughput be associated the playback of log, and can be arbitrarily designated and handle up Amount carries out log playback.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the association log back method flow chart one of the embodiment of the present invention;
Fig. 2 is the association log back method flowchart 2 of the embodiment of the present invention;
Fig. 3 is the association log classification schematic diagram of the embodiment of the present invention;
Fig. 4 is the association log back method flow chart 3 of the embodiment of the present invention;
Fig. 5 is the association log cutting schematic diagram of the embodiment of the present invention;
Fig. 6 is the association log back method flow chart four of the embodiment of the present invention;
Fig. 7 is that the log of the embodiment of the present invention specifically sends schematic diagram;
Fig. 8 is the structural block diagram of the association log playback reproducer of the embodiment of the present invention;
Fig. 9 is the structural block diagram of the log storage unit of the embodiment of the present invention;
Figure 10 is the structural block diagram of the log cutting unit of the embodiment of the present invention;
Figure 11 is the structural block diagram of the log transmission unit of the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is the association log back method flow chart of the embodiment of the present invention, which can be based on The association log matched in advance.As shown in Figure 1, the association log back method includes:
S101:To carry out application class and business association using log, and according to business association relationship to application class after Every sequentially stored using log, the business association relationship includes:Latter business becomes dependent upon in previous pen The completion of business, i.e., before there are dependences between the late two strokes business;
S102:Log cutting is applied by what is sequentially stored according to the quantity of press machine and the sets of threads quantity of each press machine For multiple groups log, and by every group of log transmission after cutting to corresponding press machine;
S103:The per thread controlled in the sets of threads of press machine is successively read one barrel of log in corresponding log group, and Log transmission is carried out with the transmission speed of setting, to meet test throughput demands;
S104:When the transmission speed is restricted, increase press machine quantity, log group number and sets of threads number, carries out The linear expansion of handling capacity.
The executing subject of method shown in FIG. 1 can be background server, such as the PC machine for environmental testing, PC service Device, minicomputer etc..
Process as shown in Figure 1 it is found that the application will carry out application class and business association using log first, and according to Business association relationship sequentially stores application sorted every using log, then according to the quantity of press machine and each The application log cutting sequentially stored is multiple groups log by the sets of threads quantity of press machine, and by every group of log transmission after cutting To corresponding press machine;The per thread finally controlled in the sets of threads of press machine is successively read one barrel of day in corresponding log group Will, and log transmission is carried out with the transmission speed of setting, to meet test throughput demands;When transmission speed is restricted, Press machine quantity, log group number and sets of threads number can be increased, carry out the linear expansion of handling capacity.In this way, can be fast Fast ground is associated to high-throughput the playback of log, and can be arbitrarily designated handling capacity and carry out log playback.
In the present invention application log can for computer system production environment it is relevant apply log, the present invention need by This is extracted using log into test environment (tested operation system).
In order to carry out operational trials, needs that business association will be carried out using log, there is the associated log of service logic, Referred to as it is associated with log.
Before environmental testing, needing to store association log again, storage can be stored according to setting rule, In one embodiment, association log can be stored classifiedly according to type (such as type of service), when it is implemented, such as Fig. 2 institute Show, may include steps of:
S201:The application log is divided into multiclass according to type of service;
S202:It is associated in classification where aiming at day to every application in every class application log, obtains the pen and answer With the association log of log;
S203:This business and associated services are sequentially stored classifiedly in different buckets according to the business association relationship In.
For example, as shown in Figure 3, it is assumed that log will be associated with according to type and be divided into three classes association log, the first kind is closed Join every 2 logs of log and form incidence relation, the second class is associated with every 3 logs of log and forms incidence relation, and third class is associated with day Every 4 logs of will form incidence relation.Business association relationship of the present invention includes following situation:The beginning of latter business Dependent on needing at least two subservices, two subservices in the completion of previous business, such as a money transfer transactions of transferring accounts In latter subservice become dependent upon in the completion of previous subservice.
When sequentially storage is using log, the log that the first stroke logical relation is forward in first kind association log and storage are searched To bucket 1, the association log of the log is searched according to business association relationship, and the association log of the log is stored to bucket 2;Continue It searches the forward log of second logical relation in first kind association log and stores to bucket 1, searched according to business association relationship The association log of the log, and the association log is stored to bucket 2;And so on, complete depositing for all first kind association logs It puts.
It searches the log that the first stroke logical relation is forward in the association log of the second class to store to bucket 3, be closed according to business association Two association logs of the log are searched by system, and logically precedence relationship is stored respectively to bucket 4, bucket 5;Continue to search the second class pass Join the log that second logical relation is forward in log and store to bucket 3, two association logs of the log respectively, are sequentially deposited It puts to bucket 4, bucket 5;And so on, complete the storage of all second class association logs.
It searches the log that the first stroke logical relation is forward in the association log of third class to store to bucket 6, be closed according to business association Three association logs of the log are searched by system, and logically precedence relationship is stored respectively to bucket 7, bucket 8, bucket 9;And so on, it is complete At the storage of all third classes association log.
After log is stored into bucket, so that it may to log carry out cutting, cutting method can there are many, the present invention it is unlimited Fixed specific cutting method.
When specific cutting application log, it can be assumed that the quantity of press machine is N, and the sets of threads number of each press machine is M, such as Shown in Fig. 4, cutting method be may include steps of:
S401:Log will be applied to cut in each bucket according to the sets of threads quantity N of the quantity M of press machine and each press machine It is divided into N × M group, and serial number is distinguished into each grouping.
By taking the cutting of the 2nd class log in Fig. 3 as an example (cutting of the log of other classes by the same way), such as Fig. 5 institute Show, it is assumed that M=2, N=2, by the 3rd barrel, the 4th barrel and the 5th barrel it is corresponding using log respectively according to the quantity of press machine 2 and 2 cutting of sets of threads quantity of each press machine is 2 × 2 groups, that is, the 3rd barrel of cutting is 3-1,3-2,3-3 and 3-2 × 2, and the 4th barrel is cut It is divided into 4-1,4-2,4-3 and 4-2 × 2, the 5th barrel of cutting is 5-1,5-2,5-3 and 5-2 × 2.
S402:It is a log group that identical packet assembling will be numbered in different buckets, and all log groups are transmitted to correspondence Press machine is played back by corresponding sets of threads, the corresponding sets of threads of each log group.As shown in figure 5, the 3rd barrel of 3-1, 4th barrel of 4-1 and the 5th barrel of 5-1 is to be identically numbered, and three's group is combined into a log group, other log fragments are according to phase Same method combines to obtain log group, totally 2 × 2=4 log group.Log group after cutting is averagely distributed to 2 press machines, example Such as, 3-1,4-1,5-1 and 3-3,4-3,5-3 are stored to press machine 1,3-2,4-2,5-2 and 3-4,4-4,5-4 is stored to pressure Power machine 2.
After log is carried out cutting, group merging storage into press machine, so that it may be successively read in corresponding log group Each barrel of association log is carried out log transmission (being sent in test environment) with setting transmission speed, in an embodiment, such as Fig. 6 institute Show, log sending method includes the following steps:
S601:P thread is configured for per thread group, P is the barrelage of every class application log;
The number of P is to correspond to the number of bucket in class association log, in example shown in fig. 5, since the second class is associated with log The number of middle bucket is 3, then needing to configure 3 threads in per thread group.
S602:P thread of control successively starts to read P barrels of logs at set time intervals, and with the transmission of setting speed Degree carries out log transmission.
For example, first control thread 1 read bucket 3 log fragment 3-1, and with each second 100 speed to test environment Persistently send 1 hour, after separated in time (such as 15 seconds, which is not intended to limit, specifically by operation system root Flexibly determining according to processing speed) control thread 2 reads the log fragment 4-1 of bucket 4, and with 100 speed each second to test Environment is persistently sent 1 hour, and thread 3 is controlled after separated in time and reads and sends the log fragment 5-1 in bucket 5, with this Analogize, as shown in Figure 7.
In log transmission process, whether can reach bottleneck with real-time judge log transmission speed, i.e., whether be restricted, when When the transmission speed is restricted, handling capacity can be carried out by increasing press machine quantity, log group number and sets of threads quantity Linear expansion.It may be many reasons that whether log transmission speed, which is restricted, such as certain class resource bottleneck is (for example, CPU is provided Source deficiency, magnetic disc i/o scarce capacity, Thread Count are insufficient) it may cause limited speed, it is fixed that invention is not limited thereto.
Using the present invention, in the case of having solved business association, traditional logs back method cannot reach enough handling capacities The problem of to be tested for the property, can rapidly, high-throughput be associated the playback of log, and can specify and arbitrarily gulp down The amount of spitting carries out log playback.
Based on the same inventive concept, the embodiment of the present application also provides a kind of association log playback reproducer, it can be used for reality Method described in existing above-described embodiment, as described in the following examples.The original solved the problems, such as due to association log playback reproducer Reason be associated with that log back method is similar, therefore the implementation of association log playback reproducer may refer to be associated with log back method Implement, overlaps will not be repeated.Used below, the software of predetermined function may be implemented in term " unit " or " module " And/or the combination of hardware.Although system described in following embodiment is preferably realized with software, hardware or soft The realization of the combination of part and hardware is also that may and be contemplated.
Fig. 8 is the structural block diagram of the association log playback reproducer of the embodiment of the present invention, as shown in figure 8, the association log is returned Putting device includes:
Log storage unit 801 for that will carry out application class and business association using log, and is closed according to business association System sequentially stores application sorted every using log, and the business association relationship includes:Latter business is opened The completion begun dependent on previous business;
Log cutting unit 802, for will sequentially be deposited according to the quantity of press machine and the sets of threads quantity of each press machine The application log cutting put is multiple groups log, and by every group of log transmission after cutting to corresponding press machine;
Log transmission unit 803, the per thread in sets of threads for controlling press machine are successively read corresponding log group In one barrel of log, and with the transmission speed of setting carry out log transmission, to meet test throughput demands;
Linear expansion unit 804, for increasing press machine quantity, log group number when the transmission speed is restricted And sets of threads number, carry out the linear expansion of handling capacity.
In one embodiment, as shown in figure 9, log storage unit 801 includes:
Categorization module 901, for the application log to be divided into multiclass according to type of service;
Relating module 902, for being associated in the classification where aiming at day to every application in every class application log, Obtain the association log of this application log;
Storage module 903, for sequentially being stored classifiedly this business and associated services according to the business association relationship In different buckets.
In one embodiment, as shown in Figure 10, log cutting unit 803 includes:
Cutting module 1001, for will be in each bucket according to the quantity M of press machine and the sets of threads quantity N of each press machine Application log cutting be N × M group, and by each grouping distinguish serial number;
Log group generation module 1002 is a log group for will number identical packet assembling in different buckets, by institute There is log group to be transmitted to corresponding pressure machine, is played back by corresponding sets of threads, the corresponding sets of threads of each log group.
In one embodiment, as shown in figure 11, log transmission unit 804 includes:
Configuration module 1101, for configuring P thread for per thread group, P is the barrelage of every class application log;
Sending module 1102, for control P thread at set time intervals successively start read P barrels of logs, and with The transmission speed of setting carries out log transmission.
Using the present invention, in the case of having solved business association, traditional logs back method cannot reach enough handling capacities The problem of to be tested for the property, can rapidly, high-throughput be associated the playback of log, and can be arbitrarily designated and gulp down The amount of spitting carries out log playback.
The embodiment of the invention also provides a kind of computer equipment, the principle that is solved the problems, such as due to computer equipment be associated with Log back method is similar, therefore the implementation of computer equipment may refer to the implementation of association log back method, repeats place It repeats no more.Computer equipment include memory, processor and storage on a memory and the calculating that can run on a processor Machine program, the processor realize following steps when executing the computer program:
Application class and business association will be carried out using log, and according to business association relationship to using sorted every It is sequentially stored using log, the business association relationship includes:Latter business becomes dependent upon in previous business It completes;
It by the application log cutting sequentially stored is more according to the quantity of press machine and the sets of threads quantity of each press machine Group log, and by every group of log transmission after cutting to corresponding press machine;
It controls the per thread in the sets of threads of press machine and is successively read one barrel of log in corresponding log group, and with setting Transmission speed carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increase press machine quantity, log group number and sets of threads number, carries out handling capacity Linear expansion.
Using the present invention, in the case of having solved business association, traditional logs back method cannot reach enough handling capacities The problem of to be tested for the property, can rapidly, high-throughput be associated the playback of log, and can be arbitrarily designated and gulp down The amount of spitting carries out log playback.
The embodiment of the invention also provides a kind of computer readable storage mediums, since computer readable storage medium solves The principle of problem be associated with that log back method is similar, therefore the implementation of computer readable storage medium may refer to association log The implementation of back method, overlaps will not be repeated.Computer program, the calculating are stored on computer readable storage medium Machine program realizes following steps when being executed by processor:
Application class and business association will be carried out using log, and according to business association relationship to using sorted every It is sequentially stored using log, the business association relationship includes:Latter business becomes dependent upon in previous business It completes;
It by the application log cutting sequentially stored is more according to the quantity of press machine and the sets of threads quantity of each press machine Group log, and by every group of log transmission after cutting to corresponding press machine;
It controls the per thread in the sets of threads of press machine and is successively read one barrel of log in corresponding log group, and with setting Transmission speed carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increase press machine quantity, log group number and sets of threads number, carries out handling capacity Linear expansion.
Using the present invention, in the case of having solved business association, traditional logs back method cannot reach enough handling capacities The problem of to be tested for the property, can rapidly, high-throughput be associated the playback of log, and can be arbitrarily designated and gulp down The amount of spitting carries out log playback.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Specific embodiment is applied in the present invention, and principle and implementation of the present invention are described, above embodiments Explanation be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, According to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion in this specification Appearance should not be construed as limiting the invention.

Claims (10)

1. a kind of association log back method, which is characterized in that including:
Application class and business association will be carried out using log, and according to business association relationship to sorted every application of application Log is sequentially stored, and the business association relationship includes:Latter business becomes dependent upon in the completion of previous business;
Apply log cutting for multiple groups day for what is sequentially stored according to the quantity of press machine and the sets of threads quantity of each press machine Will, and by every group of log transmission after cutting to corresponding press machine;
The per thread controlled in the sets of threads of press machine is successively read one barrel of log in corresponding log group, and with the hair of setting Speed is sent to carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increases press machine quantity, log group number and sets of threads number, carry out the line of handling capacity Property extension.
2. association log back method according to claim 1, which is characterized in that will using log carry out application class and Business association, and application sorted every is sequentially stored using log according to business association relationship, including:
The application log is divided into multiclass according to type of service;
It is associated in classification where aiming at day to every application in every class application log, obtains the pass of this application log Join log;
This business and associated services are sequentially stored classifiedly in different buckets according to the business association relationship.
3. association log back method according to claim 2, which is characterized in that set the quantity of the press machine as N, often The sets of threads quantity of a press machine is M;It will sequentially be stored according to the quantity of press machine and the sets of threads quantity of each press machine It is multiple groups log using log cutting, and by every group of log transmission after cutting to corresponding press machine, including:
Log cutting will be applied for N × M in each bucket according to the sets of threads quantity N of the quantity M of press machine and each press machine Group, and serial number is distinguished into each grouping;
It is a log group that identical packet assembling will be numbered in different buckets, and all log groups are transmitted to corresponding pressure machine, by Corresponding sets of threads is played back, the corresponding sets of threads of each log group.
4. association log back method according to claim 3, which is characterized in that control every in the sets of threads of press machine A thread is successively read one barrel of log in corresponding log group, and carries out log transmission with the transmission speed of setting, including:
P thread is configured for per thread group, P is the barrelage of every class application log;
P thread of control successively starts to read P barrels of logs at set time intervals, and carries out log with the transmission speed of setting It sends.
5. a kind of association log playback reproducer, which is characterized in that including:
Log storage unit, for application class and business association will to be carried out using log, and it is corresponding according to business association relationship It is sequentially stored with sorted every using log, the business association relationship includes:Latter business becomes dependent upon In the completion of previous business;
Log cutting unit, the application for will sequentially be stored according to the quantity of press machine and the sets of threads quantity of each press machine Log cutting is multiple groups log, and by every group of log transmission after cutting to corresponding press machine;
Log transmission unit, the per thread in sets of threads for controlling press machine are successively read one barrel in corresponding log group Log, and log transmission is carried out with the transmission speed of setting, to meet test throughput demands;
Linear expansion unit, for increasing press machine quantity, log group number and sets of threads when the transmission speed is restricted Number, carries out the linear expansion of handling capacity.
6. association log playback reproducer according to claim 5, which is characterized in that the log storage unit includes:
Categorization module, for the application log to be divided into multiclass according to type of service;
Relating module is somebody's turn to do for being associated in the classification where aiming at day to every application in every class application log Pen applies the association log of log;
Storage module, for sequentially being stored classifiedly this business and associated services different according to the business association relationship In bucket.
7. association log playback reproducer according to claim 6, which is characterized in that the log cutting unit includes:
Cutting module, for according to the quantity M of press machine and the sets of threads quantity N of each press machine day will to be applied in each bucket Will cutting is N × M group, and serial number is distinguished in each grouping;
Log group generation module is a log group for will number identical packet assembling in different buckets, by all log groups It is transmitted to corresponding pressure machine, is played back by corresponding sets of threads, the corresponding sets of threads of each log group.
8. association log playback reproducer according to claim 7, which is characterized in that the log transmission unit includes:
Configuration module, for configuring P thread for per thread group, P is the barrelage of every class application log;
Sending module successively starts to read P barrels of logs at set time intervals for controlling P thread, and with the hair of setting Speed is sent to carry out log transmission.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes following steps when executing the computer program:
Application class and business association will be carried out using log, and according to business association relationship to sorted every application of application Log is sequentially stored, and the business association relationship includes:Latter business becomes dependent upon in the completion of previous business;
Apply log cutting for multiple groups day for what is sequentially stored according to the quantity of press machine and the sets of threads quantity of each press machine Will, and by every group of log transmission after cutting to corresponding press machine;
The per thread controlled in the sets of threads of press machine is successively read one barrel of log in corresponding log group, and with the hair of setting Speed is sent to carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increases press machine quantity, log group number and sets of threads number, carry out the line of handling capacity Property extension.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program Following steps are realized when being executed by processor:
Application class and business association will be carried out using log, and according to business association relationship to sorted every application of application Log is sequentially stored, and the business association relationship includes:Latter business becomes dependent upon in the completion of previous business;
Apply log cutting for multiple groups day for what is sequentially stored according to the quantity of press machine and the sets of threads quantity of each press machine Will, and by every group of log transmission after cutting to corresponding press machine;
The per thread controlled in the sets of threads of press machine is successively read one barrel of log in corresponding log group, and with the hair of setting Speed is sent to carry out log transmission, to meet test throughput demands;
When the transmission speed is restricted, increases press machine quantity, log group number and sets of threads number, carry out the line of handling capacity Property extension.
CN201810574029.9A 2018-06-06 2018-06-06 Associated log playback method and device Active CN108829802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810574029.9A CN108829802B (en) 2018-06-06 2018-06-06 Associated log playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810574029.9A CN108829802B (en) 2018-06-06 2018-06-06 Associated log playback method and device

Publications (2)

Publication Number Publication Date
CN108829802A true CN108829802A (en) 2018-11-16
CN108829802B CN108829802B (en) 2020-11-13

Family

ID=64144416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810574029.9A Active CN108829802B (en) 2018-06-06 2018-06-06 Associated log playback method and device

Country Status (1)

Country Link
CN (1) CN108829802B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597725A (en) * 2019-09-19 2019-12-20 浙江诺诺网络科技有限公司 Mysql simulation return method, device and equipment
CN111858200A (en) * 2020-06-22 2020-10-30 银清科技有限公司 Throughput control method and device in system test and electronic equipment
CN112559333A (en) * 2020-12-10 2021-03-26 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN113419972A (en) * 2021-08-25 2021-09-21 成方金融科技有限公司 Throughput control method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102036054A (en) * 2010-10-19 2011-04-27 北京硅盾安全技术有限公司 Intelligent video monitoring system based on three-dimensional virtual scene
CN103176888A (en) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 Log recording method and log recording system
CN106897281A (en) * 2015-12-17 2017-06-27 阿里巴巴集团控股有限公司 A kind of daily record sharding method and device
CN107301197A (en) * 2017-05-12 2017-10-27 上海瀚银信息技术有限公司 A kind of business datum tracking processing system and method
CN107608901A (en) * 2017-10-20 2018-01-19 北京京东金融科技控股有限公司 Method of testing and device based on Jmteter, storage medium, electronic equipment
US20180068233A1 (en) * 2016-03-24 2018-03-08 Accenture Global Solutions Limited Self-learning log classification system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102036054A (en) * 2010-10-19 2011-04-27 北京硅盾安全技术有限公司 Intelligent video monitoring system based on three-dimensional virtual scene
CN103176888A (en) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 Log recording method and log recording system
CN106897281A (en) * 2015-12-17 2017-06-27 阿里巴巴集团控股有限公司 A kind of daily record sharding method and device
US20180068233A1 (en) * 2016-03-24 2018-03-08 Accenture Global Solutions Limited Self-learning log classification system
CN107301197A (en) * 2017-05-12 2017-10-27 上海瀚银信息技术有限公司 A kind of business datum tracking processing system and method
CN107608901A (en) * 2017-10-20 2018-01-19 北京京东金融科技控股有限公司 Method of testing and device based on Jmteter, storage medium, electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
詹玲等: "分布式I/O日志回放系统的设计与实现", 《计算机工程与应用》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110597725A (en) * 2019-09-19 2019-12-20 浙江诺诺网络科技有限公司 Mysql simulation return method, device and equipment
CN111858200A (en) * 2020-06-22 2020-10-30 银清科技有限公司 Throughput control method and device in system test and electronic equipment
CN111858200B (en) * 2020-06-22 2023-10-20 银清科技有限公司 Throughput control method and device in system test and electronic equipment
CN112559333A (en) * 2020-12-10 2021-03-26 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN113419972A (en) * 2021-08-25 2021-09-21 成方金融科技有限公司 Throughput control method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN108829802B (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN108829802A (en) It is associated with log back method and device
CN109639521B (en) Block chain performance testing method, device, equipment and storage medium
Kolda et al. Counting triangles in massive graphs with MapReduce
CN103370691B (en) Managing buffer overflow conditions
CN110737664A (en) block link point synchronization method and device
CN110457123A (en) A kind of control method and device of block processes task
CN107391735A (en) Business datum source tracing method, device, system and storage device based on block chain
CN102968498A (en) Method and device for processing data
CN104520814A (en) System and method for configuring cloud computing systems
CN104572122A (en) Software application data generating device and method
CN110019135A (en) It is a kind of to migrate relational data to the method and device of HBase database
CN106201623B (en) Game resource file loading method and system based on access order sequence
CN104111888A (en) Code evaluation method, device and system for teaching
CN109064325A (en) A kind of intelligent contract implementation method and device based on block chain
US7653452B2 (en) Methods and computer systems for reducing runtimes in material requirements planning
CN108415912A (en) Data processing method based on MapReduce model and equipment
CN114328217A (en) Application testing method, device, equipment, medium and computer program product
CN111190814B (en) Method and device for generating software test case, storage medium and terminal
Fang et al. Integrating workload balancing and fault tolerance in distributed stream processing system
CN110532021A (en) The processing method and processing device of the configuration file of dcs
CN109634714A (en) A kind of method and device of intelligent scheduling
CN103136032B (en) A kind of parallel simulation system for multi-core system
CN116974765A (en) Storage management system of heterogeneous computer
CN110505276A (en) Object matching method, apparatus and system, electronic equipment and storage medium
CN111651262B (en) Batch task generation method and device

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