CN109002385A - Method for testing pressure and device for data flow system - Google Patents

Method for testing pressure and device for data flow system Download PDF

Info

Publication number
CN109002385A
CN109002385A CN201710425004.8A CN201710425004A CN109002385A CN 109002385 A CN109002385 A CN 109002385A CN 201710425004 A CN201710425004 A CN 201710425004A CN 109002385 A CN109002385 A CN 109002385A
Authority
CN
China
Prior art keywords
data
data stream
pressure
data flow
processing node
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.)
Pending
Application number
CN201710425004.8A
Other languages
Chinese (zh)
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710425004.8A priority Critical patent/CN109002385A/en
Publication of CN109002385A publication Critical patent/CN109002385A/en
Pending legal-status Critical Current

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/3409Recording 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 for performance assessment

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 And Data Communications (AREA)

Abstract

This application discloses the method for testing pressure and device for data flow system.One specific embodiment of this method includes: to parse to data flow to be processed in response to receiving pressure test instruction, generate pressure testing data stream;The pending data stream and the pressure testing data stream are input to data flow system from the Data Stream Processing node as entrance;It periodically determines that the data flow system handles the delay time of the data in inputted data flow, and based on identified delay time, determines whether pressure test passes through.This embodiment improves the flexibilities of pressure test.

Description

Method for testing pressure and device for data flow system
Technical field
This application involves field of computer technology, and in particular to Internet technical field, more particularly, to data flow system The method for testing pressure and device of system.
Background technique
Pressure test (Stress Test) refers to hardware environment and user's use process by simulating practical application System loading, for a long time or super large load run test software, to test the performance, reliability, stability of system under test (SUT) Deng.
With the development of internet technology, data handle in the way of streaming computing more and more common.In general, Before streaming computing task is online, need to carry out pressure test to it.However, existing mode needs that system is made to stop processing number After overstocking to a certain extent according to, pending data, then make system processes data, to realize pressure test.This mode can not be on line Task carries out pressure test, thus there is a problem that flexibility is lower.
Summary of the invention
The purpose of the embodiment of the present application is to propose a kind of improved method for testing pressure and dress for data flow system It sets, to solve the technical issues of background section above is mentioned.
In a first aspect, the embodiment of the present application provides a kind of method for testing pressure for data flow system, data flow system System includes the Data Stream Processing node set for being handled data stream, and data flow is from Data Stream Processing node set , as entrance Data Stream Processing node flow into and flowing through at least one data flow in Data Stream Processing node set Reason node after flow out data flow system, this method comprises: in response to receive pressure test instruction, to data flow to be processed into Row parsing, generates pressure testing data stream;By pending data stream and pressure testing data stream from the data flow as entrance Reason node is input to data flow system;Periodically determine that data flow system handles the delay of the data in inputted data flow Time, and based on identified delay time, determine whether pressure test passes through.
In some embodiments, in response to receiving pressure test instruction, data flow to be processed is parsed, pressure is generated Power test data flow, comprising: in response to receiving pressure test instruction, extract to be processed with each of pending data stream The attribute information that data match, wherein attribute information includes date, client identification and user identifier;Based on extracted Attribute information generates pressure testing data stream.
In some embodiments, it is based on extracted attribute information, generates pressure testing data stream, comprising: for wait locate Each of data flow pending data is managed, the extracted attribute information to match with the pending data is carried out multiple Change take generation quantity as the pressure testing data of the first preset quantity, and pressure testing data generated is summarized for pressure Power test data flow.
In some embodiments, it is based on extracted attribute information, generates pressure testing data stream, comprising: is determined wait locate The quantity of pending data in reason data flow, in preset duration determines second using identified quantity as the first quantity The difference of preset quantity and the first quantity;The ratio of difference and the first quantity is determined as the second quantity, for pending data Each of stream pending data, repeatedly changes the extracted attribute information to match with the pending data, Take generation quantity as the pressure testing data of the second quantity, and pressure testing data generated is summarized for pressure testing data Stream.
In some embodiments, as the first Data Stream Processing section that the Data Stream Processing node of entrance includes as entrance Point and the second Data Stream Processing node;And by pending data stream and pressure testing data stream from the data flow as entrance Reason node is input to data flow system, comprising: pending data stream is input to data flow system from the first Data Stream Processing node System, and pressure testing data stream is input to data flow system from the second Data Stream Processing node.
In some embodiments, based on identified delay time, determine whether pressure test passes through, comprising: in response to It determines that delay time is less than predetermined time delay threshold value, determines that pressure test passes through;In response to determining delay time not less than pre- If delay time threshold value determines that pressure test does not pass through.
Second aspect, the embodiment of the present application provide a kind of pressure test device for data flow system, data flow system System includes the Data Stream Processing node set for being handled data stream, and data flow is from Data Stream Processing node set , as entrance Data Stream Processing node flow into and flowing through at least one data flow in Data Stream Processing node set Data flow system is flowed out after reason node, which includes: resolution unit, is configured to refer in response to receiving pressure test It enables, data flow to be processed is parsed, generate pressure testing data stream;Input unit is configured to pending data stream Data flow system is input to from the Data Stream Processing node as entrance with pressure testing data stream;Determination unit is configured to Periodically determine that data flow system handles the delay time of the data in inputted data flow, and based on identified delay Time, determine whether pressure test passes through.
In some embodiments, resolution unit includes: extraction module, is configured to refer in response to receiving pressure test It enables, extracts the attribute information to match with each of pending data stream pending data, wherein attribute information includes day Phase, client identification and user identifier;Generation module is configured to generate pressure test number based on extracted attribute information According to stream.
In some embodiments, generation module is further configured to: for each of pending data stream wait locate Data are managed, the extracted attribute information to match with the pending data is repeatedly changed, with generation quantity for first The pressure testing data of preset quantity, and pressure testing data generated is summarized for pressure testing data stream.
In some embodiments, generation module is further configured to: determine it is in pending data stream, in preset duration The quantity of pending data determine the difference of the second preset quantity Yu the first quantity using identified quantity as the first quantity The ratio of difference and the first quantity is determined as the second quantity by value, for each of pending data stream pending data, The extracted attribute information to match with the pending data is repeatedly changed, take generation quantity as the pressure of the second quantity Power test data, and pressure testing data generated is summarized for pressure testing data stream.
In some embodiments, as the first Data Stream Processing section that the Data Stream Processing node of entrance includes as entrance Point and the second Data Stream Processing node;And input unit is further configured to: by pending data stream from the first data flow Processing node is input to data flow system, and pressure testing data stream is input to data flow system from the second Data Stream Processing node System.
In some embodiments, determination unit includes: the first determining module, is configured in response to determining that delay time is small In predetermined time delay threshold value, determine that pressure test passes through;Second determining module is configured in response to determining delay time not Less than predetermined time delay threshold value, determine that pressure test does not pass through.
The third aspect, the embodiment of the present application provide a kind of server, comprising: one or more processors;Storage device, For storing one or more programs, when one or more programs are executed by one or more processors, so that one or more Processor is realized such as method any in claim 1-6.
Method for testing pressure and device provided by the embodiments of the present application for data flow system, by receiving pressure After test instruction, data flow to be processed is parsed to generate pressure testing data, then by pending data stream and pressure Test data flow is input to data flow system from the Data Stream Processing node as entrance, determines data flow system to final cycle The delay time of system processing data determines whether pressure test passes through, is not stopping so as to realize to be based on delay time The generation that pressure testing data is realized in the case where only handling data, is applicable to the pressure test to task on line, to mention The high flexibility of pressure test.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for testing pressure for data flow system of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for testing pressure for data flow system of the application;
Fig. 4 is the flow chart according to another embodiment of the method for testing pressure for data flow system of the application;
Fig. 5 is the structural representation according to one embodiment of the pressure test device for data flow system of the application Figure;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the application for the method for testing pressure of data flow system or for data flow system Pressure test device exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104,106, server 105 and data flow system 107.Wherein, data flow system 107 may include Data Stream Processing node 1071-1076, number therein According to the Data Stream Processing node that stream process node 1071 and 1072 is as entrance.Network 104 to terminal device 101, 102, the medium of communication link is provided between 103 and server 105.Network 106 is to server 105 and data flow system 107 Between provide communication link medium.Network 104,106 may include various connection types, such as wired, wireless communication link Or fiber optic cables etc..
User can be used terminal device 101,102,103 and send message etc. to server 105 by network 104.Terminal Various telecommunication customer end applications can be installed in equipment 101,102,103, for example, shopping class application, web browser applications, Searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can be the control server for being controlled data flow system 107.Control server can be with Distribute task to data flow system 107 by network 106, send control command, input traffic etc., so that Data Stream Processing system System 107 executes corresponding operation, and the executive condition of monitor task.
Data flow system 107 may include the Data Stream Processing node set for being handled data stream.Data flow Data Stream Processing node 1071-1076 in system 107 can be hardware, software, it might even be possible to be a function in software. Data flow can be from the inflow data of Data Stream Processing node 1071 and 1072 in Data Stream Processing node set, as entrance Streaming system 107, and from last processing after flowing through at least one Data Stream Processing node in Data Stream Processing node set Data flow system is flowed out at the node of data flow.
Data flow can mode as illustrated by the arrows in fig. 1 flow through the node of data flow system.For example, a data flow Data Stream Processing node 1071,1073,1076 can be successively flowed through, another data flow can successively flow through Data Stream Processing section Point 1071,1074,1076, another data flow can successively flow through Data Stream Processing node 1071,1075, another data flow Data Stream Processing node 1072,1075 can successively be flowed through.
It should be noted that the method for testing pressure provided by the embodiment of the present application for data flow system is generally by taking Business device 105 executes, and correspondingly, the pressure test device for data flow system is generally positioned in server 105.
It should be understood that the number of terminal device, network, data flow system and server in Fig. 1 is only schematical. According to needs are realized, any number of terminal device, network, data flow system and server can have.
With continued reference to Fig. 2, an implementation of the method for testing pressure for data flow system according to the application is shown The process 200 of example.The method for testing pressure for data flow system, comprising the following steps:
Step 201, in response to receiving pressure test instruction, data flow to be processed is parsed, pressure test is generated Data flow.
In the present embodiment, the electronic equipment (such as server 105 shown in FIG. 1) of method for testing pressure operation thereon In response to receiving pressure test instruction, data flow to be processed can be parsed, generate pressure testing data stream.Wherein, Above-mentioned pressure test instruction can be the signal for being used to indicate above-mentioned electronic equipment starting pressure test.Above-mentioned pressure test instruction It can be what tester was sent manually by clicking certain key, usually before data volume obviously increases, tester's meeting Pressure test instruction is sent to above-mentioned electronic equipment, so that above-mentioned electronic equipment carries out pressure test.As an example, in electronics quotient It is engaged in platform, usually before certain large-scale promotion date (such as double 11, shop-establishment celebration day etc.), needs to carry out pressure test.It needs It is bright, above-mentioned pending data stream can be it is that client (such as Fig. 1 above-mentioned terminal device 101,102,103) is sent, The sequence that the multiple real time datas arranged sequentially in time are constituted, wherein real time data can be web browsing data, order Forms data etc., each of sequence real time data can be considered as a pending data.
In the present embodiment, above-mentioned electronic equipment can carry out each pending data in above-mentioned pending data stream Parsing, generates multiple pressure testing datas, and generate it is arranging sequentially in time, by each pressure testing data generated The sequence constituted, sequence generated are pressure testing data stream.Herein, above-mentioned electronic equipment can use various modes Pending data is parsed, pressure testing data is generated.As an example, above-mentioned electronic equipment can to pending data into Data after duplication are determined as pressure testing data by a large amount of duplication of row;Data after duplication can also be carried out in part Replaced data are determined as pressure testing data by the replacement of appearance.It as another example, can also be pre- in above-mentioned electronic equipment First be stored with the pre-set a large amount of preset data of tester, preset data may include a plurality of types of data (such as Web browsing data, order data etc.).Above-mentioned electronic equipment can determine the type of each pending data, same to choose The preset data of the preset quantity of type is as pressure testing data.
In some optional implementations of the present embodiment, each of above-mentioned pending data stream pending data It can have matched attribute information, wherein attribute information may include date, client identification and user identifier. Wherein, the date in attribute information to match with each pending data can be client and send the pending data Date.In addition, the client identification in the attribute information to match with each pending data, can be used to indicate and Identify the mark of client, client identification can be the character being made of various characters (such as letter, number, symbol etc.) String.It should be noted that the user identifier in the attribute information to match with each pending data, can be user's PIN code (Personal Identification Number, personal identification number), account of user etc..
In some optional implementations of the present embodiment, in response to receiving pressure test instruction, above-mentioned electronics is set It is standby to extract the attribute information to match with each of above-mentioned pending data stream pending data first;Later, may be used To be based on extracted attribute information, pressure testing data stream is generated.
It is to be processed for each of above-mentioned pending data stream in some optional implementations of the present embodiment Data, above-mentioned electronic equipment can repeatedly change the extracted attribute information to match with the pending data, with Generation quantity is the pressure testing data of the first preset quantity, and pressure testing data generated is summarized for pressure test number According to stream.Wherein, above-mentioned first preset quantity can be the pre-set any amount of tester (such as 20,50), this first Preset quantity can serve to indicate that multiple (such as 20 times, 50 times etc.) of the pressure testing data compared to pending data.Specifically Date in the attribute information of each pending data can be modified by ground, above-mentioned electronic equipment first, be changed to for many years Certain date afterwards, to distinguish pending data and pressure testing data.For example, the pending data corresponding date is 2017 May 25, then the date change can be on May 25th, 2099 by above-mentioned electronic equipment.In practice, due to pressure testing data It is different from the date corresponding to pending data, and the storage period of data is usually shorter (such as one week, 10 days etc.), thus Pressure testing data will not have an impact pending data.It is above-mentioned for each pending data after having changed the date Electronic equipment can by the attribute information of the pending data client identification and user identifier replace with random life respectively At client identification and user identifier.It should be noted that it is above-mentioned first default that quantity, which can be generated, in above-mentioned electronic equipment The client identification and user identifier of quantity, the client identification and user identifier in attribute information to replace the data, from And generation quantity is the pressure testing data of above-mentioned first preset quantity, and pressure testing data generated is summarized for pressure Test data flow.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can determine above-mentioned number to be processed first According to the quantity of the pending data in stream, preset duration (such as 10 minutes), using identified quantity as the first quantity, Determine the difference of the second preset quantity Yu above-mentioned first quantity.It should be noted that since pending data stream is according to the time The sequence that tactic multiple real time datas are constituted, and real time data can be considered as pending data, therefore, it is possible to determine The quantity of pending data corresponding to every preset duration (such as 10 minutes) in the sequence.Then, above-mentioned electronic equipment can be with The ratio of above-mentioned difference and above-mentioned first quantity is determined as the second quantity, for each of above-mentioned pending data stream to Data are handled, the extracted attribute information to match with the pending data is repeatedly changed, are upper with generation quantity The pressure testing data of the second quantity is stated, and pressure testing data generated is summarized for pressure testing data stream.
Step 202, in response to receiving pressure test instruction, data flow to be processed is parsed, pressure test is generated Data flow.
In the present embodiment, above-mentioned electronic equipment can be by above-mentioned pending data and above-mentioned pressure testing data from conduct The Data Stream Processing node (such as Data Stream Processing node 1071 and 1072 shown in FIG. 1) of entrance is input to above-mentioned data flow system It unites (such as data flow system 107 shown in FIG. 1).
Step 203, periodically determine that data flow system handles the delay time of the data in inputted data flow, and Based on identified delay time, determine whether pressure test passes through.
In the present embodiment, above-mentioned electronic equipment can periodically determine that above-mentioned data flow system handles inputted number According to the delay time of the data in stream, and based on identified delay time, determine whether pressure test passes through.Wherein, above-mentioned The data in data flow inputted include pending data and above-mentioned pressure testing data stream in above-mentioned pending data stream In pressure testing data.Herein, each pending data can have a generation to characterize the pending data The timestamp of time.Likewise, each pressure testing data also can have one to characterize the pressure testing data Generate the timestamp of time.Above-mentioned electronic equipment can monitor above-mentioned data flow system to each pending data and each pressure The processing progress of test data can also monitor the data (number i.e. to be processed that the current newest processing of above-mentioned data flow system is completed According to or pressure testing data).Above-mentioned electronic equipment can periodically determine the data that current newest processing is completed, and extracting should The time difference of time corresponding to current time and the timestamp is determined as above-mentioned data flow system and handled by the timestamp of data The delay time of the data.Then, based on identified delay time, determine whether pressure test passes through.
In some optional implementations of the present embodiment, in response to determining that identified delay time is less than default prolong Slow time threshold (such as 30 minutes, 20 minutes etc.), above-mentioned electronic equipment can determine that pressure test passes through.
In some optional implementations of the present embodiment, when in response to delay time above-mentioned delay determined by determining Between be not less than above-mentioned predetermined time delay threshold value, determine that pressure test does not pass through.
With continued reference to the application scenarios that Fig. 3, Fig. 3 are according to the method for testing pressure for data flow system of the present embodiment A schematic diagram.In the application scenarios of Fig. 3, tester has sent pressure test instruction 302 to server 301 first, Server 301 receive pressure test instruct 302 pairs of data flows 303 to be processed parse, generate pressure testing data stream 304.Later, server 301 is by pending data stream 303 and pressure testing data stream 304 from the Data Stream Processing as entrance Node is input to data flow system 305.Finally, server 301 periodically determines in the data flow of the input of data flow system 305 Data delay time 306, and based on identified delay time 306, generation is used to indicate what whether pressure test passed through Pressure testing results 307.
The method provided by the above embodiment of the application by receive pressure test instruction after, to data flow to be processed It is parsed to generate pressure testing data, then by pending data stream and pressure testing data stream from the data as entrance Stream process node is input to data flow system, determines to final cycle the delay time of data flow system processing data, so as to It based on delay time, determines whether pressure test passes through, realizes pressure in the case where not stopping handling data so as to realize The generation of power test data is applicable to the pressure test to task on line, to improve the flexibility of pressure test.
With further reference to Fig. 4, it illustrates the streams of another embodiment of the method for testing pressure for data flow system Journey 400.This is used for the process 400 of the method for testing pressure of data flow system, comprising the following steps:
Step 401, it in response to receiving pressure test instruction, extracts and each of pending data stream number to be processed According to the attribute information to match.
In the present embodiment, the electronic equipment (such as server 105 shown in FIG. 1) of method for testing pressure operation thereon In response to receiving pressure test instruction, it can extract and match with each of above-mentioned pending data stream pending data Attribute information, wherein attribute information may include date, client identification and user identifier.
Step 402, it is based on extracted attribute information, generates pressure testing data stream.
In the present embodiment, above-mentioned electronic equipment is based on extracted attribute information, can use various modes and generates pressure Power test data flow.
It is to be processed for each of above-mentioned pending data stream in some optional implementations of the present embodiment Data, above-mentioned electronic equipment can repeatedly change the extracted attribute information to match with the pending data, with Generation quantity is the pressure testing data of the first preset quantity, and pressure testing data generated is summarized for pressure test number According to stream.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can determine above-mentioned number to be processed first According to the quantity of pending data in stream, in preset duration, using identified quantity as the first quantity, determine that second is default The difference of quantity and above-mentioned first quantity.Then, above-mentioned electronic equipment can be by the ratio of above-mentioned difference and above-mentioned first quantity It is determined as the second quantity, for each of above-mentioned pending data stream pending data, to extracted to be processed with this The attribute information that data match repeatedly is changed, and take generation quantity as the pressure testing data of above-mentioned second quantity, and will Pressure testing data generated summarizes for pressure testing data stream.
Step 403, pending data stream is input to data flow system from the first Data Stream Processing node, and pressure is surveyed It tries data flow and is input to data flow system from the second Data Stream Processing node.
In the present embodiment, as the first Data Stream Processing that the Data Stream Processing node of entrance may include as entrance Node and the second Data Stream Processing node.Above-mentioned electronic equipment can be by above-mentioned pending data stream from above-mentioned first data flow Reason node is input to above-mentioned data flow system (such as data flow system 107 shown in FIG. 1), and by above-mentioned pressure testing data stream Above-mentioned data flow system is input to from above-mentioned second Data Stream Processing node.In practice, above-mentioned first Data Stream Processing node can To be as entrance, the Data Stream Processing node for loading pending data, above-mentioned second Data Stream Processing node can be with It is as entrance, for the Data Stream Processing node of on-load pressure test data.First Data Stream Processing node and the second number After loading corresponding data according to stream process node, the data loaded can be sent to identical Data Stream Processing node and carried out Processing.It should be noted that the second Data Stream Processing node can be without the load of data when without pressure test.
Step 404, periodically determine that data flow system handles the delay time of the data in inputted data flow, and Based on identified delay time, determine whether pressure test passes through.
In the present embodiment, when each pending data can have a generation to characterize the pending data Between timestamp.Likewise, each pressure testing data also can have a life to characterize the pressure testing data At the timestamp of time.Above-mentioned electronic equipment can periodically determine the data that current newest processing is completed, and extract the number According to timestamp, the time difference of time corresponding to current time and the timestamp is determined as above-mentioned data flow system processing should The delay time of data.Then, based on identified delay time, determine whether pressure test passes through.Really in response to determining Fixed delay time is less than predetermined time delay threshold value, and above-mentioned electronic equipment can determine that pressure test passes through.In response to determination Identified delay time above-mentioned delay time is not less than above-mentioned predetermined time delay threshold value, determines that pressure test does not pass through.
Figure 4, it is seen that the pressure for data flow system compared with the corresponding embodiment of Fig. 2, in the present embodiment The process 400 of force test method highlights the step of parsing to data flow to be processed.The scheme of the present embodiment description can as a result, Flexibly to generate pressure testing data stream, the flexibility of pressure test is further improved.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind to be used for data flow One embodiment of the pressure test device of system, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, the device It specifically can be applied in various electronic equipments.
As shown in figure 5, the pressure test device 500 described in the present embodiment for data flow system includes: resolution unit 501, it is configured to parse data flow to be processed in response to receiving pressure test instruction, generate pressure testing data Stream;Input unit 502 is configured to above-mentioned pending data stream and above-mentioned pressure testing data stream from the data as entrance Stream process node is input to data flow system;Determination unit 503 is configured to periodically determine above-mentioned data flow system processing The delay time of the data in data flow inputted, and based on identified delay time, determine whether pressure test passes through.
In the present embodiment, above-mentioned resolution unit 501, can be to pending data in response to receiving pressure test instruction Stream is parsed, and pressure testing data stream is generated.It specifically, can be to each pending data in above-mentioned pending data stream Parsed, generate multiple pressure testing datas, and generate it is arranging sequentially in time, by each pressure test generated The sequence that data are constituted, sequence generated are pressure testing data stream.
In some optional implementations of the present embodiment, above-mentioned resolution unit 501 may include extraction module and life At module (not shown).Wherein, said extracted module may be configured to extract in response to receiving pressure test instruction The attribute information to match with each of above-mentioned pending data stream pending data, wherein attribute information include the date, Client identification and user identifier.Above-mentioned generation module may be configured to be generated pressure based on extracted attribute information and surveyed Try data flow.
In some optional implementations of the present embodiment, above-mentioned generation module can be further configured to for upper State each of pending data stream pending data, to the extracted attribute information to match with the pending data into Row repeatedly change, take generation quantity as the pressure testing data of the first preset quantity, and pressure testing data generated is converged It is always pressure testing data stream.
In some optional implementations of the present embodiment, above-mentioned generation module can further be configured to determine The quantity of pending data in pending data stream, in preset duration is stated, using identified quantity as the first quantity, really The ratio of above-mentioned difference and above-mentioned first quantity is determined as the second number by the difference of fixed second preset quantity and above-mentioned first quantity Amount matches for each of above-mentioned pending data stream pending data to the extracted and pending data Attribute information is repeatedly changed, and take generation quantity as the pressure testing data of above-mentioned second quantity, and by pressure generated Test data summarizes for pressure testing data stream.
In the present embodiment, above-mentioned input unit 502 can by above-mentioned pending data and above-mentioned pressure testing data from Data Stream Processing node (such as Data Stream Processing node 1071 and 1072 shown in FIG. 1) as entrance is input to above-mentioned data Streaming system (such as data flow system 107 shown in FIG. 1).
In some optional implementations of the present embodiment, the above-mentioned Data Stream Processing node as entrance includes conduct The the first Data Stream Processing node and the second Data Stream Processing node of entrance;And above-mentioned input unit 502 can further match It sets for above-mentioned pending data stream to be input to above-mentioned data flow system from above-mentioned first Data Stream Processing node, and will be above-mentioned Pressure testing data stream is input to above-mentioned data flow system from above-mentioned second Data Stream Processing node.
In the present embodiment, when each pending data can have a generation to characterize the pending data Between timestamp.Likewise, each pressure testing data also can have a life to characterize the pressure testing data At the timestamp of time.Above-mentioned determination unit 503 can periodically determine the data that current newest processing is completed, and extracting should The time difference of time corresponding to current time and the timestamp is determined as above-mentioned data flow system and handled by the timestamp of data The delay time of the data.Then, based on identified delay time, determine whether pressure test passes through.
In some optional implementations of the present embodiment, above-mentioned determination unit may include the first determining module and Two determining module (not shown)s.Wherein, when above-mentioned first determining module may be configured to delay above-mentioned in response to determination Between be less than predetermined time delay threshold value, determine that pressure test passes through.Above-mentioned second determining module may be configured in response to true Fixed above-mentioned delay time is not less than above-mentioned predetermined time delay threshold value, determines that pressure test does not pass through.
The device provided by the above embodiment of the application, it is right through resolution unit 501 after receiving pressure test instruction Pending data stream is parsed to generate pressure testing data, and then input unit 502 surveys pending data stream and pressure Examination data flow is input to data flow system from the Data Stream Processing node as entrance, and last determination unit 503 is periodically true Determine the delay time of data flow system processing data, to be based on delay time, determines whether pressure test passes through, so as to It realizes the generation for realizing pressure testing data in the case where not stopping handling data, is applicable to survey the pressure of task on line Examination, to improve the flexibility of pressure test.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the server for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Server shown in Fig. 6 is only an example, should not function and use scope band to the embodiment of the present application Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination. The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection, Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include resolution unit, input unit and determination unit.Wherein, the title of these units is not constituted under certain conditions to the unit The restriction of itself, for example, receiving unit is also described as " unit parsed to data flow to be processed ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: in response to receiving pressure test instruction, data flow to be processed is parsed, pressure testing data stream is generated;It should Pending data stream and the pressure testing data stream are input to data flow system from the Data Stream Processing node as entrance;Period Property determine that the data flow system handles the delay time of the data in inputted data flow, and when based on identified delay Between, determine whether pressure test passes through.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (14)

1. a kind of method for testing pressure for data flow system, which is characterized in that the data flow system includes being used for logarithm The Data Stream Processing node set handled according to stream, the data flow from it is in Data Stream Processing node set, as entrance Data Stream Processing node flow into and after flowing through at least one Data Stream Processing node in Data Stream Processing node set Flow out the data flow system, which comprises
In response to receiving pressure test instruction, data flow to be processed is parsed, pressure testing data stream is generated;
The pending data stream and the pressure testing data stream are inputted from the Data Stream Processing node as entrance To the data flow system;
Periodically determine that the data flow system handles the delay time of the data in inputted data flow, and really based on institute Fixed delay time, determine whether pressure test passes through.
2. treating place the method according to claim 1, wherein described instruct in response to receiving pressure test Reason data flow is parsed, and pressure testing data stream is generated, comprising:
In response to receiving pressure test instruction, extraction matches with each of pending data stream pending data Attribute information, wherein attribute information includes date, client identification and user identifier;
Based on extracted attribute information, pressure testing data stream is generated.
3. according to the method described in claim 2, generation pressure is surveyed it is characterized in that, described be based on extracted attribute information Try data flow, comprising:
For each of pending data stream pending data, match to the extracted and pending data Attribute information is repeatedly changed, and take generation quantity as the pressure testing data of the first preset quantity, and by pressure generated Test data summarizes for pressure testing data stream.
4. according to the method described in claim 2, generation pressure is surveyed it is characterized in that, described be based on extracted attribute information Try data flow, comprising:
The quantity for determining pending data in the pending data stream, in preset duration, using identified quantity as First quantity determines the difference of the second preset quantity Yu first quantity;
The ratio of the difference and first quantity is determined as the second quantity, for each in the pending data stream A pending data is changed the extracted attribute information to match with the pending data, repeatedly with generation quantity For the pressure testing data of second quantity, and pressure testing data generated is summarized for pressure testing data stream.
5. the method according to claim 1, wherein the Data Stream Processing node as entrance includes conduct The the first Data Stream Processing node and the second Data Stream Processing node of entrance;And
It is described by the pending data stream and the pressure testing data stream from the Data Stream Processing node as entrance It is input to the data flow system, comprising:
The pending data stream is input to the data flow system from the first Data Stream Processing node, and by the pressure Power test data flow is input to the data flow system from the second Data Stream Processing node.
6. determining that pressure is surveyed the method according to claim 1, wherein described based on identified delay time Whether examination passes through, comprising:
It is less than predetermined time delay threshold value in response to the determination delay time, determines that pressure test passes through;
It is not less than the predetermined time delay threshold value in response to the determination delay time, determines that pressure test does not pass through.
7. a kind of pressure test device for data flow system, which is characterized in that the data flow system includes being used for logarithm The Data Stream Processing node set handled according to stream, the data flow from it is in Data Stream Processing node set, as entrance Data Stream Processing node flow into and after flowing through at least one Data Stream Processing node in Data Stream Processing node set The data flow system is flowed out, described device includes:
Resolution unit is configured to parse data flow to be processed in response to receiving pressure test instruction, generate pressure Test data flow;
Input unit is configured to the pending data stream and the pressure testing data stream from the number as entrance The data flow system is input to according to stream process node;
Determination unit is configured to periodically determine that the data flow system handles prolonging for the data in inputted data flow The slow time, and based on identified delay time, determine whether pressure test passes through.
8. device according to claim 7, which is characterized in that the resolution unit includes:
Extraction module, be configured in response to receive pressure test instruction, extract with it is each in the pending data stream The attribute information that a pending data matches, wherein attribute information includes date, client identification and user identifier;
Generation module is configured to generate pressure testing data stream based on extracted attribute information.
9. device according to claim 8, which is characterized in that the generation module is further configured to:
For each of pending data stream pending data, match to the extracted and pending data Attribute information is repeatedly changed, and take generation quantity as the pressure testing data of the first preset quantity, and by pressure generated Test data summarizes for pressure testing data stream.
10. device according to claim 8, which is characterized in that the generation module is further configured to:
The quantity for determining pending data in the pending data stream, in preset duration, using identified quantity as First quantity determines the difference of the second preset quantity Yu first quantity, by the ratio of the difference and first quantity It is determined as the second quantity, for each of pending data stream pending data, to extracted to be processed with this The attribute information that data match repeatedly is changed, and take generation quantity as the pressure testing data of second quantity, and will Pressure testing data generated summarizes for pressure testing data stream.
11. device according to claim 7, which is characterized in that the Data Stream Processing node as entrance includes making For the first Data Stream Processing node and the second Data Stream Processing node of entrance;And
The input unit is further configured to:
The pending data stream is input to the data flow system from the first Data Stream Processing node, and by the pressure Power test data flow is input to the data flow system from the second Data Stream Processing node.
12. device according to claim 7, which is characterized in that the determination unit includes:
First determining module is configured to be less than predetermined time delay threshold value in response to the determination delay time, determines pressure Test passes through;
Second determining module is configured in response to the determination delay time not less than the predetermined time delay threshold value, really Constant-pressure test does not pass through.
13. a kind of server, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 6.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as method as claimed in any one of claims 1 to 6 is realized when execution.
CN201710425004.8A 2017-06-06 2017-06-06 Method for testing pressure and device for data flow system Pending CN109002385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710425004.8A CN109002385A (en) 2017-06-06 2017-06-06 Method for testing pressure and device for data flow system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710425004.8A CN109002385A (en) 2017-06-06 2017-06-06 Method for testing pressure and device for data flow system

Publications (1)

Publication Number Publication Date
CN109002385A true CN109002385A (en) 2018-12-14

Family

ID=64573646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710425004.8A Pending CN109002385A (en) 2017-06-06 2017-06-06 Method for testing pressure and device for data flow system

Country Status (1)

Country Link
CN (1) CN109002385A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110618922A (en) * 2019-08-15 2019-12-27 平安普惠企业管理有限公司 Performance test method and related equipment
CN110795255A (en) * 2019-10-16 2020-02-14 金蝶软件(中国)有限公司 Data batch value adjusting method and device, readable storage medium and equipment
CN111309576A (en) * 2020-02-18 2020-06-19 北京达佳互联信息技术有限公司 Pressure testing method and device
CN113438124A (en) * 2021-06-07 2021-09-24 清华大学 Network measurement method and device based on intention driving
CN113760989A (en) * 2021-02-04 2021-12-07 北京沃东天骏信息技术有限公司 Method, device and equipment for processing unbounded stream data and storage medium
CN113807909A (en) * 2021-01-13 2021-12-17 北京沃东天骏信息技术有限公司 Order pressure measuring method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725718A (en) * 2005-04-04 2006-01-25 杭州华为三康技术有限公司 Network QoS test method and system
CN105429825A (en) * 2015-12-23 2016-03-23 百度在线网络技术(北京)有限公司 Monitoring method and device for data stream system
US20170132107A1 (en) * 2015-11-10 2017-05-11 International Business Machines Corporation Determining where bottlenecks occur in multi-threaded multi-path computing systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725718A (en) * 2005-04-04 2006-01-25 杭州华为三康技术有限公司 Network QoS test method and system
US20170132107A1 (en) * 2015-11-10 2017-05-11 International Business Machines Corporation Determining where bottlenecks occur in multi-threaded multi-path computing systems
CN105429825A (en) * 2015-12-23 2016-03-23 百度在线网络技术(北京)有限公司 Monitoring method and device for data stream system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110618922A (en) * 2019-08-15 2019-12-27 平安普惠企业管理有限公司 Performance test method and related equipment
CN110618922B (en) * 2019-08-15 2022-10-04 平安普惠企业管理有限公司 Performance test method and related equipment
CN110795255A (en) * 2019-10-16 2020-02-14 金蝶软件(中国)有限公司 Data batch value adjusting method and device, readable storage medium and equipment
CN111309576A (en) * 2020-02-18 2020-06-19 北京达佳互联信息技术有限公司 Pressure testing method and device
CN113807909A (en) * 2021-01-13 2021-12-17 北京沃东天骏信息技术有限公司 Order pressure measuring method and device, electronic equipment and storage medium
CN113760989A (en) * 2021-02-04 2021-12-07 北京沃东天骏信息技术有限公司 Method, device and equipment for processing unbounded stream data and storage medium
CN113438124A (en) * 2021-06-07 2021-09-24 清华大学 Network measurement method and device based on intention driving

Similar Documents

Publication Publication Date Title
CN109002385A (en) Method for testing pressure and device for data flow system
CN109446099A (en) Automatic test cases generation method, device, medium and electronic equipment
CN107609890A (en) A kind of method and apparatus of order tracking
CN109871311B (en) Method and device for recommending test cases
CN108958992A (en) test method and device
CN109976997A (en) Test method and device
CN111444077A (en) Method and device for generating flow node test data
CN109144842A (en) Method and apparatus for test application
CN111339743B (en) Account number generation method and device
CN108776692A (en) Method and apparatus for handling information
CN109739526A (en) Code update method and device
CN109614327A (en) Method and apparatus for output information
CN109634833A (en) A kind of Software Defects Predict Methods and device
CN110471848A (en) A kind of method and apparatus of dynamic returned packet
CN109359194A (en) Method and apparatus for predictive information classification
CN110059011A (en) Interface test method, device, medium and electronic equipment
CN109992496A (en) A kind of data processing method and device for automatic test
CN110309142A (en) The method and apparatus of regulation management
CN108959642A (en) Method and apparatus for information to be written
CN109002282A (en) A kind of method and apparatus for realizing animation effect in web page exploitation
CN107229565B (en) Test method and device
CN109992495A (en) The method and apparatus of interface testing
CN109814957A (en) A kind of label addition method and device for IOS system
CN109753424A (en) The method and apparatus of AB test
CN108959294A (en) A kind of method and apparatus accessing search engine

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181214

RJ01 Rejection of invention patent application after publication