Method and device for testing pressure

A stress testing and stress technology, applied in the direction of software testing/debugging, etc., can solve problems such as difficult to exhaust the throughput of network cards, difficult to meet high test pressure requirements, difficult to reach the limit of physical network cards, etc., to meet high test pressure. effect of demand

Active Publication Date: 2014-01-29
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF3 Cites 9 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 testing pressure
  • Method and device for testing pressure

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 device structure diagram of the stress test provided by the second embodiment of the present invention, when forming the stress test device, first configure a pressure file, the pressure file 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 pressure file is very simple, and each unit consists of packet size information and binary data packets. like figure 2 As shown, the apparatus may include: a preprocessing unit 200 , an initialization unit 201 , a connection setting unit 202 , a statistics unit 203 , a sending pressure unit 204 and a receiving analysis thread 205 .

[0071] The preprocessing unit 200 is configured to open the limit on the number of file handles, and add at least one of terminal line hang-up, interrupt process, software termination signal and establishment core file termination process signal to the signal triggering forced exit or ...

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 invention provides a method and device for testing pressure. The method comprises the steps that initialization is firstly conducted, wherein a reading connection pool and a writing connection pool of the epoll are initialized, application for a data area cache is conducted according to preset user customized parameters, and a data package is loaded to the cache from a pressure file; with regard to connection established with a module to be tested, data are read and written in a level triggered mode and trigger events of data reading and data writing are arranged and the connection is added to the reading connection pool and the writing connection pool; the pressure condition is counted at regular time through a counting thread and transmission of pressure data is stimulated at regular time through effective global variables which are continuously transmitted through set identification; after the trigger event of data writing is monitored through a pressure transmission thread, if the global variables are effective, the pressure data in the cache are transmitted to the module to be tested in a polling mode until the pressure number of the transmission period is achieved, and then the global variables are set ineffective. According to the method and device for testing the pressure, the high pressure testing requirement can be satisfied and the phenomenon that the tested pressure reaches the limit of a physical network card becomes possible.

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 Applications(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