CN115587019A - Pressure testing method, device, system, medium and electronic equipment - Google Patents

Pressure testing method, device, system, medium and electronic equipment Download PDF

Info

Publication number
CN115587019A
CN115587019A CN202110765927.4A CN202110765927A CN115587019A CN 115587019 A CN115587019 A CN 115587019A CN 202110765927 A CN202110765927 A CN 202110765927A CN 115587019 A CN115587019 A CN 115587019A
Authority
CN
China
Prior art keywords
server
information
pressure
pressure measurement
cpu
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
CN202110765927.4A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110765927.4A priority Critical patent/CN115587019A/en
Publication of CN115587019A publication Critical patent/CN115587019A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0721Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a pressure testing method, device, system, medium and electronic equipment, the method comprising: displaying a pressure measurement information configuration page, wherein a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration page; acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server; acquiring server parameter information and CPU execution function information of the compressed server in the pressure test execution process; and determining the abnormality of the compressed server and the abnormal position corresponding to the abnormality according to the server parameter information and the CPU execution function information. Therefore, dotting is not needed in the pressure testing process, the requirements on the skill and experience of technicians can be reduced, and the abnormal position needing to be optimized in the pressure testing process can be accurately determined.

Description

Pressure testing method, device, system, medium and electronic equipment
Technical Field
The present disclosure relates to the field of testing, and in particular, to a pressure testing method, apparatus, system, medium, and electronic device.
Background
In the game development and testing process, both the server and the client need to test the capability (i.e. pressure) that the respective services can carry. Generally, for a game project, the process of performing stress testing generally includes setting a pressure server and a pressure server, deploying a test environment, designing and executing a test case, collecting data, and analyzing data.
However, in the above process, when data acquisition is performed, a corresponding data recording point is usually added to the pressure measurement logic to perform dotting test, so as to obtain acquired pressure measurement data; when data analysis is performed on the pressure measurement data, the abnormal position is determined according to the dotting time and the dotting position in the test flow, and the key point needing to be optimized in the pressure test is difficult to accurately determine.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a pressure testing method, the method comprising:
displaying a pressure measurement information configuration page, wherein a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration page;
acquiring parameter information input by a pressure measurement configuration parameter item on a pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server;
acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function;
and determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
In a second aspect, the present disclosure provides a pressure testing device, the device comprising:
the system comprises a first display module, a second display module and a display module, wherein the first display module is used for displaying a pressure measurement information configuration page, and a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration interface;
the processing module is used for acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server;
the acquisition module is used for acquiring server parameter information and CPU (central processing unit) execution function information of the compression server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function;
and the determining module is used for determining the abnormity existing in the pressure server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
In a third aspect, the present disclosure provides a stress testing system comprising:
the pressure testing device is used for displaying a pressure testing information configuration page, and a plurality of pressure testing configuration parameter items are loaded on the pressure testing information configuration page; acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server; acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in a pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function; determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information;
the pressure application server is in communication connection with the pressure testing device and used for starting a target number of simulation clients according to the received pressure testing instruction so that the simulation clients execute a target script to log in the pressure application server;
and the pressure server is in communication connection with the pressure testing device and is used for providing service for the simulation client so that the pressure testing device can acquire the server parameter information and the CPU execution function information.
Optionally, the pressure measurement configuration parameter item includes a server setting item, and the server setting item includes a pressure server setting item and a pressure server setting item;
the pressure testing device is also used for:
responding to the selection operation of a user on the server setting item in the pressure measurement information configuration page, and displaying a connected server corresponding to the server setting item;
and responding to the selection operation of the user on the server, acquiring the parameter information corresponding to the selected server, and generating the pressure measurement instruction according to the parameter information.
Optionally, the pressure testing device is further configured to:
displaying a server adding page, wherein the server adding page bears server parameter configuration items;
responding to an input operation of a user in the server adding page and aiming at a target configuration item in the server parameter configuration items, and generating server connection information corresponding to a server to be connected according to the target configuration item and the content input by the user, wherein the server connection information is used for establishing communication connection with the server to be connected;
and connecting the server to be connected based on the server connection information.
Optionally, the pressure testing device is further configured to:
acquiring server parameter information corresponding to the compression server based on a service monitoring system, wherein the server parameter information comprises performance parameter information corresponding to the compression server and performance parameter information corresponding to an execution process in the compression server;
and sampling a CPU call instruction at intervals of sampling time in the process of acquiring the server parameter information by the service monitoring system to acquire the CPU execution function information.
Optionally, the pressure testing device is further configured to:
intercepting system calls at intervals of the sampling time so as to sample the CPU call instruction;
decoding a target CPU calling instruction obtained by sampling to obtain a calling link corresponding to the target CPU calling instruction;
determining execution layer type information corresponding to an execution function according to the call link, adding the execution layer type information to stack frame information corresponding to the execution function, and taking the updated stack frame information as the CPU execution function information, wherein the execution layer type information comprises an engine layer and a script layer.
Optionally, the pressure testing device is further configured to:
determining that the compressed server is abnormal under the condition that the server parameter information meets an abnormal condition, and determining the time period when the server parameter information meets the abnormal condition as an abnormal time period;
determining the sampling times corresponding to each execution function in the abnormal time period;
for each execution function, determining the ratio of the sampling times to the total sampling times of the execution function in the abnormal time period as an abnormal value corresponding to the execution function;
and determining the execution function with the corresponding abnormal value larger than a preset threshold value as an abnormal function, and determining the function position corresponding to the abnormal function as the abnormal position.
In a fourth aspect, a computer-readable medium is provided, on which a computer program is stored which, when being executed by a processing means, carries out the steps of the method of the first aspect.
In a fifth aspect, an electronic device is provided, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of the first aspect.
Therefore, in the technical scheme, parameters required by the pressure test can be visually configured through a pressure test information configuration page to directly generate a pressure test instruction, the pressure test instruction is sent to the pressure application server to start the pressure test, server parameter information and CPU execution function information of the pressure application server in the pressure test execution process are acquired, and the abnormality of the pressure application server and the abnormal position corresponding to the abnormality are determined according to the server parameter information and the CPU execution function information. Through the scheme, the user can directly start the pressure test process based on the pressure test information configuration page, the setting is not required in a command line mode, the dotting test is not required in the pressure test process, the error of a pressure test result caused by the dotting position deviation can be effectively avoided, the technical skill and experience requirements of technicians can be effectively reduced, and the user use experience is improved. In the technical scheme of this disclosure, can monitor the overall process of stress testing, and monitor server performance and CPU's function execution condition simultaneously, thereby can be when the server performance is unusual, carry out analysis and location to unusual reason based on CPU executive function information, improve stress testing's accuracy and coverage, can accurately determine the abnormal position that needs optimize in the stress testing process simultaneously, realize accurate analysis, and be convenient for the user formulate the optimization measure, further promote user and use experience.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow chart of a pressure testing method provided according to one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a configuration page provided in accordance with an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a server add page provided in accordance with an embodiment of the present disclosure;
FIG. 4 is a block diagram of a pressure testing device provided in accordance with one embodiment of the present disclosure;
FIG. 5 is an interactive pictorial illustration of a stress testing system provided in accordance with an embodiment of the present disclosure;
FIG. 6 shows a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a" or "an" in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will appreciate that references to "one or more" are intended to be exemplary and not limiting unless the context clearly indicates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart illustrating a pressure testing method according to an embodiment of the present disclosure, and as shown in fig. 1, the method may include:
in step 11, a pressure measurement information configuration page is displayed, and a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration page.
Fig. 2 is a schematic diagram of a pressure measurement information configuration page provided according to an embodiment of the present disclosure, where in an embodiment, pressure measurement configuration parameter items are as items A1 to A5 in fig. 2, and necessary items and selectable items in the pressure measurement configuration parameter items may be selectively set according to an actual usage scenario to fit the usage scenario and usage requirements of a user.
In one possible embodiment, item A1 may be used to set the process name, item A2 may be used to set the target number of simulation clients launched in a single server for pressure; item A3 can be used for setting a test script to be executed by a test process, the test script can set a default script, and when a user does not input, the default script is used as the test script; item A4 is used to set an IP address of a pressure server, where the pressure server may be one or more, and if there are multiple pressure servers, the IP address of each pressure server may be input; the A5 entry is used to set the IP address of the compressed server.
In step 12, parameter information input for a pressure measurement configuration parameter item on a pressure measurement information configuration page is acquired, a pressure measurement instruction is generated according to the acquired parameter information in response to a configuration completion operation, and the pressure measurement instruction is sent to a pressure application server and used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server.
In this embodiment, parameter input may be performed on the pressure measurement information configuration page for different pressure measurement configuration parameter items, so as to complete setting of the parameter item, so as to obtain a parameter included in the pressure measurement instruction. The server for performing the pressure test is a server for simulating a plurality of clients to perform an access operation, for example, a plurality of simulation clients may be started in the server for performing the pressure test, each simulation client is used to simulate an access process of an actual client, and the server for performing the pressure test is a server that needs to perform the pressure test.
The configuration parameters corresponding to the pressure test configuration parameter item are parameter information required for performing a pressure test, for example, the configuration parameters may include, but are not limited to, an IP address of a pressure server, a target number of simulation clients that need to be started in each pressure server, a target script that needs to be executed by the simulation clients, an IP address of the pressure server, and the like. The target script is a script file for controlling the simulation process to be executed by the simulation client, i.e. a processing logic to be executed by the actual client for logging in the compression server is simulated. For example, the user may set and launch in a command line manner in the compressed server, or may set and launch through a command line based on other remote servers.
For each pressure measurement configuration parameter item, determining the content corresponding to the pressure measurement configuration parameter item in the content input by the user as the value of the pressure measurement configuration parameter item; in addition, for the parameter information which is not correspondingly input by the user in the pressure measurement configuration parameter item, the default value corresponding to the pressure measurement configuration parameter item can be determined as the value of the parameter information, so that the value of each pressure measurement configuration parameter item can be obtained, and the pressure measurement instruction can be further generated. As described in the example of fig. 2 above, the pressure measurement configuration parameter items are A1 to A5, and for example, the user may input corresponding contents for the setting items A1, A4, and A5 to perform setting, where the value of the item A1 is "Test _ name", the value of the item A2 is "100", the value of the item A4 is "10.86.146.145 32200, 10.119.127.55", and the value of the item A5 is "10.227.13.176. Correspondingly, the value of the A3 item is a default value of the item, such as a preset "xxx.
In this step, the pressure server may be one or more, and the setting of the target number may be set according to the pressure test requirement of the pressure server, which is not limited by this disclosure. For example, after sending the pressure measurement instruction to the pressure application server, the pressure application server may start a target number of simulation clients in the pressure application server in response to receiving the pressure measurement instruction and executing the pressure measurement instruction. As an example, for each server under pressure, it may implement the starting of a target number of simulation clients through a preset number of starting processes. For example, the target number may be 100, and the number of the start processes may be 3, where the 3 start processes may be set to start 33, and 34 simulation clients, respectively. Or the ratio of the simulation clients started by each starting process may be set, so as to implement the starting of the plurality of simulation clients, for example, the ratio is "1. It should be noted that there may be one or more pressure servers, and the number of corresponding start processes in each pressure server may be the same or different, which is not limited in this disclosure.
In step 13, server parameter information and CPU execution function information of the compression server during the execution process of the stress test are obtained, where the CPU execution function information includes execution layer type information corresponding to a function, and the execution layer type information is used to indicate an execution layer to which the execution function belongs.
The server parameter information is parameter information representing processing performance of a server, for example, memory occupation information, CPU occupation information, disk IO (Input/Output) information, and uplink and downlink traffic information of the server, where the uplink and downlink traffic information may include uplink traffic and downlink traffic. The CPU execution function information is information indicating a relevant function executed in the CPU of the pressure server during the execution of the pressure test.
In step 14, according to the server parameter information and the CPU execution function information, the abnormality existing in the pressure receiving server and the abnormality position corresponding to the abnormality are determined.
The server parameter information can be used for representing the running state of the server, the CPU execution function information can be used for representing the running state corresponding to the CPU, and therefore the abnormality of the server can be determined based on the running state of the server, the abnormal position can be determined through analyzing the CPU execution function information, and the accurate positioning of the abnormal reason is achieved.
Therefore, in the technical scheme, parameters required by the pressure test can be visually configured through a pressure test information configuration page to directly generate a pressure test instruction, the pressure test instruction is sent to the pressure application server to start the pressure test, server parameter information and CPU execution function information of the pressure application server in the pressure test execution process are acquired, and the abnormality of the pressure application server and the abnormal position corresponding to the abnormality are determined according to the server parameter information and the CPU execution function information. Through the scheme, the user can directly start the pressure testing process based on the pressure testing information configuration page, the setting is not required in a command line mode, the dotting test is not required in the pressure testing process, the error of a pressure testing result caused by dotting position deviation can be effectively avoided, the technical skill and experience requirements of technical personnel can be effectively reduced, and the user use experience is improved. In the technical scheme of this disclosure, can monitor the overall process of stress test, and monitor server performance and CPU's function execution simultaneously, thereby can be when the server performance is unusual, carry out function information and analyze and fix a position unusual reason based on CPU, improve the accuracy and the coverage of stress test, can accurately determine the abnormal position that needs optimize in the stress test process simultaneously, realize accurate analysis, and be convenient for the user to formulate the optimal measure, further promote user and use experience.
In a possible embodiment, the pressure measurement configuration parameter item includes a server setting item, and the server setting item includes a pressure server setting item and a pressure server setting item;
correspondingly, an example implementation manner of acquiring the parameter information input by the pressure measurement configuration parameter item on the pressure measurement information configuration page and generating the pressure measurement instruction according to the acquired parameter information in response to the configuration completion operation is as follows, where the step may include:
and responding to the selection operation of the user for the server setting item in the pressure measurement information configuration page, and displaying the connected server corresponding to the server setting item.
For example, a connection may be established in advance with a plurality of servers in the stress test system. For example, a plurality of servers participating in the stress test may perform pre-processing registration in the stress test system in advance, and establish a connection between the stress test system and the stress server and between the stress test system and the stressed server through a remote SSH (Secure Shell protocol). The SSH is an encrypted network transmission protocol, and can provide a safe transmission environment for network services in an unsafe network, so that the safety of data transmission in the pressure test process can be effectively ensured, and the safety of the pressure test is further ensured.
In a possible embodiment, when the stress testing system is started, the system can be connected with each registered server through SSH respectively, and when parameter information input for a pressure measurement configuration parameter item on a pressure measurement information configuration page is acquired, such as when a user configures the above items A4 and A5, each connected server can be displayed by pulling down at B1, so that the user can select a desired server from the displayed servers and add the server to the item A4. Likewise, the respective pressure servers to which the connection has been established may be displayed by being pulled down at B2, so that the user may select the pressure server from the displayed pressure servers to be tested and add to the item A5, thereby achieving the selected configuration of the pressure server and the pressure server.
And then responding to the selection operation of the user on the server, acquiring the parameter information corresponding to the selected server, and generating the pressure measurement instruction according to the parameter information.
In this embodiment, the configuration parameters corresponding to the service selected by the user may be determined based on the selection operation of the user, so that the configuration parameters may be used as the parameter information correspondingly input to the corresponding pressure measurement configuration parameter item, and the user does not need to manually input an IP address, thereby reducing the user operation, and simultaneously ensuring the accuracy of the IP address of the server, and ensuring the safety of the pressure test by making both the configured pressure application server and the pressure server be servers that have established a safety connection. Similarly, when setting for the A3 item, all the imported scripts may be displayed by pulling down at B3, so that the user may select one script from the displayed scripts as the test script.
In one possible embodiment, the user may view the various servers to which a connection is currently established through a server view list. For example, the user may click a view button in a front-end page of the stress testing system to trigger a server list request, and the back-end of the stress testing system may obtain, in response to the server list request, each registered server information through SSH and display the obtained server information through the front-end page, so that the user may view currently available servers.
Therefore, by means of the technical scheme, the servers can be managed in a unified mode, the servers and the compression servers can be managed in a unified mode, the pressure testing method is suitable for pressure testing requirements under various scenes, the application range of the pressure testing method is widened, connection with the servers does not need to be established for multiple times, and user experience is improved.
In a possible embodiment, as shown in fig. 2, a user may click all start buttons to trigger execution of a pressure test, so that a pressure test process may be started, and similarly, a user may click all stop buttons to trigger a stop instruction, and send the stop instruction to a pressure application server, so that the pressure application server closes a simulation client, thereby ending the pressure test process, and implementing unified management on multiple simulation clients in the pressure test process. The refresh state may be used to trigger refresh monitoring of a state of each simulation client, and the setting may be used to trigger a user to configure related information of the server, for example, to modify the type of the server, and for example, the type of the server may be modified from the server to the server under pressure and the server under pressure, so that a pressure test process for the server may be implemented in the pressure test system, which is convenient for the user to operate.
In one possible embodiment, the method may further comprise:
and displaying a server adding page, wherein the server adding page bears server parameter configuration items for a user to perform related setting.
By way of example, a user may trigger a page request by clicking on an add server button to display the server add page, as shown in FIG. 3.
And then, in response to an input operation of a user in the server adding page and aiming at a target configuration item in the server parameter configuration items, generating server connection information corresponding to a server to be connected according to the target configuration item and content input by the user, wherein the server connection information is used for establishing communication connection with the server to be connected, and exemplarily, the server connection information may include an IP address and SSH information of the server to be connected.
As shown in fig. 3, where may be used to indicate that the item is a must-fill setting item to prompt the user accordingly. The user fills in "server IP: after the content of the SSH port entry, the IP address and SSH information of the server to be connected can be obtained. Other server to-be-set items can be set as a required-to-fill setting item and an optional setting item according to actual use conditions. Similarly, the type of the server may be set as a "pressure & pressure" type by default, that is, the server to be connected may be used as a pressure server or a pressure server, and when the type of the server to be connected needs to be set, the user may select a corresponding type, so as to obtain the server connection information corresponding to the server to be connected.
And connecting the server to be connected based on the server connection information.
The method for performing server connection based on the IP address and the SSH information may be implemented based on an SSH command, and is not described herein again.
Therefore, according to the technical scheme, a new server can be added through the visual interface, the connection with the server is established through the SSH, the unified management of the server is realized, the operation flow of pressure testing based on the server is effectively simplified, the server can be directly accessed after the connection is established, the connection is not required to be performed again in a command line mode subsequently, the management efficiency of the server is further improved, and the efficiency of the pressure testing can be improved to a certain extent.
In one possible embodiment, an exemplary implementation manner of obtaining server parameter information and central processing unit CPU execution function information of the pressure server during the pressure test execution process is as follows, and the step may include:
the method comprises the steps that server parameter information corresponding to the compression server is obtained based on a service monitoring system, wherein the server parameter information comprises performance parameter information corresponding to the compression server and performance parameter information corresponding to an execution process in the compression server.
The service monitoring system may persistently store the collected performance indicator data as time series data, i.e., a collection of consecutive data stored in a time dimension in the same order.
As an example, performance parameter information corresponding to the compressed server may be collected, such as CPU occupation information, memory occupation information, disk occupation information, and the like of the compressed server; and the performance parameter information corresponding to each execution process in the compressed server can be acquired, such as the CPU information and the memory information occupied by the current execution process, so as to acquire the server parameter information corresponding to the compressed server based on the above manner.
And sampling a CPU call instruction at intervals of sampling time in the process of acquiring the server parameter information by the service monitoring system to acquire the CPU execution function information.
The CPU calling instruction can be obtained by sampling based on a preset sampling interval, and then corresponding execution function information can be obtained, the sampling interval can be set according to an actual use scene, for example, 10ms can be set, so that the CPU execution function information obtained by sampling can be closer to the actual function execution condition in the CPU through high-frequency sampling of the CPU calling instruction, and the accuracy of subsequent abnormal position analysis based on the CPU execution function information is ensured. Therefore, the performance of the server and the execution condition of the CPU are simultaneously obtained in the process of the pressure test, the collected execution function information and the server parameter information can be ensured to be in the same time period, and data support is provided for the subsequent abnormal position determination.
In an actual usage scenario, the game server is usually implemented by the engine layer and the script layer, and the functions of different layers are usually implemented in different languages, for example, the functions of the engine layer are usually used for basic underlying logic and usually implemented in C + +, and the functions of the script layer are usually used for upper business logic and usually implemented in scripting languages such as Lua or Python. Therefore, when the game server provides a service, it is generally necessary to go through a function method in the script layer to call a function method in the engine layer or a function method in the engine layer to call a function method in the script layer. In the related art, the pressure test analysis can be performed based on the perf provided by the Linux system, but the perf can only obtain the stack of C + +, so that the analysis of all execution functions is difficult to realize, and the accurate positioning of the exception is difficult to realize.
Based on this, the present disclosure provides the following embodiments. In this embodiment, the sampling interval time samples a CPU call instruction, and an exemplary implementation manner of obtaining the CPU execution function information is as follows, where the step may include:
and intercepting the system call at intervals of the sampling time so as to sample the CPU call instruction. For example, interception of Linux system calls may be implemented based on ptrace. Operating systems, among other things, typically provide services through a set of standard mechanisms called system calls. The system call provides a standard API for accessing underlying hardware and services (such as a file system), and ptrace provides a mechanism for enabling a parent process to observe and control the execution process of a child process, so that the system call of the child process can be tracked, and a CPU call instruction can be obtained. The specific use mode of the ptrace related command is the prior art, and is not described herein again.
And decoding the sampled CPU call instruction to obtain a call link corresponding to the CPU call instruction, wherein the CPU instruction can be decoded by adopting related decoding technology in the field, so that a function required to be called by executing the call instruction and a parent function of the function can be obtained, and the call link is obtained.
And then determining execution layer type information corresponding to an execution function according to the call link, adding the execution layer type information to stack frame information corresponding to the execution function, and taking the updated stack frame information as the CPU execution function information, wherein the execution layer type information comprises an engine layer and a script layer. Wherein the execution function is the last called method in the call link. For example, libunwind may be used to obtain corresponding stack frame information from the intercepted system call, so as to obtain stack frame information of each execution function.
As an example, a first calling method corresponding to a script layer method calling an engine layer method and a second calling method corresponding to an engine layer method calling the script layer method are determined, and the two calling methods are different, so that in one possible embodiment, it may be determined whether a calling link includes the first calling method and the second calling method, and when the link includes the first calling method or the second calling method, execution layer type information corresponding to an execution function may be determined based on the calling method. If the calling method before the execution function and closest to the execution function is the first calling method, the execution layer type information corresponding to the execution function is determined to be the engine layer, and if the calling method before the execution function and closest to the execution function is the second calling method, the execution layer type information corresponding to the execution function is determined to be the script layer.
Illustratively, a calling link is represented as { f1, f2, a, f3, f4, B, f5, a, f6}, where a is used to represent a first calling method, B is used to represent a second calling method, and f1-f6 are used to represent methods in the calling link, so that the executing function f6 can be determined as an executing function in the calling link, and a calling method which is before the executing function and is closest to the executing function is the first calling method a, then the executing layer type information corresponding to the executing function f6 can be determined as an engine layer.
As another example, a file corresponding to the execution function may be determined based on the call link, so that the execution layer type information corresponding to the execution function may be determined based on the type of the file, and if the file corresponding to the execution function is determined to be an xx.c file by the call link, that is, the type of the file is a C language type, the execution layer type information corresponding to the execution function may be determined to be the engine layer. If the file corresponding to the execution function is determined to be the xx.lua file by calling the link, that is, the type of the file is the Lua language type, then the execution layer type information corresponding to the execution function can be determined to be the script layer.
Therefore, by the technical scheme, the system call can be intercepted to obtain the CPU call instruction, and the call instruction is decoded, so that the execution function based on different languages contained in the CPU call instruction can be obtained, the comprehensiveness of pressure test data acquisition is improved, and the accuracy of subsequent pressure test result analysis is improved. Meanwhile, in the embodiment, the execution layer type information corresponding to the execution function can be identified, and the execution layer type information is added to the stack frame information corresponding to the execution function, so that the execution function can be classified and analyzed in the subsequent data analysis process, and accurate and reliable data support is provided for the subsequent determination of the position corresponding to the abnormality.
In a possible embodiment, the exemplary implementation manner of determining the abnormality existing in the server under pressure and the abnormality position corresponding to the abnormality according to the server parameter information and the CPU execution function information may include:
and under the condition that the server parameter information meets the abnormal condition, determining that the compressed server is abnormal, and determining the time period when the server parameter information meets the abnormal condition as an abnormal time period.
For example, for each piece of server parameter information, the corresponding exception condition may be that the server parameter information exceeds the corresponding exception threshold, and the exception threshold may be preset according to an actual usage scenario, if the exception threshold corresponding to the CPU occupancy information is 75%, it may be determined that the pressurized server is abnormal when the CPU occupancy information is greater than 75%, and at the same time, it may be determined that the exception is CPU occupancy exception. The manner of determining whether the other parameter information is abnormal is the same as that described above, and is not described herein again.
And determining the sampling times corresponding to each execution function in the abnormal time period.
In this embodiment, a corresponding abnormal time period may be determined according to the abnormality, so that the execution function information corresponding to the abnormal time period may be extracted from the CPU execution information acquired in the pressure test process for analysis, and each execution function information in the abnormal time period may be counted, thereby determining the sampling frequency corresponding to each execution function therein.
For each execution function, determining the ratio of the sampling times to the total sampling times of the execution function in the abnormal time period as an abnormal value corresponding to the execution function;
and determining the execution function with the corresponding abnormal value larger than a preset threshold value as an abnormal function, and determining the position corresponding to the abnormal function as the abnormal position.
If the ratio of the sampling frequency of a certain execution function to the sampling frequency of the execution function in the abnormal time period is greater than a preset threshold, that is, the execution time of the execution function in the abnormal time period is longer, the abnormal time period may be caused by the execution function, and the execution function may be determined to be an abnormal function in this case.
As an example, the location corresponding to the execution function may be a file corresponding to the execution function, and if the execution function E is located in the file xx.c, the determined abnormal location may be the xx.c file. As another example, the location corresponding to the execution function may be a file corresponding to the execution function and a line number of the execution function in the file, and if the execution function E is located in an nth line of the file xx.c, the determined exception location may be xx.c/N.
Therefore, by the technical scheme, the information of the CPU execution function in the abnormal time period can be analyzed, so that the reason causing the abnormality can be determined from the angle of the CPU execution function, the abnormal problem and the reason causing the abnormality can be accurately positioned, the accuracy and the precision of positioning the abnormal reason can be effectively improved, the user can be accurately prompted about the abnormal position, a worker can conveniently and timely accurately check the abnormality and make a corresponding solution, and the accuracy and the efficiency of the pressure testing method are improved.
As shown above, in the stack frame information corresponding to the execution function, the stack frame information may include execution layer type information corresponding to the execution function, and accordingly, in the above example, the exception location may further include execution layer type information corresponding to the execution function, for example, the exception location may be "xx.c/N: an engine layer ". In the in-service use process, because the engine layer and the script layer are usually developed by different developers, when the abnormal position is determined, the abnormal position can be prompted, corresponding developers can be prompted, the use requirements of the user are further fitted, and the use experience of the user is improved.
In one possible embodiment, the method may further comprise:
and generating a flame map (FlameGraph) according to the CPU execution function information in the time period corresponding to the abnormality, and displaying the flame map.
In this embodiment, the CPU execution function information may include a name of a function being executed by the CPU and a call stack (stack), so that a corresponding flame map may be generated based on the CPU execution function information. Which may be generated based on flame map generation tools commonly used in the art, and is not limited by the present disclosure.
Wherein, in the flame diagram, the y-axis direction is used to represent the call stack, and each layer is a function. The deeper the call stack, the higher the flame, the top is the function that is being executed and the bottom is the parent function of the function. The x-axis direction is used to indicate the number of samples, and if the width occupied by a function on the x-axis is wider, it indicates that it is decimated more times, i.e., executed for a longer time. If a "flat top" occurs in the flame diagram, indicating that the CPU is performing the same function during that time period, the function at that flat top may present performance problems. Therefore, in the embodiment, the collected CPU execution function is displayed through the flame diagram, so that the user can clearly determine the function execution process in the CPU in the pressure test process, and the user can accurately analyze the pressure test result.
The present disclosure also provides a pressure testing device, as shown in fig. 4, the device 10 includes:
the first display module 100 is configured to display a pressure measurement information configuration page, where the pressure measurement information configuration interface carries a plurality of pressure measurement configuration parameter items;
a processing module 200, configured to obtain parameter information input for a pressure measurement configuration parameter item on the pressure measurement information configuration page, generate a pressure measurement instruction according to the obtained parameter information in response to a configuration completion operation, and send the pressure measurement instruction to a pressure application server, where the pressure measurement instruction is used to start a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server;
an obtaining module 300, configured to obtain server parameter information and CPU execution function information of the compressed server in a pressure test execution process, where the CPU execution function information includes execution layer type information corresponding to a function;
a determining module 400, configured to determine, according to the server parameter information and the CPU execution function information, an exception existing in the compressed server and an exception location corresponding to the exception.
Optionally, the pressure measurement configuration parameter item includes a server setting item, and the server setting item includes a pressure server setting item and a pressure server setting item;
the processing module comprises:
the display sub-module is used for responding to the selection operation of the user aiming at the server setting item in the pressure measurement information configuration page and displaying the connected server corresponding to the server setting item;
and the generation submodule is used for responding to the selection operation of the user on the server, acquiring the parameter information corresponding to the selected server, and generating the pressure measurement instruction according to the parameter information.
Optionally, the apparatus further comprises:
the second display module is used for displaying a server adding page, wherein the server adding page bears a server parameter configuration item;
the generating module is used for responding to the input operation of a user in the server adding page aiming at a target configuration item in the server parameter configuration items, and generating server connection information corresponding to a server to be connected according to the target configuration item and the content input by the user, wherein the server connection information is used for establishing communication connection with the server to be connected;
and the connection module is used for connecting the servers to be connected based on the server connection information.
Optionally, the obtaining module includes:
the acquisition submodule is used for acquiring server parameter information corresponding to the compressed server based on a service monitoring system, wherein the server parameter information comprises performance parameter information corresponding to the compressed server and performance parameter information corresponding to an execution process in the compressed server;
and the sampling submodule is used for sampling a CPU call instruction at intervals of sampling time in the process of acquiring the server parameter information by the service monitoring system to acquire the CPU execution function information.
Optionally, the sampling sub-module comprises:
the intercepting submodule is used for intercepting the system call at intervals of the sampling time so as to sample the CPU call instruction;
the decoding submodule is used for decoding the target CPU calling instruction obtained by sampling to obtain a calling link corresponding to the target CPU calling instruction;
and the first determining submodule is used for determining execution layer type information corresponding to an execution function according to the call link, adding the execution layer type information into stack frame information corresponding to the execution function, and taking the updated stack frame information as the CPU execution function information, wherein the execution layer type information comprises an engine layer and a script layer.
Optionally, the determining module includes:
the second determining submodule is used for determining that the pressurized server is abnormal under the condition that the server parameter information meets the abnormal condition, and determining the time period when the server parameter information meets the abnormal condition as an abnormal time period;
a third determining submodule, configured to determine a sampling frequency corresponding to each of the execution functions in the abnormal time period;
a fourth determining sub-module, configured to determine, for each execution function, a ratio between the sampling frequency and a total sampling frequency of the execution function in the abnormal time period as an abnormal value corresponding to the execution function;
and the fifth determining submodule is used for determining the execution function of which the corresponding abnormal value is greater than the preset threshold value as an abnormal function and determining the function position corresponding to the abnormal function as the abnormal position.
The present disclosure also provides a pressure testing system, as shown in fig. 5, the pressure testing system including:
the pressure testing device 10 is used for displaying a pressure testing information configuration page, and a plurality of pressure testing configuration parameter items are loaded on the pressure testing information configuration page; acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server; acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in a pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function; determining the abnormality of the compressed server and the abnormal position corresponding to the abnormality according to the server parameter information and the CPU execution function information;
the pressure application server 20 is in communication connection with the pressure testing device and used for starting a target number of simulation clients according to the received pressure testing instruction, so that the simulation clients execute a target script to log in the pressure server;
and the pressure server 30 establishes communication connection with the pressure testing device and is used for providing service for the simulation client so that the pressure testing device can obtain the server parameter information and the CPU execution function information.
Referring now to FIG. 6, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing device (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage device 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: displaying a pressure measurement information configuration page, wherein the pressure measurement information configuration page is loaded with a plurality of pressure measurement configuration parameter items; acquiring parameter information input by a pressure measurement configuration parameter item on a pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute target scripts to log in the pressure application server; acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function; and determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Here, the name of the module does not constitute a limitation to the module itself in some cases, and for example, the first display module may also be described as a "module displaying a pressure measurement information configuration page".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides a pressure testing method according to one or more embodiments of the present disclosure, wherein the method includes:
displaying a pressure measurement information configuration page, wherein a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration page;
acquiring parameter information input by a pressure measurement configuration parameter item on a pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server;
acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function;
and determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
Example 2 provides the method of example 1, the pressure measurement configuration parameter items including server setting items including an applying server setting item and a pressure server setting item;
the acquiring the parameter information input by the pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to the configuration completion operation, and generating the pressure measurement instruction according to the acquired parameter information includes:
responding to the selection operation of a user on the server setting item in the pressure measurement information configuration page, and displaying a connected server corresponding to the server setting item;
and responding to the selection operation of the user on the server, acquiring the parameter information corresponding to the selected server, and generating the pressure measurement instruction according to the parameter information.
Example 3 provides the method of example 2, further comprising, in accordance with one or more embodiments of the present disclosure:
displaying a server adding page, wherein the server adding page bears server parameter configuration items;
responding to an input operation of a user in the server adding page and aiming at a target configuration item in the server parameter configuration items, and generating server connection information corresponding to a server to be connected according to the target configuration item and the content input by the user, wherein the server connection information is used for establishing communication connection with the server to be connected;
and connecting the server to be connected based on the server connection information.
Example 4 provides the method of example 1, wherein the obtaining server parameter information and Central Processing Unit (CPU) execution function information of the server under pressure during the execution of the stress test comprises:
acquiring server parameter information corresponding to the compressed server based on a service monitoring system, wherein the server parameter information comprises performance parameter information corresponding to the compressed server and performance parameter information corresponding to an execution process in the compressed server;
and sampling a CPU call instruction at intervals of sampling time in the process of acquiring the server parameter information by the service monitoring system to acquire the CPU execution function information.
Example 5 provides the method of example 4, wherein sampling the CPU call instruction at the interval sampling time to obtain the CPU execution function information, according to one or more embodiments of the present disclosure, includes:
intercepting system calls at intervals of the sampling time so as to sample the CPU call instruction;
decoding a target CPU calling instruction obtained by sampling to obtain a calling link corresponding to the target CPU calling instruction;
determining execution layer type information corresponding to an execution function according to the call link, adding the execution layer type information to stack frame information corresponding to the execution function, and taking the updated stack frame information as the CPU execution function information, wherein the execution layer type information comprises an engine layer and a script layer.
Example 6 provides the method of any one of examples 1 to 5, wherein the determining, according to the server parameter information and the CPU execution function information, the abnormality existing in the compressed server and an abnormality position corresponding to the abnormality includes:
determining that the compressed server is abnormal under the condition that the server parameter information meets an abnormal condition, and determining the time period when the server parameter information meets the abnormal condition as an abnormal time period;
determining the sampling times corresponding to each execution function in the abnormal time period;
for each execution function, determining the ratio of the sampling times to the total sampling times of the execution function in the abnormal time period as an abnormal value corresponding to the execution function;
and determining the execution function with the corresponding abnormal value larger than a preset threshold value as an abnormal function, and determining the function position corresponding to the abnormal function as the abnormal position.
Example 7 provides, in accordance with one or more embodiments of the present disclosure, a pressure testing apparatus, the apparatus comprising:
the first display module is used for displaying a pressure measurement information configuration page, and a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration page;
the processing module is used for acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server;
the acquisition module is used for acquiring server parameter information and CPU execution function information of the compressed server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function;
and the determining module is used for determining the abnormity existing in the pressure server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
Example 8 provides, in accordance with one or more embodiments of the present disclosure, a stress testing system, comprising:
the pressure testing device is used for displaying a pressure testing information configuration page, and a plurality of pressure testing configuration parameter items are loaded on the pressure testing information configuration page; acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server; acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function; determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information;
the pressure application server is in communication connection with the pressure testing device and used for starting a target number of simulation clients according to the received pressure testing instruction so that the simulation clients execute a target script to log in the pressure application server;
and the pressure server is in communication connection with the pressure testing device and is used for providing service for the simulation client so that the pressure testing device can acquire the server parameter information and the CPU execution function information.
Example 9 provides a computer readable medium having stored thereon a computer program that, when executed by a processing apparatus, performs the steps of the method of any of examples 1-6, in accordance with one or more embodiments of the present disclosure.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of any of examples 1-6.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A method of pressure testing, the method comprising:
displaying a pressure measurement information configuration page, wherein a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration page;
acquiring parameter information input by a pressure measurement configuration parameter item on a pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute target scripts to log in the pressure application server;
acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in a pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function;
and determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
2. The method of claim 1, wherein the pressure measurement configuration parameter items comprise server setting items, and the server setting items comprise pressure server setting items and pressure server setting items;
the acquiring the parameter information input by the pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to the configuration completion operation, and generating the pressure measurement instruction according to the acquired parameter information includes:
responding to the selection operation of a user for the server setting item in the pressure measurement information configuration page, and displaying a connected server corresponding to the server setting item;
and responding to the selection operation of the user on the server, acquiring the parameter information corresponding to the selected server, and generating the pressure measurement instruction according to the parameter information.
3. The method of claim 2, further comprising:
displaying a server adding page, wherein the server adding page bears a server parameter configuration item;
responding to an input operation of a user in the server adding page and aiming at a target configuration item in the server parameter configuration items, and generating server connection information corresponding to a server to be connected according to the target configuration item and the content input by the user, wherein the server connection information is used for establishing communication connection with the server to be connected;
and connecting the server to be connected based on the server connection information.
4. The method according to claim 1, wherein the obtaining of server parameter information and CPU execution function information of the server under pressure during the execution of the stress test comprises:
acquiring server parameter information corresponding to the compressed server based on a service monitoring system, wherein the server parameter information comprises performance parameter information corresponding to the compressed server and performance parameter information corresponding to an execution process in the compressed server;
and sampling a CPU call instruction at intervals of sampling time in the process of acquiring the server parameter information by the service monitoring system to acquire the CPU execution function information.
5. The method of claim 4, wherein sampling CPU call instructions at the interval sampling time to obtain the CPU execution function information comprises:
intercepting system calls at intervals of the sampling time so as to sample the CPU call instruction;
decoding a target CPU calling instruction obtained by sampling to obtain a calling link corresponding to the target CPU calling instruction;
determining execution layer type information corresponding to an execution function according to the call link, adding the execution layer type information to stack frame information corresponding to the execution function, and taking the updated stack frame information as the CPU execution function information, wherein the execution layer type information comprises an engine layer and a script layer.
6. The method according to any one of claims 1 to 5, wherein the determining, according to the server parameter information and the CPU execution function information, the abnormality existing in the compressed server and the abnormality position corresponding to the abnormality comprises:
determining that the compressed server is abnormal under the condition that the server parameter information meets an abnormal condition, and determining the time period when the server parameter information meets the abnormal condition as an abnormal time period;
determining the sampling times corresponding to each execution function in the abnormal time period;
for each execution function, determining the ratio of the sampling times to the total sampling times of the execution function in the abnormal time period as an abnormal value corresponding to the execution function;
and determining the execution function with the corresponding abnormal value larger than a preset threshold value as an abnormal function, and determining the function position corresponding to the abnormal function as the abnormal position.
7. A pressure testing apparatus, the apparatus comprising:
the system comprises a first display module, a second display module and a display module, wherein the first display module is used for displaying a pressure measurement information configuration page, and a plurality of pressure measurement configuration parameter items are loaded on the pressure measurement information configuration interface;
the processing module is used for acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server, wherein the pressure measurement instruction is used for starting a target number of simulation clients in the pressure application server, so that the simulation clients execute a target script to log in the pressure application server;
the acquisition module is used for acquiring server parameter information and CPU execution function information of the compressed server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function;
and the determining module is used for determining the abnormity existing in the pressure server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information.
8. A pressure testing system, comprising:
the pressure testing device is used for displaying a pressure testing information configuration page, and a plurality of pressure testing configuration parameter items are loaded on the pressure testing information configuration page; acquiring parameter information input by a pressure measurement configuration parameter item on the pressure measurement information configuration page, responding to configuration completion operation, generating a pressure measurement instruction according to the acquired parameter information, and sending the pressure measurement instruction to a pressure application server; acquiring server parameter information and CPU (central processing unit) execution function information of the pressure server in the pressure test execution process, wherein the CPU execution function information comprises execution layer type information corresponding to a function; determining the abnormity existing in the compressed server and the abnormal position corresponding to the abnormity according to the server parameter information and the CPU execution function information;
the pressure application server is in communication connection with the pressure testing device and used for starting a target number of simulation clients according to the received pressure testing instruction so that the simulation clients execute a target script to log in the pressure application server;
and the pressure server is in communication connection with the pressure testing device and is used for providing service for the simulation client so that the pressure testing device can acquire the server parameter information and the CPU execution function information.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 6.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 6.
CN202110765927.4A 2021-07-05 2021-07-05 Pressure testing method, device, system, medium and electronic equipment Pending CN115587019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110765927.4A CN115587019A (en) 2021-07-05 2021-07-05 Pressure testing method, device, system, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110765927.4A CN115587019A (en) 2021-07-05 2021-07-05 Pressure testing method, device, system, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115587019A true CN115587019A (en) 2023-01-10

Family

ID=84771685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110765927.4A Pending CN115587019A (en) 2021-07-05 2021-07-05 Pressure testing method, device, system, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115587019A (en)

Similar Documents

Publication Publication Date Title
CN108900776B (en) Method and apparatus for determining response time
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN111177617A (en) Web direct operation and maintenance method and device based on operation and maintenance management system and electronic equipment
CN110716853A (en) Test script recording method, application program testing method and related device
CN112328419A (en) Test case generation method and device for remote procedure call interface, storage medium and electronic equipment
CN113485918B (en) Test method, test device, electronic equipment and storage medium
CN112597047A (en) Test method, test device, electronic equipment and computer readable medium
CN111930709B (en) Data storage method, apparatus, electronic device, and computer readable medium
CN113806212A (en) Application program exception positioning method and device and electronic equipment
CN112306857A (en) Method and apparatus for testing applications
CN110764983A (en) Test method, device, medium and electronic equipment
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN113144620A (en) Detection method, device, platform, readable medium and equipment for frame synchronization game
CN109947659B (en) System, method and apparatus for testing applications
CN114510305B (en) Model training method and device, storage medium and electronic equipment
CN115587019A (en) Pressure testing method, device, system, medium and electronic equipment
CN115576805A (en) Log display method and device, readable medium and electronic equipment
CN114564402A (en) Task flow testing method and device, readable medium and electronic equipment
CN114116480A (en) Method, device, medium and equipment for determining application program test coverage rate
CN116257422A (en) Self-test case generation method and device and electronic equipment
CN113849416A (en) Test method, test device, storage medium and electronic equipment
CN112306858A (en) Test method and device and electronic equipment
CN115391770A (en) Program monitoring method, device, electronic equipment and computer readable storage medium
CN112379967A (en) Simulator detection method, device, equipment and medium
CN116594685A (en) Applet delivery method, applet delivery apparatus, electronic device, and computer readable medium

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