CN107835101A - Method and device, the terminal of pressure test are carried out to server - Google Patents

Method and device, the terminal of pressure test are carried out to server Download PDF

Info

Publication number
CN107835101A
CN107835101A CN201710974803.0A CN201710974803A CN107835101A CN 107835101 A CN107835101 A CN 107835101A CN 201710974803 A CN201710974803 A CN 201710974803A CN 107835101 A CN107835101 A CN 107835101A
Authority
CN
China
Prior art keywords
thread
server
value
flow value
theoretical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710974803.0A
Other languages
Chinese (zh)
Other versions
CN107835101B (en
Inventor
朱晓群
陈方毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Mei You Information Technology Co Ltd
Original Assignee
Xiamen Mei You Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Mei You Information Technology Co Ltd filed Critical Xiamen Mei You Information Technology Co Ltd
Priority to CN201710974803.0A priority Critical patent/CN107835101B/en
Publication of CN107835101A publication Critical patent/CN107835101A/en
Application granted granted Critical
Publication of CN107835101B publication Critical patent/CN107835101B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Abstract

Present invention is disclosed a kind of method and device, terminal that pressure test is carried out to server, belong to Computer Applied Technology field.Methods described includes:It is the task requests that thread runs quantity by initiating number of threads to server, obtain actual flow value when server runs the thread of the thread operation quantity, pass through the actual flow value and the theoretical delivery value when server operation thread runs the thread of quantity under default single thread pressure measurement of discharge, it is determined that the regulation quantity of quantity is run to the thread, the thread operation quantity is adjusted according to the regulation quantity, until the amplitude of variation of the actual flow value is in default fluctuation range when thread operation quantity is adjusted, and determine the extreme bandwidth flow that final actual flow value is server.Above-mentioned method and device, the terminal that pressure test is carried out to server can save the time that pressure test is carried out to server, improve the efficiency that pressure test is carried out to server.

Description

Method and device, the terminal of pressure test are carried out to server
Technical field
The present invention relates to Computer Applied Technology field, it is more particularly to a kind of to server carry out pressure test method and Dress, terminal.
Background technology
With the high speed development of Internet technology, the requirement more and more higher of performance and stability to server.Therefore exist Need to carry out pressure test to server before server use or during use, to know the extreme bandwidth stream of server Amount.And the extreme bandwidth flow of server is related to the thread operation quantity in server, when the number of threads of initiation surpasses When crossing thread operation quantity, more than thread operation quantity thread then in queueing condition and can not actual motion, and make service Device is in overload and influences the performance of server.
At present, when carrying out pressure test to server, quantity is run by the thread of manual adjustment server, to service The thread operation quantity of device carries out amendment step by step, makes all to run to the number of threads that server is initiated and server is in Under extreme bandwidth flow status, so as to know the extreme bandwidth flow of server and corresponding thread operation quantity.
However, when carrying out pressure test to server by craft, whole pressure test scheme, which needs to undergo to formulate, to be surveyed Examination plan, the processes such as test case, implementation of test cases are write, and for different servers, it is necessary to write test case It is not quite similar, and manually can only progressively changes test case and adjust the number of threads initiated to server, so as to causes The workload of pressure test is very big, expends the longer pressure test time.
The content of the invention
In order to solve technical problem longer to the time of server progress pressure test in correlation technique, the present invention provides A kind of method and device that pressure test is carried out to server.
First aspect, there is provided a kind of method that pressure test is carried out to server, including:
It is the task requests that thread runs quantity by initiating number of threads to server, obtains server and run the line Actual flow value during the thread of Cheng Yunhang quantity;
Pass through the actual flow value and the server operation thread fortune under default single thread pressure measurement of discharge Theoretical delivery value during the thread of line number amount, it is determined that running the regulation quantity of quantity to the thread;
The thread operation quantity is adjusted according to the regulation quantity, until when thread operation quantity is adjusted The amplitude of variation of the actual flow value is in default fluctuation range;
It is determined that the final actual flow value is the extreme bandwidth flow of server.
Second aspect, there is provided a kind of device that pressure test is carried out to server, including:
Actual flow value acquisition module, for being asked by initiating the task that number of threads is thread operation quantity to server Ask, obtain actual flow value when server runs the thread of the thread operation quantity;
Quantity determining module is adjusted, for by the actual flow value and in the case where default single thread presses measurement of discharge Server runs the theoretical delivery value during thread of the thread operation quantity, it is determined that running the regulation number of quantity to the thread Amount;
Thread runs quantity regulating module, quantity is run for adjusting the thread according to the regulation quantity, until right The amplitude of variation of the actual flow value is in default fluctuation range when the thread operation quantity is adjusted;
Extreme bandwidth flow determining module, for determining extreme bandwidth stream of the final actual flow value for server Amount.
The third aspect, there is provided a kind of intelligent terminal, including:
At least one processor;And
The memory being connected with least one processor communication;Wherein,
The memory storage has can be by the instruction of at least one computing device, and the instruction is by described at least one Individual computing device, so that at least one processor is able to carry out the method as described in any one of first aspect.
Fourth aspect, there is provided a kind of computer-readable recording medium, be stored thereon with computer program, the computer The method that pressure test is carried out to server according to any one of first aspect is realized when program is executed by processor.
The technical scheme provided by embodiments of the invention can obtain following beneficial effect:
When carrying out pressure test to server, by initiating the task requests of thread operation quantity to server, according to The actual flow value of server and theoretical delivery value, the thread operation quantity of dynamic regulation server, until changing thread operation During quantity, the actual flow value of server is not changed substantially, and quantity is run so as to carry out server thread by dynamic Regulation, quickly know the extreme bandwidth flow and corresponding thread operation quantity of server, greatly save and server is carried out The time of pressure test, improve the efficiency that pressure test is carried out to server.
It should be appreciated that the general description and following detailed description of the above are only exemplary, the present invention not by Limitation.
Brief description of the drawings
Accompanying drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the present invention Example, and for explaining principle of the invention together with specification.
Fig. 1 is the schematic diagram of an implementation environment according to involved by the disclosure.
Fig. 2 is a kind of method flow diagram that pressure test is carried out to server according to an exemplary embodiment
Fig. 3 is one according to step S110 in the corresponding methods that pressure test is carried out to server for implementing to exemplify of Fig. 2 Kind specific implementation flow chart.
Fig. 4 is one according to step S120 in the corresponding methods that pressure test is carried out to server for implementing to exemplify of Fig. 2 Kind specific implementation flow chart.
Fig. 5 is to carry out pressure survey to server shown in the another exemplary embodiment for correspondingly implementing to exemplify according to Fig. 2 The method flow diagram of examination.
Fig. 6 is a kind of block diagram of device that pressure test is carried out to server according to an exemplary embodiment.
Fig. 7 is to implement to exemplify actual flow value acquisition in the device that pressure test is carried out to server according to Fig. 6 is corresponding A kind of specific implementation block diagram of module 110.
Fig. 8 is to exemplify regulation quantity in the device for carrying out server pressure test according to the corresponding implementations of Fig. 6 to determine mould A kind of specific implementation block diagram of block 120.
Fig. 9 is that the another of regulation quantity determining module 120 for correspondingly being implemented to exemplify according to Fig. 8 implements block diagram.
Figure 10 is the structural frames according to the corresponding another devices that pressure test is carried out to server for implementing to exemplify of Fig. 6 Figure.
Figure 11 is a kind of block diagram of terminal according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following exemplary is implemented Embodiment described in example does not represent all embodiments consistent with the present invention.On the contrary, they are only and such as institute The example of the consistent apparatus and method of described, of the invention some aspects in attached claims.
Fig. 1 is the schematic diagram of an implementation environment according to involved by the disclosure.The implementation environment includes:Terminal 100 with And the server 200 of mutual data transfer is carried out with terminal 100.
Interrelational form between terminal 100 and server 200, including but not limited to the wireless networks such as WiFi or wired The data correlation mode come and gone therebetween of real-time performance, specific interrelational form are not limited by the present embodiment.
Terminal 100 initiates the task requests of certain number of threads to server 200, and the Thread Count is run in server 200 The actual flow value of server is obtained after the thread of amount;And then according to actual flow value with run the number of threads thread when The thread operation quantity of theoretical delivery value dynamic regulation server 200, until actual when thread operation quantity is adjusted flow The amplitude of variation of value is in default fluctuation range.
Terminal 100 can be the computer equipments such as mobile phone, computer, and specific implementation is not limited by the present embodiment.
Fig. 2 is a kind of method flow diagram that pressure test is carried out to server according to an exemplary embodiment, such as Shown in Fig. 2, the method that pressure test is carried out to server may comprise steps of.
In step s 110, it is the task requests that thread runs quantity by initiating number of threads to server, obtains clothes Actual flow value during the thread for device active thread operation quantity of being engaged in.
Terminal to server sends task requests, and thread process will be established after the task requests of server receiving terminal and is appointed Business.
It should be noted that the thread that server is established for the task requests of terminal runs quantity by the work with task Amount is related, that is to say, that the workload of task is bigger, and the thread operation quantity that server is established is also more.
And after server reaches capacity state, even if thread is established for the task requests continued to, but to this portion Separated time journey can not but be run, and can only be put into buffer queue and be ranked, and the number of threads now run in server will be kept Constant, server is in limiting condition.
Actual flow value is reality output bandwidth traffic of the server when active thread runs quantity.Normally, even if Keeping thread to run, quantity is constant, and actual flow value is also to be fluctuated in a less amplitude range.
Can randomly select server during actual flow value when obtaining the thread of server active thread operation quantity Reality output bandwidth traffic at a time, using the reality output bandwidth traffic as actual flow value;It can also be basis Predetermined time interval obtains the reality output bandwidth traffic of server, and then by multiple reality output bandwidth traffics of acquisition Average value is as actual flow value;When can also be the thread for obtaining server active thread operation quantity by other means Actual flow value.
When initiating the task requests that number of threads is thread operation quantity to server, thread operation quantity can be random Set, can also experience and a relatively reasonable quantity setting, can also be the number set in other way Value.
In the step s 120, line is run by server under comparing actual flow value and pressing measurement of discharge in default single thread Theoretical delivery value during the thread of Cheng Yunhang quantity, it is determined that running the regulation quantity of quantity to thread.
Single thread pressure measurement of discharge is set in advance.
Theoretical delivery value is the line that the server active thread for pressing measurement of discharge to calculate according to default single thread runs quantity Reality output bandwidth traffic during journey.
For example, default single thread pressure measurement of discharge is 1MB/S, and when thread operation quantity is 10, the theoretical stream of server Value is 10MB/S.
Regulation quantity is to run quantity to the thread of server according to the gap between actual flow value and theoretical delivery value The number of threads being changed.
Can obtain the difference between actual flow value and theoretical delivery value when comparing actual flow value with theoretical delivery value Ratio between value or acquisition actual flow value and theoretical delivery value, can also be other manner of comparison, herein not Manner of comparison between actual flow value and theoretical delivery value is defined.
In step s 130, according to regulation quantity regulation thread operation quantity, until thread operation quantity is adjusted When actual flow value amplitude of variation in the range of default change.
The thread of server is run by adjusting quantity after quantity is adjusted, then obtain thread operation number after adjustment The actual flow value of server and theoretical delivery value during amount, and to continuing to actual flow value compared with theoretical delivery value, It is determined that the new regulation quantity that thread operation quantity is adjusted, so as to by being run again and again to the thread of server Quantity is adjusted, until the amplitude of variation of actual flow value exists when the thread operation quantity to server carries out quantity regulation In the range of default change, that is, stop the regulation of thread operation quantity.
When the thread operation quantity to server carries out quantity regulation, the amplitude of variation of actual flow value changes default In the range of change, i.e., quantity is run by changing the thread of server, and the actual flow value of server no longer changes substantially, says The output bandwidth flow of prescribed server has reached capacity state.
For example, when initiating the task requests that number of threads is 100 to server, the actual flow value of server is 100MB/S, when initiating the task requests that number of threads is 110 to server, the actual flow value of server is 110MB/S, But when initiating the task requests that number of threads is 120 to server, the actual flow value of server is still 110MB/S, then says Prescribed server has reached capacity state when running 110 threads.
In step s 130, it is determined that final actual flow value is the extreme bandwidth flow of server.
Using method as described above, by initiating the task requests of thread operation quantity to server, according to server Actual flow value and theoretical delivery value, the thread operation quantity of dynamic regulation server, until when changing thread operation quantity, The actual flow value of server does not change substantially, so as to carry out the regulation of server thread operation quantity by dynamic, soon Speed knows the extreme bandwidth flow and corresponding thread operation quantity of server, greatlys save and carries out pressure test to server Time, improve to server carry out pressure test efficiency.
Fig. 3 is the thin of step S110 in the method that pressure test is carried out to server exemplified according to the corresponding implementations of Fig. 2 Section description.As shown in figure 3, step S110 may comprise steps of.
In step S111, according to the peak flow values of server, the reason in the case where default single thread presses measurement of discharge is calculated By total number of threads.
The peak flow values of server are due to that the hardware performance of server network interface card determines.
In a specific exemplary embodiment, terminal can obtain server by sending specific order to server Peak flow values.
For example, terminal by SSH2 agreements+Linux command (such as:Sar-n DEV...) server can be carried out most The acquisition of big flow value.
Theoretical total number of threads is the number of threads that server can be run simultaneously in theory.
For example, single thread pressure measurement of discharge is 1MB/S, the peak flow values of server are 100MB/S, then theoretical total number of threads For 100.
In step S112, it is the task that thread runs quantity to initiate number of threads to server according to theoretical total number of threads Request.
Determine that thread runs quantity according to theoretical total number of threads, and then it is that thread runs number to send number of threads to server The task requests of amount.By the way that since a rational number of threads, the thread of dynamic regulation server runs quantity, so as to more Add the acquisition for rapidly realizing server extreme bandwidth flow.
For example, when theoretical total number of threads N is 100, according to initial number of threads P0=N/2, it is determined that initial thread Quantity P0=50, the task requests that number of threads is 50 are initiated to server.
In step S113, the actual flow value during thread of server active thread operation quantity is obtained.
Using method as described above, measurement of discharge is pressed according to the peak flow values of server and default single thread, it is determined that One initial thread operation quantity, making to initiate task requests to server, corresponding thread operation quantity is more reasonable, so as to The acquisition of server extreme bandwidth flow is more rapidly realized, has saved the time that pressure test is carried out to server, significantly Improve the efficiency that pressure test is carried out to server.
Fig. 4 is the thin of step S120 in the method that pressure test is carried out to server exemplified according to the corresponding implementations of Fig. 2 Section description.As shown in figure 4, step S120 may comprise steps of.
In step S121, server active thread is transported under calculating actual flow value and pressing measurement of discharge in default single thread The difference between theoretical delivery value during the thread of line number amount, obtains theoretical actual difference.
When theoretical actual difference is the thread of server active thread operation quantity, between theoretical delivery value and actual flow Difference.
In step S122, judge whether theoretical actual difference is more than the default threshold value such as not, if yes (Y), then perform Step S125;If NO (N), then step S123 is performed.
Not etc. threshold value is not the flow threshold pre-set.
When theoretical actual difference is more than the threshold value such as not, then illustrate between the theoretical delivery value of server and actual flow value Differ larger.Server is now likely to have reached capacity state, part thread can not perform, be still in buffer queue etc. Treat in state, therefore the thread operation quantity of server need to be reduced.
Reducing the mode of the thread operation quantity of server has a variety of, can be default reduction quantity, need to reduce During the thread operation quantity of server, by reducing the reduction quantity on the basis of running quantity in former thread;Can also basis Difference between the theoretical delivery value and actual flow value of server, it is determined that reducing quantity;Can also be that random determination one subtracts Small number;It can also be and determine to reduce quantity in other way, and then the thread of server is reduced according to the reduction quantity Run quantity.
When theoretical actual difference is no more than the threshold value such as not, then illustrate server theoretical delivery value and actual flow value it Between be more or less the same.Now server does not reach capacity state, therefore need to increase the thread operation quantity of server.
The mode of the thread operation quantity of increase server has a variety of, can be default one and accelerate, need to increase During the thread operation quantity of server, accelerated by increasing this on the basis of running quantity in former thread;Can also basis Difference between the theoretical delivery value and peak flow values of server, it is determined that accelerating;It can also be random one increasing of determination Addend amount;It can also be and determine to accelerate in other way, and then according to the thread of the increase server of accelerating Run quantity.
According to the difference between theoretical delivery value and peak flow values, it is determined that thread operation quantity is accelerated, from And dynamic regulation further is carried out to the thread operation quantity of server, server is in limiting condition.
In step S123, the difference between theoretical flow value and peak flow values is calculated, obtains limit D-value.
In step S124, determine to accelerate to thread operation quantity according to limit D-value.
Determined to run when accelerating of quantity to thread according to limit D-value, by determining a rational increase number Amount, the thread operation quantity of dynamic regulation server, so as to more rapidly make server be in limiting condition, so that it is quick real The acquisition of existing server extreme bandwidth flow.
For example, the peak flow values of server are 100MB/S, single thread pressure measurement of discharge S=1MB/S.Number is run in thread Measure for 60 when, the theoretical delivery value of server is equal with actual flow value, is 60MB/S.Therefore, limit D-value X is 40MB/ S, according to the A=X/2S that accelerates, it is determined that accelerating as 20.
In step s 125, determined to run thread the reduction quantity of quantity according to theoretical actual difference.
When determining to run the reduction quantity of quantity to thread according to theoretical actual difference, by determining a rational reduction Quantity, the thread operation quantity of dynamic regulation server, so as to more quickly realize the acquisition of server extreme bandwidth flow.
For example, single thread presses measurement of discharge S=1MB/S, when thread operation quantity is 60, the theoretical delivery value of server is 60MB/S, and actual flow value is 50MB/S.Therefore, limit D-value Y is 10MB/S, according to the L=Y/2S that accelerates, it is determined that subtracting Small number is 10.
Using method as described above, when server runs the thread of certain thread operation quantity, by more theoretical Flow value and actual flow value, it is determined that quantity is accelerated or reduce to what thread operation quantity was adjusted, so as to more accelerate The acquisition of server extreme bandwidth flow is realized fastly, has been saved the time that pressure test is carried out to server, has been substantially increased The efficiency of pressure test is carried out to server.
Fig. 5 is according to the corresponding another methods that pressure test is carried out to server for implementing to exemplify of Fig. 2, such as Fig. 5 institutes Show, before step S120, the method that pressure test is carried out to server can also comprise the following steps.
In step S210, the output flow value during operation of server single thread is obtained.
The operation of server single thread is that the number of threads of server operation is 1.
Before pressure test is carried out to server, terminal to server initiates the task requests that number of threads is 1, makes clothes Device single thread of being engaged in is run, and then the output flow value of server is obtained when server single thread is run.
Can obtain server at random at certain when the output flow value of server is obtained when server single thread is run The output bandwidth flow at one moment is as output flow value;Can also be that server is obtained in single line according to predetermined time interval Output bandwidth flow during Cheng Yunhang, and then using the average value of multiple output bandwidth flows of acquisition as output flow value;Also It can be output flow value when obtaining the operation of server single thread by other means.
In step S220, determine that output flow value presses measurement of discharge for single thread.
Using method as described above, before pressure test is carried out to server, by the way that server single thread is run When output flow value be defined as single thread pressure measurement of discharge, for subsequently to server carry out pressure test sequence in carry out thread fortune The quantity regulation of line number amount provides reference, due to combining the specific reality of the server, makes determination regulation quantity more reasonable, more Add the acquisition for rapidly realizing server extreme bandwidth flow, saved the time that pressure test is carried out to server, carried significantly The high efficiency that pressure test is carried out to server.
Following is apparatus of the present invention embodiment, can be used for performing the above-mentioned method implementation for carrying out server pressure test Example.For the details not disclosed in apparatus of the present invention embodiment, the method that the present invention carries out pressure test to server refer to Embodiment.
Fig. 6 is a kind of block diagram of device that pressure test is carried out to server according to an exemplary embodiment, should Device includes but is not limited to:Actual flow value acquisition module 110, regulation quantity determining module 120, thread operation quantity regulation mould Block 130 and extreme bandwidth flow determining module 140.
Actual flow value acquisition module 110, for being that thread runs appointing for quantity by initiating number of threads to server Business request, obtain the actual flow value during thread of server active thread operation quantity;
Quantity determining module 120 is adjusted, for by under comparing actual flow value and pressing measurement of discharge in default single thread Server active thread runs the theoretical delivery value during thread of quantity, it is determined that running the regulation quantity of quantity to thread;
Thread runs quantity regulating module 130, for according to regulation quantity regulation thread operation quantity, being transported up to thread The amplitude of variation of actual flow value is in default fluctuation range when line number amount is adjusted;
Extreme bandwidth flow determining module 140, for determining extreme bandwidth stream of the final actual flow value for server Amount.
The function of modules and the implementation process of effect specifically refer to above-mentioned to server progress pressure in said apparatus The implementation process of step is corresponded in the method for test, will not be repeated here.
Optionally, as shown in fig. 7, the actual flow value acquisition module 110 shown in Fig. 6 includes but is not limited to:Theoretical thread Total computing unit 111, task requests initiate unit 112 and actual flow value acquiring unit 113.
Theoretical total number of threads computing unit 111, for the peak flow values according to server, calculate in default single thread Press the theoretical total number of threads under measurement of discharge;
Task requests initiate unit 112, are transported for initiating number of threads to server according to theoretical total number of threads for thread The task requests of line number amount;
Actual flow value acquiring unit 113, for obtaining actual stream when server active thread runs the thread of quantity Value.
Optionally, as shown in figure 8, the regulation quantity determining module 120 shown in Fig. 6 includes but is not limited to:It is theoretical actual poor It is worth computing unit 121, theoretical actual difference judging unit 122 and reduces quantity determining unit 123.
Theoretical actual difference computing unit 121, under calculating actual flow value and pressing measurement of discharge in default single thread The difference between theoretical delivery value during the thread of server active thread operation quantity, obtains theoretical actual difference;
Theoretical actual difference judging unit 122, for judging whether theoretical actual difference is more than the default threshold value such as not;
Quantity determining unit 123 is reduced, for when theoretical actual difference is more than the default threshold value such as not, according to theoretical real Border difference determines to run thread the reduction quantity of quantity.
Optionally, as shown in figure 9, the regulation quantity determining module 120 shown in Fig. 8 also includes but is not limited to:Limit D-value Computing unit 124 and determining unit 125 of accelerating.
Limit D-value computing unit 124, for when theoretical actual difference is no more than the default threshold value such as not, computational theory Difference between flow value and peak flow values, obtains limit D-value;
Determining unit of accelerating 125, for determining to accelerate to thread operation quantity according to limit D-value.
Optionally, Figure 10 is according to a kind of corresponding devices that pressure test is carried out to server for implementing to exemplify of Fig. 6 Block diagram, as shown in Figure 10, the device also include but is not limited to:Output flow value acquisition module 210 and single thread pressure measurement of discharge are true Cover half block 220.
Output flow value acquisition module 210, for obtaining output flow value when server runs a thread;
Single thread pressure measurement of discharge determining module 220, for determining that output flow value presses measurement of discharge for single thread.
Figure 11 is a kind of block diagram of terminal 100 according to an exemplary embodiment.
With reference to figure 11, terminal 100 can include one or more following component:Processing component 101, memory 102, electricity Source component 103, multimedia groupware 104, audio-frequency assembly 105, sensor cluster 107 and communication component 108.Wherein, above-mentioned group Part is simultaneously not all necessary, and terminal 100 can increase other assemblies according to itself functional requirement or reduce some components, this implementation Example is not construed as limiting.
Processing component 101 generally controls the integrated operation of terminal 100, is such as communicated with display, call, data, phase Operation that machine operates and record operation is associated etc..Processing component 101 can include one or more processors 109 to perform Instruction, to complete all or part of step of aforesaid operations.In addition, processing component 101 can include one or more modules, just Interaction between processing component 101 and other assemblies.For example, processing component 101 can include multi-media module, it is more to facilitate Interaction between media component 104 and processing component 101.
Memory 102 is configured as storing various types of data to support the operation in terminal 100.These data are shown Example includes the instruction of any application program or method for operating on the terminal 100.Memory 102 can be by any kind of Volatibility or non-volatile memory device or combinations thereof are realized, such as SRAM (Static Random Access Memory, static RAM), EEPROM (Electrically Erasable Programmable Read- Only Memory, Electrically Erasable Read Only Memory), EPROM (Erasable Programmable Read Only Memory, Erasable Programmable Read Only Memory EPROM), PROM (Programmable Read-Only Memory, may be programmed read-only Memory), ROM (Read-Only Memory, read-only storage), magnetic memory, flash memory, disk or CD.Storage One or more modules are also stored with device 102, one or more modules are configured to by the one or more processors 109 Perform, to complete all or part of step in any shown method of Fig. 2, Fig. 3, Fig. 4 and Fig. 5.
Power supply module 103 provides electric power for the various assemblies of terminal 100.Power supply module 103 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for terminal 100.
Multimedia groupware 104 is included in the screen of one output interface of offer between the terminal 100 and user.One In a little embodiments, screen can include LCD (Liquid Crystal Display, liquid crystal display) and TP (Touch Panel, touch panel).If screen includes touch panel, screen may be implemented as touch-screen, to receive from user's Input signal.Touch panel includes one or more touch sensors with the gesture on sensing touch, slip and touch panel.Institute Stating touch sensor can the not only border of sensing touch or sliding action, but also detect and the touch or slide phase The duration and pressure of pass.
Audio-frequency assembly 105 is configured as output and/or input audio signal.For example, audio-frequency assembly 105 includes a Mike Wind, when terminal 100 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone is configured as connecing Receive external audio signal.The audio signal received can be further stored in memory 102 or be sent out via communication component 108 Send.In certain embodiments, audio-frequency assembly 105 also includes a loudspeaker, for exports audio signal.
Sensor cluster 107 includes one or more sensors, and the state for providing various aspects for terminal 100 is commented Estimate.For example, sensor cluster 107 can detect opening/closed mode of terminal 100, the relative positioning of component, sensor group Part 107 can be changed with the coordinate of 100 1 components of detection terminal 100 or terminal and the temperature change of terminal 100.At some In embodiment, the sensor cluster 107 can also include Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 108 is configured to facilitate the communication of wired or wireless way between terminal 100 and other equipment.Terminal 100 can access the wireless network based on communication standard, such as WiFi (WIreless-Fidelity, wireless network), 2G or 3G, Or combinations thereof.In one exemplary embodiment, communication component 108 receives via broadcast channel and comes from external broadcasting management The broadcast singal or broadcast related information of system.In one exemplary embodiment, the communication component 108 also includes NFC (Near Field Communication, near-field communication) module, to promote junction service.For example, it can be based in NFC module RFID (Radio Frequency Identification, radio frequency identification) technology, IrDA (Infrared Data Association, Infrared Data Association) technology, UWB (Ultra-Wideband, ultra wide band) technology, BT (Bluetooth, it is blue Tooth) technology and other technologies realize.
In the exemplary embodiment, terminal 100 can be by one or more ASIC (Application Specific Integrated Circuit, application specific integrated circuit), DSP (Digital Signal Processing, at data signal Manage device), PLD (Programmable Logic Device, PLD), FPGA (Field-Programmable Gate Array, field programmable gate array), controller, microcontroller, microprocessor or other electronic components realize, be used for Perform the above method.
The concrete mode of the computing device operation of terminal in the embodiment is pressed server in relevant this Detailed description is performed in the embodiment of the method for power test, will no longer elaborate explanation herein.
Optionally, the present invention also provides a kind of intelligent terminal, perform Fig. 2, Fig. 3, Fig. 4 and Fig. 5 it is any shown in service Device carries out all or part of step of the method for pressure test.The intelligent terminal includes:
At least one processor;And
The memory being connected with least one processor communication;Wherein,
The memory storage has can be by the instruction of at least one computing device, and the instruction is by described at least one Individual computing device, so that at least one processor is able to carry out the method as described in above-mentioned any embodiment.
The concrete mode of the computing device operation of device in the embodiment is pressed server in relevant this Detailed description is performed in the embodiment of the method for power test, explanation will be not set forth in detail herein.
In the exemplary embodiment, a kind of storage medium is additionally provided, the storage medium is computer-readable recording medium, Such as can be the provisional and non-transitorycomputer readable storage medium for including instruction.The storage medium is for example including instruction Memory 102, above-mentioned instruction can be performed by the processor 109 of terminal 100 with complete it is above-mentioned to server carry out pressure test Method.
It should be appreciated that the invention is not limited in the precision architecture for being described above and being shown in the drawings, sheet Art personnel can perform various modifications and changes without departing from the scope.The scope of the present invention only will by appended right Ask to limit.

Claims (12)

  1. A kind of 1. method that pressure test is carried out to server, it is characterised in that methods described includes:
    It is the task requests that thread runs quantity by initiating number of threads to server, obtains server and run the thread fortune Actual flow value during the thread of line number amount;
    Pass through the actual flow value and the server operation thread operation number under default single thread pressure measurement of discharge Theoretical delivery value during the thread of amount, it is determined that running the regulation quantity of quantity to the thread;
    The thread operation quantity is adjusted according to the regulation quantity, until described in when thread operation quantity is adjusted The amplitude of variation of actual flow value is in default fluctuation range;
    It is determined that the final actual flow value is the extreme bandwidth flow of server.
  2. 2. according to the method for claim 1, it is characterised in that described to be transported by initiating number of threads to server for thread The task requests of line number amount, obtain the step of server runs the actual flow value when thread runs the thread of quantity and wrap Include:
    According to the peak flow values of server, the theoretical total number of threads in the case where default single thread presses measurement of discharge is calculated;
    It is the task requests that thread runs quantity to initiate number of threads to server according to the theoretical total number of threads;
    Obtain actual flow value when server runs the thread of the thread operation quantity.
  3. 3. according to the method for claim 1, it is characterised in that it is described by the actual flow value with default Server runs the theoretical delivery value when thread runs the thread of quantity under single thread pressure measurement of discharge, it is determined that to the thread The step of regulation quantity for running quantity, includes:
    Server runs the thread operation quantity under calculating the actual flow value and pressing measurement of discharge in default single thread The difference between theoretical delivery value during thread, obtains theoretical actual difference;
    Judge whether the theoretical actual difference is more than the default threshold value such as not, if it has, then
    Determined to run the thread reduction quantity of quantity according to the theoretical actual difference.
  4. 4. according to the method for claim 3, it is characterised in that methods described also includes:
    If the theoretical actual difference no more than the default threshold value such as not, calculate the theoretical delivery value and peak flow values it Between difference, obtain limit D-value;
    Determine to accelerate to thread operation quantity according to the limit D-value.
  5. 5. according to the method for claim 1, it is characterised in that it is described by the actual flow value with default Server runs the theoretical delivery value when thread runs the thread of quantity under single thread pressure measurement of discharge, it is determined that to the thread Before the step of running the regulation quantity of quantity, methods described also includes:
    Obtain output flow value when server runs a thread;
    Determine that the output flow value presses measurement of discharge for the single thread.
  6. 6. a kind of device that pressure test is carried out to server, it is characterised in that described device includes:
    Actual flow value acquisition module, for being the task requests that thread runs quantity by initiating number of threads to server, Obtain actual flow value when server runs the thread of the thread operation quantity;
    Adjust quantity determining module, for by the actual flow value with default single thread pressure measurement of discharge under service Device runs the theoretical delivery value during thread of the thread operation quantity, it is determined that running the regulation quantity of quantity to the thread;
    Thread runs quantity regulating module, quantity is run for adjusting the thread according to the regulation quantity, until to described The amplitude of variation of the actual flow value is in default fluctuation range when thread operation quantity is adjusted;
    Extreme bandwidth flow determining module, for determining extreme bandwidth flow of the final actual flow value for server.
  7. 7. device according to claim 6, it is characterised in that the actual flow value acquisition module includes:
    Theoretical total number of threads computing unit, for the peak flow values according to server, calculate and press flow measurement in default single thread Theoretical total number of threads under amount;
    Task requests initiate unit, are that thread runs number for initiating number of threads to server according to the theoretical total number of threads The task requests of amount;
    Actual flow value acquiring unit, for obtaining actual flow when server runs the thread of the thread operation quantity Value.
  8. 8. device according to claim 6, it is characterised in that the regulation quantity determining module includes:
    Theoretical actual difference computing unit, for being serviced under calculating the actual flow value and pressing measurement of discharge in default single thread The difference between theoretical delivery value during the thread of the device operation thread operation quantity, obtains theoretical actual difference;
    Theoretical actual difference judging unit, for judging whether the theoretical actual difference is more than the default threshold value such as not;
    Quantity determining unit is reduced, for when the theoretical actual difference is more than the default threshold value such as not, according to the theory Actual difference determines to run the thread reduction quantity of quantity.
  9. 9. device according to claim 8, it is characterised in that the regulation quantity determining module also includes:
    Limit D-value computing unit, for when the theoretical actual difference is no more than the default threshold value such as not, calculating the reason By the difference between flow value and peak flow values, limit D-value is obtained;
    Accelerate determining unit, for determining to accelerate to thread operation quantity according to the limit D-value.
  10. 10. device according to claim 6, it is characterised in that described device also includes:
    Output flow value acquisition module, for obtaining output flow value when server runs a thread;
    Single thread presses measurement of discharge determining module, for determining that the output flow value presses measurement of discharge for the single thread.
  11. 11. a kind of intelligent terminal, it is characterised in that the intelligent terminal includes:
    At least one processor;And
    The memory being connected with least one processor communication;Wherein,
    The memory storage has can be by the instruction of at least one computing device, and the instruction is by least one place Manage device to perform, so that at least one processor is able to carry out the method as described in claim any one of 1-5.
  12. 12. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program The method that pressure test is carried out to server according to any one of claim 1-5 is realized when being executed by processor.
CN201710974803.0A 2017-10-19 2017-10-19 Method and device for pressure test on server and terminal Active CN107835101B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710974803.0A CN107835101B (en) 2017-10-19 2017-10-19 Method and device for pressure test on server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710974803.0A CN107835101B (en) 2017-10-19 2017-10-19 Method and device for pressure test on server and terminal

Publications (2)

Publication Number Publication Date
CN107835101A true CN107835101A (en) 2018-03-23
CN107835101B CN107835101B (en) 2020-05-08

Family

ID=61648395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710974803.0A Active CN107835101B (en) 2017-10-19 2017-10-19 Method and device for pressure test on server and terminal

Country Status (1)

Country Link
CN (1) CN107835101B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656796A (en) * 2018-12-14 2019-04-19 武汉斗鱼鱼乐网络科技有限公司 A kind of task selection method and device
CN109660422A (en) * 2018-12-03 2019-04-19 郑州云海信息技术有限公司 Network interface card bandwidth test method, apparatus, terminal and storage medium based on multi-process
CN109684228A (en) * 2019-01-07 2019-04-26 武汉斗鱼鱼乐网络科技有限公司 A kind of performance test methods, device, system and storage medium
CN110247815A (en) * 2019-05-09 2019-09-17 深圳市迅雷网络技术有限公司 A kind of data transmission method, device, system and computer readable storage medium
CN110635961A (en) * 2018-06-22 2019-12-31 北京京东尚科信息技术有限公司 Pressure measurement method, device and system of server
CN111026622A (en) * 2018-10-10 2020-04-17 华为技术有限公司 Method and device for testing maximum service request quantity of tested system
CN113645153A (en) * 2021-08-11 2021-11-12 中国银行股份有限公司 Flow control method, device, equipment and medium
CN113778768A (en) * 2021-08-24 2021-12-10 深圳市联影高端医疗装备创新研究院 Reconstruction server testing method and device, computer equipment and storage medium
CN115378859A (en) * 2021-04-13 2022-11-22 百度在线网络技术(北京)有限公司 Method, apparatus, device, medium and product for determining limit state information
CN115529258A (en) * 2022-09-30 2022-12-27 济南浪潮数据技术有限公司 Method, system, device and medium for rapidly positioning optimal value of bandwidth

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5799002A (en) * 1996-07-02 1998-08-25 Microsoft Corporation Adaptive bandwidth throttling for network services
CN1953401A (en) * 2005-10-20 2007-04-25 英业达股份有限公司 Multi-threading network pressure testing method
CN101730086A (en) * 2009-12-02 2010-06-09 北京盈通创新数字技术有限公司 High speed downloading method of mobile terminal connecting multiple gateways and starting multiple threads
US8199671B2 (en) * 2008-06-09 2012-06-12 Hewlett-Packard Development Company, L.P. Throttling network traffic generated by a network discovery tool during a discovery scan
CN103905263A (en) * 2012-12-26 2014-07-02 ***通信集团公司 Service bandwidth testing method and device
CN104092583A (en) * 2014-07-14 2014-10-08 杭州东信北邮信息技术有限公司 Automated test method and system for intelligent router

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5799002A (en) * 1996-07-02 1998-08-25 Microsoft Corporation Adaptive bandwidth throttling for network services
CN1953401A (en) * 2005-10-20 2007-04-25 英业达股份有限公司 Multi-threading network pressure testing method
US8199671B2 (en) * 2008-06-09 2012-06-12 Hewlett-Packard Development Company, L.P. Throttling network traffic generated by a network discovery tool during a discovery scan
CN101730086A (en) * 2009-12-02 2010-06-09 北京盈通创新数字技术有限公司 High speed downloading method of mobile terminal connecting multiple gateways and starting multiple threads
CN103905263A (en) * 2012-12-26 2014-07-02 ***通信集团公司 Service bandwidth testing method and device
CN104092583A (en) * 2014-07-14 2014-10-08 杭州东信北邮信息技术有限公司 Automated test method and system for intelligent router

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110635961B (en) * 2018-06-22 2022-08-09 北京京东尚科信息技术有限公司 Pressure measurement method, device and system of server
CN110635961A (en) * 2018-06-22 2019-12-31 北京京东尚科信息技术有限公司 Pressure measurement method, device and system of server
CN111026622A (en) * 2018-10-10 2020-04-17 华为技术有限公司 Method and device for testing maximum service request quantity of tested system
CN111026622B (en) * 2018-10-10 2021-10-22 华为技术有限公司 Method and device for testing maximum service request quantity of tested system
CN109660422B (en) * 2018-12-03 2022-03-22 郑州云海信息技术有限公司 Network card bandwidth testing method, device, terminal and storage medium based on multiple processes
CN109660422A (en) * 2018-12-03 2019-04-19 郑州云海信息技术有限公司 Network interface card bandwidth test method, apparatus, terminal and storage medium based on multi-process
CN109656796A (en) * 2018-12-14 2019-04-19 武汉斗鱼鱼乐网络科技有限公司 A kind of task selection method and device
CN109656796B (en) * 2018-12-14 2022-05-10 武汉斗鱼鱼乐网络科技有限公司 Task selection method and device
CN109684228A (en) * 2019-01-07 2019-04-26 武汉斗鱼鱼乐网络科技有限公司 A kind of performance test methods, device, system and storage medium
CN109684228B (en) * 2019-01-07 2022-07-05 武汉斗鱼鱼乐网络科技有限公司 Performance test method, device, system and storage medium
CN110247815A (en) * 2019-05-09 2019-09-17 深圳市迅雷网络技术有限公司 A kind of data transmission method, device, system and computer readable storage medium
CN115378859A (en) * 2021-04-13 2022-11-22 百度在线网络技术(北京)有限公司 Method, apparatus, device, medium and product for determining limit state information
CN115378859B (en) * 2021-04-13 2023-06-02 百度在线网络技术(北京)有限公司 Method, apparatus, device, medium and product for determining limit state information
CN113645153A (en) * 2021-08-11 2021-11-12 中国银行股份有限公司 Flow control method, device, equipment and medium
CN113778768A (en) * 2021-08-24 2021-12-10 深圳市联影高端医疗装备创新研究院 Reconstruction server testing method and device, computer equipment and storage medium
CN115529258A (en) * 2022-09-30 2022-12-27 济南浪潮数据技术有限公司 Method, system, device and medium for rapidly positioning optimal value of bandwidth
CN115529258B (en) * 2022-09-30 2024-05-03 郑州浪潮数据技术有限公司 Method, system, device and medium for rapidly positioning bandwidth optimal value

Also Published As

Publication number Publication date
CN107835101B (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN107835101A (en) Method and device, the terminal of pressure test are carried out to server
CN108320744B (en) Voice processing method and device, electronic equipment and computer readable storage medium
CN104539009B (en) charging management method and device
CN106208212A (en) Terminal unit charge control method, device and terminal unit
CN109542777B (en) Pressure testing method and device and readable medium
CN105528055A (en) Running object processing method and device
CN107205248B (en) Resource allocation method and system
CN105427161A (en) Monetary exchange rate exchange method and device
CN109473092A (en) A kind of sound end detecting method and device
US20170171319A1 (en) Methods and apparatus to improve transmission of a field data set to a network access point via parallel communication sessions
CN104679218A (en) Method and device for controlling power consumption
CN107239344A (en) Distributed allocation method and system
CN105183631A (en) Equipment test methods and devices
CN112270561A (en) Electronic resource distribution method and device, electronic equipment and storage medium
CN109284229A (en) A kind of dynamic adjusting method and relevant device based on QPS
CN106909481B (en) Interface test method, interface test device and electronic equipment
CN104407981A (en) Method and device for managing internal memory
CN105722244B (en) Information processing method and electronic equipment
CN108134808B (en) Network request method and device
CN104427285A (en) Prompt message generating method and device
CN106604204B (en) Method and system for remotely controlling terminal application through Bluetooth
CN107018182A (en) The fault-tolerance processing method and device of load balancing
CN106940658B (en) Task processing method and device based on thread pool
CN110278226A (en) Load balance process method, apparatus and electronic equipment
CN104699628A (en) Method and device for cache prestorage

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 361000 Area 1F-D1, Huaxun Building A, Software Park, Xiamen Torch High-tech Zone, Xiamen City, Fujian Province

Applicant after: Xiamen Meishao Co., Ltd.

Address before: Software Park Siming District of Xiamen city in Fujian province 361008 two sunrise Road No. 22 Room 102, unit G03

Applicant before: XIAMEN MEIYOU INFORMATION SCIENCE & TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant