Method and device for stress testing

A pressure test and pressure technology, applied in software testing/debugging, etc., can solve problems such as exhaustion of network card throughput, difficulty in meeting high test pressure requirements, difficulty in reaching the limit of physical network card, etc., to meet high test pressure effect of demand

Active Publication Date: 2017-12-12
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Existing stress testing tools, whether applied to windows or Linux, use the method of sending a set number of data packets at a set time interval for stress testing, but this method is often difficult to meet the high test pressure requirements, and it is also difficult It is difficult to use up the throughput of the network card, that is, it is difficult to reach the limit of the physical network card

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for stress testing
  • Method and device for stress testing

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] When forming a pressure tool, first configure the pressure file, which is the data source of the pressure tool, and in the embodiment of the present invention is a constructed binary data package. The content format of the stress file is very simple, and each unit is composed of data packet size information and binary data packets. The stress file shields the difference of the data packets. If the first 4 bytes of each unit are set as the data packet size information, the stress tool can first read the first 4 bytes to determine the data when sending the data packets during the subsequent stress test. Packet size, and then read the data packet and send it to the program under test. This is true for each data packet.

[0043] When the user conducts a stress test, he first needs to customize the stress tool, that is, set user-defined parameters, including: the destination address corresponding to the program under test (usually ip address and port, some private protocols ...

Embodiment 2

[0070] figure 2 The structure diagram of the stress test device provided for the second embodiment of the present invention, when forming the stress test device, first configure the stress file, which is the data source of the stress tool, and in the embodiment of the present invention is the constructed binary data package . The content format of the stress file is very simple, and each unit is composed of data packet size information and binary data packets. like figure 2 As shown, the device may include: a preprocessing unit 200 , an initialization unit 201 , a connection setting unit 202 , a statistical unit 203 , a sending pressure unit 204 and a receiving analysis thread 205 .

[0071] The preprocessing unit 200 is used to limit the number of open file handles, and add at least one of terminal line hangup, interrupt process, software termination signal and core file termination process signal to the signal that triggers forced exit or abnormal exit.

[0072] Since t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention provides a method and device for stress testing, firstly initialize: initialize the read connection pool and write connection pool of epoll, apply for data area cache according to preset user-customized parameters, and load data packets from the pressure file to the cache ;For the connection set up with the module under test, use the level trigger mode to read data and write data and set the trigger events for reading data and writing data, and add the connection to the reading connection pool and writing connection pool; statistical thread timing statistics pressure status, and regularly activate the sending of pressure data by setting the global variable that identifies the continued sending to be valid; after the sending pressure thread monitors the trigger event of writing data, if the global variable is valid, it will poll and send the pressure data in the cache to the Test the module until the pressure number of this sending cycle is reached, and set the global variable as invalid. The invention can meet the requirement of high test pressure and make it possible for the test pressure to reach the limit of the physical network card.

Description

【Technical field】 [0001] The invention relates to the technical field of computer applications, in particular to a method and device for stress testing. 【Background technique】 [0002] Stress testing is an important part of software testing and is used to test the processing capabilities of programs. Usually, when performing a stress test, a stress tool is required to send data packets to the program under test for processing, and check the performance of the program under test under the current pressure. [0003] Existing stress testing tools, whether applied to windows or Linux, use the method of sending a set number of data packets at a set time interval for stress testing, but this method is often difficult to meet the high test pressure requirements, and it is also difficult It is difficult to use up the throughput of the network card, that is, it is difficult to reach the limit of the physical network card. 【Content of invention】 [0004] The invention provides a p...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
Inventor 张亮朱星陶仕敏
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products