CN112422315A - Cluster performance test method, device, equipment and storage medium - Google Patents

Cluster performance test method, device, equipment and storage medium Download PDF

Info

Publication number
CN112422315A
CN112422315A CN202011099351.4A CN202011099351A CN112422315A CN 112422315 A CN112422315 A CN 112422315A CN 202011099351 A CN202011099351 A CN 202011099351A CN 112422315 A CN112422315 A CN 112422315A
Authority
CN
China
Prior art keywords
time
interface
simulation
initial stage
entering
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
CN202011099351.4A
Other languages
Chinese (zh)
Other versions
CN112422315B (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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202011099351.4A priority Critical patent/CN112422315B/en
Publication of CN112422315A publication Critical patent/CN112422315A/en
Application granted granted Critical
Publication of CN112422315B publication Critical patent/CN112422315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • 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/3457Performance evaluation by simulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput

Landscapes

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

Abstract

The invention discloses a cluster performance testing method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving an interface list set by a user, simulation parameters of the interface, simulation duration, the number of users in an initial stage, deviation time and the number of users in each time; establishing a time axis by utilizing the simulation duration, establishing a mapping table of each time node and the number of users on the time axis, and associating a data structure for placing an interface list for each time node on the time axis; traversing each time node in the mapping table, and simulating an interface in a data structure associated with each time node on a time axis according to the number of users of the current traversal time node; and determining the throughput of the interface according to the service value of the interface in the data structure of each time node on the time axis, and drawing a service simulation graph. The user can automatically calculate the service data at each time point only by inputting the relevant simulation data of each link interface, thereby solving the problem that the cluster performance test can not be carried out without online operation data.

Description

Cluster performance test method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of testing in research and development management, and relates to a cluster performance testing method, device, equipment and storage medium.
Background
In the cluster performance test, the online operation condition needs to be simulated as much as possible, and a method generally adopted in the industry is to take online operation data and deduce the call volume of each link (interface) in the cluster performance test process according to the user multiple. However, in most cluster performance testing processes, because production operation data cannot be obtained, or a system to be tested is on-line for the first time, real on-line data cannot be obtained, the on-line operation condition cannot be simulated, and then the cluster performance cannot be evaluated.
Disclosure of Invention
The present invention provides a method, an apparatus, a device and a storage medium for testing cluster performance, which are directed to the above-mentioned deficiencies of the prior art, and the object is achieved by the following technical solutions.
The first aspect of the present invention provides a cluster performance testing method, where the method includes:
after each interface in the cluster system is called, receiving an interface list set by a user, simulation parameters of each interface, total simulation duration, the number of users entering in an initial stage, initial stage entering deviation time and the number of users entering in each time after the initial stage;
establishing a time axis by utilizing the total simulation duration, establishing a mapping table of each time node and the number of users on the time axis by utilizing the number of users entering in the initial stage, the entering deviation time in the initial stage and the number of users entering each time after the initial stage, and associating a data structure of all interfaces placed in the interface list for each time node on the time axis;
traversing each time node in the mapping table, performing service simulation on each interface in a data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node, and recording a service value obtained through simulation into the data structure;
and determining the throughput of each interface according to the service value of each interface recorded in the data structure of each time node on the time axis after the service simulation, and drawing a service simulation graph.
A second aspect of the present invention provides a cluster performance testing apparatus, including:
the simulation data setting module is used for receiving an interface list set by a user and simulation parameters, total simulation duration, initial stage entering user number, initial stage entering deviation time and user number entering each time after the initial stage after each interface in the cluster system is called;
the initialization module is used for establishing a time axis by utilizing the total simulation duration, establishing a mapping table of each time node and the number of users on the time axis by utilizing the number of users entering in the initial stage, the entry offset time in the initial stage and the number of users entering in each time after the initial stage, and associating a data structure of all interfaces placed in the interface list for each time node on the time axis;
the simulation module is used for traversing each time node in the mapping table, performing service simulation on each interface in the data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node, and recording a service value obtained through simulation into the data structure;
and the simulation result processing module is used for determining the throughput of each interface and drawing a service simulation graph according to the service value of each interface recorded in the data structure of each time node on the time axis after service simulation.
A third aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the cluster performance testing method according to the first aspect when executing the program.
A fourth aspect of the present invention proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the cluster performance testing method according to the first aspect.
The cluster performance testing method based on the first aspect has the following beneficial effects:
after all interfaces which can be called in the cluster system are obtained, the simulation system can automatically calculate the service data at each time point only by inputting the relevant simulation data of each link interface and the number of users, so that the problem that the cluster performance test cannot be carried out without online operation data is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flowchart illustrating an embodiment of a cluster performance testing method according to an exemplary embodiment of the present invention;
FIG. 2 is a schematic diagram of a service simulation according to the present invention;
FIG. 3 is a diagram illustrating a hardware configuration of a computer device in accordance with an illustrative embodiment of the present invention;
fig. 4 is a flowchart illustrating an embodiment of a cluster performance testing apparatus according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the cluster performance test, the online operation condition needs to be simulated as much as possible, and a method generally adopted in the industry is to take online operation data and deduce the call volume of each link (interface) in the cluster performance test process according to the user multiple. However, in most of the cluster performance testing processes, because production operation data cannot be obtained, or a cluster system to be tested is on-line for the first time, real on-line data cannot be obtained, the on-line operation condition cannot be simulated, and then the cluster performance cannot be evaluated.
In addition, the scheme of estimating the cluster call volume is deduced according to the user multiple, uncertainty exists, and for example, during operation activities, the call volume proportion of certain single links (interfaces) is obviously increased, or the primary link (interface) in the whole process is higher momentarily. Moreover, performance data is calculated through pure data, complex mathematical modeling and mathematical calculation are needed, general enterprise users do not have the strong mathematical modeling capability, and performance testing is forbidden.
In addition, inaccurate data estimation can cause inaccurate cluster performance test evaluation indexes, further influence real online operation, and cause influences such as service congestion and system downtime.
In order to solve the problem that no online operation data exists in the cluster performance test process and the offline operation data cannot be simulated, the application provides a simulation system for the cluster performance test.
The following describes in detail the test procedure of the cluster performance simulation system proposed in the present application with specific embodiments,
fig. 1 is a flowchart illustrating an embodiment of a cluster performance testing method according to an exemplary embodiment of the present invention, where the cluster performance testing method may be applied to a computer device (such as a terminal, a server, and the like), as shown in fig. 1, and the cluster performance testing method includes the following steps:
step 101: after each interface in the cluster system is called, an interface list set by a user and simulation parameters, total simulation duration, the number of users entering in an initial stage, the entering deviation time of the initial stage and the number of users entering in each time after the initial stage are received.
The cluster system can be a block chain system, and the block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The cluster system usually includes a plurality of interfaces that can be invoked by users, and these interfaces are the minimum nodes for interacting with users, and users can access different services by invoking these interfaces. Therefore, the essence of the cluster performance test is that the service throughput of each interface can be obtained, and then the maximum performance loss of the interface can be judged according to the service throughput.
In some embodiments, after all the interfaces in the cluster system are called, the interfaces can be displayed, so that a user sets a first interface, a middle interface and a non-connected interface according to actual test requirements, the first interface, the middle interface and a last interface are connected in series according to a certain logic sequence to form an interface list, and corresponding simulation parameters are set for the first interface and the middle interface in the interface list.
As will be appreciated by those skilled in the art, the interface list is embodied in the form of an interface identification data chain, since each interface has a unique identification. If there is no intermediate interface in the interface list, there are only the first interface and the last interface in the interface list.
For example, since the last interface in the interface list is the last interface of the service emulation, there is no need to set emulation parameters for the last interface, and the emulation parameters set for the first interface and the intermediate interface may include the probability of the current interface entering the next interface, the dwell time, and the dwell time float value.
The respective parameters set in step 101 are explained below:
the probability of the current interface entering the next interface is related to the psychology and behaviors of the user, the user interrupts or quits the operation due to things, and the user cannot continue to enter the interface of the next link after quitting;
dwell time, the time between the current interface entering the next interface, usually in seconds;
the dwell time floating value, because different users have different dwell times, the true dwell time is floated randomly up and down in the dwell time floating value;
the number of users entering the initial stage is the number of users estimated to be on line when the service simulation is started;
initial stage entering deviation time, which is time deviation of the number of users entering the system in the initial stage caused by a user network or other reasons, namely, when the user is placed in the initial stage, the user is placed in the system in the time, usually in units of seconds;
the number of users entering each time after the initial stage is the number of users placed in each time after the users are placed in the initial stage;
the total simulation duration is the total length of time for performing the service simulation, and is usually in seconds.
Step 102: and establishing a time axis by utilizing the total simulation duration, establishing a mapping table of each time node and the number of users on the time axis by utilizing the number of users entering in the initial stage, the entering deviation time in the initial stage and the number of users entering each time after the initial stage, and associating a data structure of all interfaces put in an interface list for each time node on the time axis.
In some embodiments, for the process of establishing a timeline with the total simulation duration, the timeline with the total simulation duration may be established at 1 second intervals. Therefore, the interval time between adjacent time nodes on the time axis is 1 second, for example, the total simulation time is 10 seconds, and 10 time nodes are included on the time axis.
For example, the data structure associated with each time node may be a hashmap data structure, and since the hashmap data structure is composed of key value pairs, the key in each key value pair is an interface identifier in the interface list after all interfaces in the interface list are placed in the hashmap data structure, the value is a service value, and the service value is 0 before service simulation.
In an embodiment, for a process of establishing a mapping table of each time node and the number of users on a time axis by using an initial stage entering user number, an initial stage entering deviation time and a user number entering each time after the initial stage, the number of users corresponding to each time node before the initial stage entering deviation time can be determined according to the initial stage entering user number and the initial stage entering deviation time, and meanwhile, the number of users entering each time after the initial stage is determined as the number of users corresponding to each time node after the initial stage entering deviation time, so that the corresponding relation between each time node and the number of users is recorded, and the mapping table is obtained.
That is, when a user is placed in the initial stage, due to a user network or other reasons, the number of users entering the system in the initial stage cannot enter the system at all at one time node, but enters the system continuously within the offset time in the initial stage, so that the time node on the time axis is divided into two parts according to the initial stage entry offset time, and one part is the time node between (1, the initial stage entry offset time); the other part is a time node located between (initial phase entry bias time, simulation total duration).
Illustratively, the user number calculation formula corresponding to each time node located between (1, initial stage entry offset time) is:
Figure BDA0002724840250000091
step 103: and traversing each time node in the mapping table, performing service simulation on each interface in the data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node, and recording the service value obtained by simulation into the data structure.
In step 103, the service simulation process for the current traversal time node is specifically as follows:
assigning the time value of the current traversal time node to the index, taking the number of users corresponding to the current traversal time node as the cycle number n, and executing the following steps for n times:
s1: reading a first interface in the interface list as a current interface, and adding 1 to a value corresponding to the current interface in a data structure associated with a time node corresponding to the index on a time axis;
s2: reading the dwell time and the dwell time floating value of the current interface from the interface list, calculating a random number of the dwell time floating value, and updating an index by using the sum of the random number and the dwell time;
s3: if the probability of entering the next interface from the current interface is hit, adding 1 to the value corresponding to the current interface in the data structure associated with the time node corresponding to the updated index on the time axis, reading the next interface of the current interface from the interface list as the current interface, and repeatedly executing the processes of the steps S2 and S3 until the interface is not accessed in the interface list; and if the probability of entering the next interface from the current interface is not hit, jumping out of the process.
Here, the hit probability of entering the next interface from the current interface in step S3 means that the user will continue to enter the next interface, rather than exit. The probability of entering the next interface from the current interface is determined to be hit if the value calculated by the random probability function is a true value, and the probability of entering the next interface from the current interface is determined to be not hit if the value calculated by the random probability function is not a true value.
Step 104: and determining the throughput of each interface according to the service value of each interface recorded in the data structure of each time node on the time axis after the service simulation, and drawing a service simulation graph.
In an embodiment, the process of determining the throughput of each interface according to the service value of each interface recorded in the data structure of each time node on the time axis after the service simulation may be directly extracting the service value of each interface from the data structure associated with each time node on the time axis, and selecting the maximum service value as the throughput of each interface for each interface.
The throughput of an interface refers to the maximum access amount that can occur at a certain time point, and in this case, the performance loss of the interface is more serious.
In another embodiment, for a drawing process of a service simulation graph, a service value corresponding to each interface in an associated data structure may be taken out from a first time node on a time axis, and a point is drawn at the time node position on the newly-created time axis until a last time node on the time axis, so that a service simulation data graph may be drawn, as shown in fig. 2, where a service simulation curve corresponding to an interface a has a service value that suddenly rises very high after a period of time and remains until the simulation is completed, which indicates that the performance consumption of the contact a in the operation process of a trunking system is the largest, and the contact a needs to be monitored in a focused manner to prevent the failure of the contact a from causing the paralysis of the entire trunking system.
For the above description of the process from step 101 to step 104, the following description is made by using a specific example:
in step 101, the total simulation time set by the user is time (unit is second), the number of users entering in the initial stage is initThread, the deviation time of entering in the initial stage is initoffset time (unit is second), the number of users entering in each time after the initial stage is routineThread, the interface list set by the user is interfaceList, the probability that the current interfaces of the first interface and the middle interface in the interfaceList enter the next interface is P, the retention time is waittime, and the floating value of the retention time is waittiefloat.
In step 102, the established time axis is a timeList, the total length of the timeList is time, the time node positions included in the timeList are 1, 2, and 3 … … time, respectively, the hashmap data structure associated with each time node includes key and value, the key is an interface identifier in the interface list, the value corresponding to the key is initialized to 0, the established mapping table between each time node and the user number is timethread list, in the timethread list, the user number corresponding to each time node located between (1, initoffset time) is initThread/initoffset time, and the user number corresponding to each time node located between (initoffset time +1, time) is routineThread.
In step 103, traversing each time node in the timeThreadList, assigning the time value of the current traversal time node to the index, assigning the corresponding user number to the cycle number n, reading the interfaceList, and executing the following steps for n times:
s1: reading a first interface in the interfaceList as a current interface, and adding 1 to a value corresponding to the current interface in a hashmap data structure associated with a second index time node on the timeList;
s2: reading waittimate and waittiefloat of a current interface from the interfaceList, and calculating the random number of the waittiefloat, wherein index is (random number + waittimate);
s3: if the probability P of entering the next interface from the current interface is hit, adding 1 to the value corresponding to the current interface in the hashmap data structure associated with the updated index time node on the timeList, reading the next interface of the current interface from the interfaceList as the current interface, and repeatedly executing the processes of the steps S2 and S3 until the interface of the interfaceList is not accessed; and if the probability P of entering the next interface from the current interface is not hit, jumping out of the process.
In step 104, traverse the timeList, take out the value corresponding to each interface from the hashmap data structure associated with each time node on the timeList as the service value, then select the maximum service value as the throughput of the interface for each interface, traverse the timeList again, start from the first time node, take out the value corresponding to each interface in the hashmap data structure associated as the service value, draw a point at the time node position on the current axis until the last time node, and then draw the service simulation data graph.
So far, the test flow shown in fig. 1 is completed, and after all interfaces that can be called in the cluster system are obtained, the user can automatically calculate the service data at each time point only by inputting the relevant simulation data of each link interface and the number of users, thereby solving the problem that the cluster performance test cannot be performed without online operation data.
Fig. 3 is a schematic diagram illustrating a hardware structure of a computer device according to an exemplary embodiment of the present invention. As shown in fig. 3, the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus. The non-volatile storage medium of the computer device stores an operating system, a database and computer readable instructions, the database may store control information sequences, and the computer readable instructions, when executed by the processor, may cause the processor to implement the cluster performance testing method described above. The processor of the computer device is used for providing calculation and control capability and supporting the operation of the whole computer device. The memory of the computer device may have stored therein computer readable instructions that, when executed by the processor, may cause the processor to perform a cluster performance testing method. The network interface of the computer device is used for connecting and communicating with the terminal.
Those skilled in the art will appreciate that the configuration shown in fig. 3 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing devices to which aspects of the present invention may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Corresponding to the embodiment of the cluster performance testing method, the invention also provides an embodiment of a cluster performance testing device.
Fig. 4 is a flowchart illustrating an embodiment of a cluster performance testing apparatus according to an exemplary embodiment of the present invention, where the cluster performance testing apparatus may be applied to a computer device. As shown in fig. 4, the cluster performance testing apparatus includes:
the simulation data setting module 410 is configured to receive an interface list set by a user and simulation parameters, total simulation duration, number of users entering in an initial stage, initial stage entering deviation time, and number of users entering in each time after the initial stage after each interface in the cluster system is called;
an initialization module 420, configured to establish a time axis by using a total simulation duration, establish a mapping table between each time node and a number of users on the time axis by using the number of users entering in the initial stage, the entry offset time in the initial stage, and the number of users entering each time after the initial stage, and associate a data structure of all interfaces placed in the interface list for each time node on the time axis;
the simulation module 430 is configured to traverse each time node in the mapping table, perform service simulation on each interface in the data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node, and record a service value obtained through the simulation into the data structure;
and the simulation result processing module 440 is configured to determine throughput of each interface according to the service value of each interface recorded in the data structure of each time node on the time axis after the service simulation, and draw a service simulation graph.
In an optional implementation manner, the interface list includes a first interface identifier, an intermediate interface identifier, and an un-interface identifier; and the first interface identifier and the intermediate interface identifier are correspondingly provided with simulation parameters.
In an optional implementation manner, the simulation parameters include probability of entering the next interface from the current interface, dwell time and dwell time floating value.
In an optional implementation manner, the interval time between adjacent time nodes on the time axis is 1 second, and the data structure associated with each time node is a hashmap data structure, each key-value pair in the hashmap data structure includes a key and a value, the key is an interface identifier in the interface list, the value is a service value, and the service value is 0 before service simulation.
In an optional implementation manner, the simulation module 430 is specifically configured to assign a time value of a current traversal time node to an index, take a number of users corresponding to the current traversal time node as a cycle number n, and execute the following steps n times: s1: reading a first interface in the interface list as a current interface, and adding 1 to a value corresponding to the current interface in a data structure associated with a time node corresponding to the index on the time axis; s2: reading the dwell time and the dwell time floating value of the current interface from the interface list, calculating a random number of the dwell time floating value, and updating the index by using the sum of the random number and the dwell time; s3: if the probability of entering the next interface from the current interface is hit, adding 1 to the value corresponding to the current interface in the data structure associated with the time node corresponding to the updated index on the time axis, reading the next interface of the current interface from the interface list as the current interface, and repeatedly executing the processes of the steps S2 and S3 until the interface is not accessed in the interface list; and if the probability of entering the next interface from the current interface is not hit, jumping out of the process.
In an optional implementation manner, the initialization module 420 is specifically configured to, in a process of establishing a mapping table between each time node and a number of users on the time axis by using the number of users entering in the initial stage, the initial stage entry offset time, and the number of users entering in each time after the initial stage, determine, according to the number of users entering in the initial stage and the initial stage entry offset time, a number of users corresponding to each time node before the initial stage entry offset time; determining the number of users entering each time after the initial stage as the number of users corresponding to each time node after the initial stage entering deviation time; and recording the corresponding relation between each time node and the number of users to obtain the mapping table.
In an optional implementation manner, the simulation result processing module 440 is specifically configured to, in a process of determining throughput of each interface according to the service value of each interface recorded in the data structure of each time node on the time axis after service simulation, take the service value of each interface out of the data structure associated with each time node on the time axis; for each interface, the maximum traffic value is selected as the throughput of that interface.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The present invention also provides another embodiment, which is to provide a computer-readable storage medium having a computer program stored thereon, where the computer program is executable by at least one processor to cause the at least one processor to perform the steps of any one of the cluster performance testing methods described above.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A cluster performance testing method, the method comprising:
after each interface in the cluster system is called, receiving an interface list set by a user and simulation parameters, total simulation duration, the number of users entering in an initial stage, initial stage entering deviation time and the number of users entering each time after the initial stage;
establishing a time axis by utilizing the total simulation duration, establishing a mapping table of each time node and the number of users on the time axis by utilizing the number of users entering in the initial stage, the entering deviation time in the initial stage and the number of users entering each time after the initial stage, and associating a data structure of all interfaces placed in the interface list for each time node on the time axis;
traversing each time node in the mapping table, performing service simulation on each interface in a data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node, and recording a service value obtained through simulation into the data structure;
and determining the throughput of each interface according to the service value of each interface recorded in the data structure of each time node on the time axis after the service simulation, and drawing a service simulation graph.
2. The method of claim 1, wherein the interface list comprises a first interface identifier, an intermediate interface identifier, and an un-interface identifier;
and the first interface identifier and the intermediate interface identifier are correspondingly provided with simulation parameters.
3. The method of claim 2, wherein the simulation parameters include a probability of the current interface entering the next interface, a dwell time, and a dwell time float value.
4. The method according to claim 3, wherein the interval time between adjacent time nodes on the time axis is 1 second, and the data structure associated with each time node is a hashmap data structure, each key-value pair in the hashmap data structure comprises a key and a value, the key is an interface identifier in the interface list, the value is a traffic value, and the traffic value is 0 before performing the traffic simulation.
5. The method according to claim 4, wherein the performing service simulation on each interface in the data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node comprises:
assigning the time value of the current traversal time node to the index, taking the number of users corresponding to the current traversal time node as the cycle number n, and executing the following steps for n times:
s1: reading a first interface in the interface list as a current interface, and adding 1 to a value corresponding to the current interface in a data structure associated with a time node corresponding to the index on the time axis;
s2: reading the dwell time and the dwell time floating value of the current interface from the interface list, calculating a random number of the dwell time floating value, and updating the index by using the sum of the random number and the dwell time;
s3: if the probability of entering the next interface from the current interface is hit, adding 1 to the value corresponding to the current interface in the data structure associated with the time node corresponding to the updated index on the time axis, reading the next interface of the current interface from the interface list as the current interface, and repeatedly executing the processes of the steps S2 and S3 until the interface is not accessed in the interface list; and if the probability of entering the next interface from the current interface is not hit, jumping out of the process.
6. The method of claim 1, wherein the establishing a mapping table of each time node and a number of users on the time axis by using the number of users entering in the initial stage, the deviation time of entering in the initial stage, and the number of users entering each time after the initial stage comprises:
determining the number of users corresponding to each time node before the initial stage entering deviation time according to the initial stage entering user number and the initial stage entering deviation time;
determining the number of users entering each time after the initial stage as the number of users corresponding to each time node after the initial stage entering deviation time;
and recording the corresponding relation between each time node and the number of users to obtain the mapping table.
7. The method of claim 1, wherein determining the throughput of each interface according to the traffic value of each interface recorded in the data structure of each time node on the time axis after the traffic simulation comprises:
taking out the service value of each interface from the data structure associated with each time node on the time axis;
for each interface, the maximum traffic value is selected as the throughput of that interface.
8. A cluster performance testing apparatus, the apparatus comprising:
the simulation data setting module is used for receiving an interface list set by a user and simulation parameters, total simulation duration, initial stage entering user number, initial stage entering deviation time and user number entering each time after the initial stage after each interface in the cluster system is called;
the initialization module is used for establishing a time axis by utilizing the total simulation duration, establishing a mapping table of each time node and the number of users on the time axis by utilizing the number of users entering in the initial stage, the entry offset time in the initial stage and the number of users entering in each time after the initial stage, and associating a data structure of all interfaces placed in the interface list for each time node on the time axis;
the simulation module is used for traversing each time node in the mapping table, performing service simulation on each interface in the data structure associated with each time node on the time axis according to the number of users corresponding to the current traversal time node, and recording a service value obtained through simulation into the data structure;
and the simulation result processing module is used for determining the throughput of each interface and drawing a service simulation graph according to the service value of each interface recorded in the data structure of each time node on the time axis after service simulation.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the method according to any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the cluster performance testing method according to any one of claims 1 to 7.
CN202011099351.4A 2020-10-14 2020-10-14 Cluster performance test method, device, equipment and storage medium Active CN112422315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011099351.4A CN112422315B (en) 2020-10-14 2020-10-14 Cluster performance test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011099351.4A CN112422315B (en) 2020-10-14 2020-10-14 Cluster performance test method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112422315A true CN112422315A (en) 2021-02-26
CN112422315B CN112422315B (en) 2022-09-02

Family

ID=74854515

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011099351.4A Active CN112422315B (en) 2020-10-14 2020-10-14 Cluster performance test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112422315B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007232A (en) * 2000-06-21 2002-01-11 Cybird Co Ltd Performance testing method and server testing device for www server
CN105307183A (en) * 2014-07-31 2016-02-03 中国移动通信集团设计院有限公司 Method and device for establishing data service model
US20170132107A1 (en) * 2015-11-10 2017-05-11 International Business Machines Corporation Determining where bottlenecks occur in multi-threaded multi-path computing systems
CN106803799A (en) * 2015-11-26 2017-06-06 阿里巴巴集团控股有限公司 A kind of performance test methods and device
CN110798373A (en) * 2019-09-20 2020-02-14 苏州浪潮智能科技有限公司 Method for realizing performance test, test server and computer storage medium
CN111741294A (en) * 2020-07-13 2020-10-02 四川虹魔方网络科技有限公司 Performance test method based on smart television cloud platform

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007232A (en) * 2000-06-21 2002-01-11 Cybird Co Ltd Performance testing method and server testing device for www server
CN105307183A (en) * 2014-07-31 2016-02-03 中国移动通信集团设计院有限公司 Method and device for establishing data service model
US20170132107A1 (en) * 2015-11-10 2017-05-11 International Business Machines Corporation Determining where bottlenecks occur in multi-threaded multi-path computing systems
CN106803799A (en) * 2015-11-26 2017-06-06 阿里巴巴集团控股有限公司 A kind of performance test methods and device
CN110798373A (en) * 2019-09-20 2020-02-14 苏州浪潮智能科技有限公司 Method for realizing performance test, test server and computer storage medium
CN111741294A (en) * 2020-07-13 2020-10-02 四川虹魔方网络科技有限公司 Performance test method based on smart television cloud platform

Also Published As

Publication number Publication date
CN112422315B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN109359003B (en) Game server pressure testing method, device and equipment
CN110474820B (en) Flow playback method and device and electronic equipment
CN109309596B (en) Pressure testing method and device and server
EP3852014A1 (en) Method and apparatus for training learning model, and computing device
CN110795246A (en) Resource utilization rate prediction method and device
CN108304426A (en) The acquisition methods and device of mark
CN113163011A (en) Method, system, device and storage medium for modifying data in block chain
CN115373888A (en) Fault positioning method and device, electronic equipment and storage medium
JP2023022831A (en) Computer system, computer implementation method, program and computer implementation system (learning causal relation)
CN112422315B (en) Cluster performance test method, device, equipment and storage medium
US20160342899A1 (en) Collaborative filtering in directed graph
CN109634979A (en) Data-updating method and device
CN110880117A (en) False service identification method, device, equipment and storage medium
CN106648895A (en) Data processing method and device, and terminal
CN115203556A (en) Score prediction model training method and device, electronic equipment and storage medium
CN116225690A (en) Memory multidimensional database calculation load balancing method and system based on docker
CN116302874A (en) Model capability test method and device, electronic equipment, storage medium and product
US20180285077A1 (en) Sample-based multidimensional data cloning
CN114153746A (en) Intelligent contract testing method based on symbolic execution and fuzziness
CN114090204A (en) Resource prediction method and device
CN113987328A (en) Topic recommendation method, equipment, server and storage medium
CN112948836A (en) Method and device for protecting safety of neural network model
CN111935279A (en) Internet of things network maintenance method based on block chain and big data and computing node
CN113326102B (en) Large-scale virtual machine creating method and device, computer equipment and readable medium
Carlson Modeling-Related Processes With an Excess of Zeros

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