CN106326067A - Method and device for monitoring CPU (central processing unit) performance under pressure test - Google Patents

Method and device for monitoring CPU (central processing unit) performance under pressure test Download PDF

Info

Publication number
CN106326067A
CN106326067A CN201610639938.7A CN201610639938A CN106326067A CN 106326067 A CN106326067 A CN 106326067A CN 201610639938 A CN201610639938 A CN 201610639938A CN 106326067 A CN106326067 A CN 106326067A
Authority
CN
China
Prior art keywords
cpu
performance monitoring
script
monitoring
performance
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
CN201610639938.7A
Other languages
Chinese (zh)
Other versions
CN106326067B (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610639938.7A priority Critical patent/CN106326067B/en
Publication of CN106326067A publication Critical patent/CN106326067A/en
Application granted granted Critical
Publication of CN106326067B publication Critical patent/CN106326067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3414Workload generation, e.g. scripts, playback
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring

Abstract

The invention provides a method and device for monitoring the CPU (central processing unit) performance under pressure test. The method comprises the following steps that a pressure test script and a CPU performance monitoring script are deployed; after the pressure test script is started for a first time period, the starting of the CPU performance monitoring script is triggered; in the operation process of the pressure test script, the CPU performance monitoring script is operated according to a monitoring threshold value, and a pressure test result and a performance monitoring result are obtained; the pressure test result is amended according the performance monitoring result. The scheme has the advantage that the accuracy of the CPU pressure test data can be improved.

Description

A kind of method and device under stress test, cpu performance being monitored
Technical field
The present invention relates to field of computer technology, under stress test, cpu performance is monitored particularly to a kind of Method and device.
Background technology
CPU as server arithmetic core and calculate core, can its stability directly concerns server stablize work Make.In the conventionally test project of server, CPU stress test and cpu performance test can be included.
In the prior art, CPU stress test and cpu performance test are independently carried out.But, CPU pressure is surveyed The result of examination is often relevant with cpu performance, and therefore, prior art is when carrying out CPU stress test, and the result tested out may be deposited In inaccurate situation.
Summary of the invention
Embodiments provide a kind of method and device under stress test, cpu performance being monitored, improve The accuracy of pressure testing results.
First aspect, embodiments provides a kind of method being monitored cpu performance under stress test, bag Include:
Dispose stress test script and cpu performance monitoring script;
In described stress test script startup after first time period, trigger and described cpu performance monitoring script is opened Dynamic;
In the running of described stress test script, run described cpu performance monitoring script according to monitoring threshold value, To pressure testing results and performance monitoring result;
According to described performance monitoring result, described pressure testing results is modified.
Preferably,
Described first time period is more than or equal to 0, and less than testing time section;Wherein, described testing time section is described The operation time period of stress test script;
And/or,
Described monitoring threshold value includes: monitoring number of times or storage and monitoring time segment.
Preferably,
Described method, farther includes: determine cpu performance monitoring parameter, performs institute according to described performance monitoring parameter State the deployment of cpu performance monitoring script;Wherein, described performance monitoring parameter includes: cpu busy percentage, CPU power consumption, cpu frequency and At least one in cpu temperature.
Preferably,
Described according to described the performance test results, described pressure testing results is modified, including:
By the first formula, described pressure testing results is modified:
Described first formula includes:
V = c U T P abFT 0 V 0
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
Preferably,
Before described triggering is to the startup of described cpu performance monitoring script, farther include:
Determine the storage position that described performance monitoring result is corresponding;Check whether described storage position includes that the last time enters The result of storage during row performance monitoring, if including, then deletes the result that described storage position stores;
Run after described cpu performance monitoring script according to monitoring threshold value described, farther include: will run each time The described performance monitoring result obtained after described cpu performance monitoring script stores described storage position.
Second aspect, embodiments provides a kind of device being monitored cpu performance under stress test, bag Include:
Memory element, for storing first time period and the monitoring threshold value of setting;
Deployment unit, is used for disposing stress test script and disposing cpu performance monitoring script;
First processing unit, for after monitoring described stress test script startup first time period, starts institute State cpu performance monitoring script;
Acquiring unit, in the running of described stress test script, runs described CPU according to monitoring threshold value Energy monitoring script, obtains pressure testing results and performance monitoring result;
Amending unit, for according to described the performance test results, is modified described pressure testing results.
Preferably,
Described first time period is more than or equal to 0, and less than testing time section;Wherein, described testing time section is described The operation time period of stress test script;
And/or,
Described monitoring threshold value includes: monitoring number of times or storage and monitoring time segment.
Preferably,
Described device, farther includes:
First determines unit, is used for determining cpu performance monitoring parameter, utilizes described performance monitoring parameter to trigger described deployment Unit performs the deployment to described cpu performance monitoring script;
Wherein, described performance monitoring parameter includes: in cpu busy percentage, CPU power consumption, cpu frequency and cpu temperature at least A kind of.
Preferably,
Described amending unit, specifically for:
By the first formula, described pressure testing results is modified:
Described first formula includes:
V = c U T P abFT 0 V 0
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
Preferably,
Described device, farther includes:
Second determines unit, for determining the storage position that described performance monitoring result is corresponding;
Inspection unit, for checking whether described storage position includes that the last time carries out the knot of storage during performance monitoring Really, if including, then the result that described storage position stores is deleted;
Second processing unit, for running the described performance prison obtained after described cpu performance monitoring script each time Control result stores described storage position.
Embodiments provide a kind of method and device under stress test, cpu performance being monitored, pass through Dispose stress test script and cpu performance monitoring script, in described stress test script startup after first time period, trigger Startup to described cpu performance monitoring script, in the running of described stress test script, runs institute according to monitoring threshold value State cpu performance monitoring script, obtain pressure testing results and performance monitoring result, the pressure testing results now obtained and performance Unrelated, by pressure test sequence, obtain performance monitoring result, and according to described performance monitoring result, to described pressure Test result is modified, and revised pressure testing results is relevant with performance monitoring result, such that it is able to improve stress test The accuracy of result.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to according to These accompanying drawings obtain other accompanying drawing.
Fig. 1 is a kind of method stream being monitored cpu performance under stress test that one embodiment of the invention provides Cheng Tu;
Fig. 2 is a kind of method being monitored cpu performance under stress test that another embodiment of the present invention provides Flow chart;
Fig. 3 is a kind of device knot being monitored cpu performance under stress test that one embodiment of the invention provides Composition;
Fig. 4 is a kind of device being monitored cpu performance under stress test that another embodiment of the present invention provides Structure chart;
Fig. 5 is a kind of device being monitored cpu performance under stress test that another embodiment of the present invention provides Structure chart.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is The a part of embodiment of the present invention rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of not making creative work, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, embodiments provide a kind of method under stress test, cpu performance being monitored, First time period and monitoring threshold value are set;Including:
Step 101: dispose stress test script and cpu performance monitoring script;
Step 102: in described stress test script startup after first time period, triggers and monitors described cpu performance The startup of script;
Step 103: in the running of described stress test script, runs described cpu performance prison according to monitoring threshold value Control script, obtains pressure testing results and performance monitoring result;
Step 104: according to described performance monitoring result, described pressure testing results is modified.
Embodiments provide a kind of method and device under stress test, cpu performance being monitored, pass through Dispose stress test script and cpu performance monitoring script, in described stress test script startup after first time period, trigger Startup to described cpu performance monitoring script, in the running of described stress test script, runs institute according to monitoring threshold value State cpu performance monitoring script, obtain pressure testing results and performance monitoring result, the pressure testing results now obtained and performance Unrelated, by pressure test sequence, obtain performance monitoring result, and according to described performance monitoring result, to described pressure Test result is modified, and revised pressure testing results is relevant with performance monitoring result, such that it is able to improve stress test The accuracy of result.
In a kind of possible implementation, cpu performance monitoring parameter can include many kinds of parameters, owing to cpu performance is supervised After deployment, the operation of this cpu performance monitoring script is i.e. to carry out the cpu performance monitoring parameter of configuration in script to control script Monitoring, therefore, before disposing cpu performance monitoring script, may further include: determine cpu performance monitoring parameter.Then root The deployment to cpu performance monitoring script is performed according to cpu performance monitoring parameter;Wherein, cpu performance monitoring parameter may include that CPU At least one in utilization rate, CPU power consumption, cpu frequency and cpu temperature.Such as, cpu busy percentage and CPU power consumption are carried out simultaneously Monitoring;For another example, cpu busy percentage is monitored.
In pressure test sequence, when being monitored cpu performance, the parameter type of monitoring is the most, and the pressure obtained is surveyed Test result is the most accurate, and therefore, this cpu performance monitoring parameter may include that cpu busy percentage, CPU power consumption, cpu frequency and CPU temperature Degree.
In a kind of possible implementation, by the first formula, described pressure testing results can be modified.Institute State the first formula to include:
V = c U T P abFT 0 V 0
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
It should be noted that above-mentioned first formula, it is for performance monitored results includes cpu busy percentage, CPU merit simultaneously Situation when consumption, cpu frequency and cpu temperature, includes above-mentioned four kinds of performance monitoring parameters pair in performance monitoring result the most simultaneously During the result answered, result corresponding to performance monitoring parameter for not including can use standard value.
Such as, when cpu performance monitoring parameter is cpu busy percentage, the performance monitoring result obtained only includes CPU and utilizes The result that rate is corresponding, therefore, the U in described first formula is the cpu busy percentage in performance monitoring result, now, the first formula In P value be 120, T value be 75, F value be 24, wherein, 120,75,24 be respectively CPU power consumption, cpu temperature, the mark of cpu frequency Quasi-value.Cpu busy percentage in the performance monitoring result that will obtain, CPU power consumption, cpu temperature, the standard value of cpu frequency substitute into the In one formula, revised pressure testing results can be obtained.
In a kind of possible implementation, in order to obtain complete performance monitoring result, triggering cpu performance monitoring foot Before this startup, also comprise determining that the storage position that performance monitoring result is corresponding;Check whether storage position includes one Secondary carrying out the result of storage during performance monitoring, if including, then the result of storage position storage being deleted.
Such as, cpu performance monitored results is stored in Log_PATH/cpu_mon.log, checks the most whether comprise one The secondary file log (cpu_mon.log) carrying out storing result during performance monitoring, if existing, then deletes this file.
After running cpu performance monitoring script according to monitoring threshold value, also include: after described script being run each time The described performance monitoring result obtained stores described storage position.
Such as, after cpu performance monitoring script has performed once monitoring process, its monitored results is stored file In log (cpu_mon.log), after completing whole test process, the monitored results that can be needed by this file acquisition.
Below with described performance monitoring parameter as cpu busy percentage, as a example by CPU power consumption, cpu frequency and cpu temperature, to this The bright described method being monitored cpu performance under stress test is described in detail.
As in figure 2 it is shown, embodiments provide a kind of method under stress test, cpu performance being monitored, The method may include that
Step 201: write stress test script.
For stress test, write stress test script, in order to perform pressure test sequence.
Step 202: determine monitoring threshold value, the storage position of performance monitoring result, cpu performance monitoring parameter and each The standard value that individual cpu performance monitoring parameter is corresponding.
In pressure test sequence, can realize, by arranging monitoring threshold value, the control that cpu performance monitoring script is run System, wherein, this monitoring threshold value, at least may include that monitoring number of times or storage and monitoring time segment.
Wherein, monitor threshold value include monitor number of times time, cpu performance monitoring script run corresponding monitoring number of times it After, the most out of service.Such as, this monitoring number of times is 20 times.
Wherein, when monitoring threshold value and including storage and monitoring time segment, cpu performance monitoring script has run corresponding storage and monitoring time segment Afterwards, the most out of service.Such as, this storage and monitoring time segment is 30min.
In the present embodiment, it is achieved a necessary for monitoring time is 30s, therefore, monitoring number of times and storage and monitoring time segment are can With mutual inversion of phases.Such as, storage and monitoring time segment is 30min, then monitoring number of times is 60 times.
In the present embodiment, when monitoring threshold value and not being set, then can run cpu performance prison in the way of using acquiescence Control script.Such as, the mode of this acquiescence is: storage and monitoring time segment is defaulted as 48h.Therefore, when using default value 48h, cpu performance is supervised The control every 30s of script once monitors, and monitoring number of times is 2880 times.
In the present embodiment, the setting for monitoring threshold value at least can use following code to realize:
In the present embodiment, a storage position is selected, for storage performance monitored results.Such as, storage position is Log_PATH.This storage position can comprise the monitoring information such as threshold value, cpu performance monitored results.
In the present embodiment, also include, determine cpu performance monitoring parameter be cpu busy percentage, CPU power consumption, cpu frequency and Cpu temperature.It should be noted that for the operation each time of cpu performance monitoring script, cpu performance monitoring parameter, can wrap Include: at least one in cpu busy percentage, CPU power consumption, cpu frequency and cpu temperature.
After determining cpu performance monitoring parameter, need the standard value of cpu performance monitoring parameter is configured, in order to system Can directly invoke during monitoring.
In the present embodiment, the setting for cpu performance monitoring parameter standard value at least can use following code to come in fact Existing:
DIR=$ PWD
CPU_utilization_default=90
CPU_power_default=120
CPU_frequency_default=24
CPU_temperature_default=75
Step 203: according to monitoring threshold value, the storage position of performance monitoring result, cpu performance monitoring parameter and each The standard value that individual performance monitoring parameter is corresponding, writes cpu performance monitoring script.
In the present embodiment, in order to perform the monitoring to cpu performance parameter, need to write the script performing monitoring process. In the compiling procedure of this cpu performance monitoring script, need monitoring threshold value, the performance monitoring knot relating to determine in step 202 Some information such as storage position, cpu performance monitoring parameter and the standard value corresponding to each performance monitoring parameter of fruit.Should The monitor portion of cpu performance monitoring script mainly comprises the content of three parts: obtain the standard value of cpu performance monitoring parameter; Obtain the monitoring value of cpu performance monitoring parameter;Standard by the monitoring value of cpu performance monitoring parameter Yu cpu performance monitoring parameter Value compares.
This cpu performance monitoring script at least can use following code to realize:
Step 204: dispose stress test script and cpu performance monitoring script.
In this step, stress test script and the importing of cpu performance monitoring script are treated in examining system.
Step 205: according to storage position, check whether described storage position includes the last time to carry out during performance monitoring and deposit The result of storage, if including, then deletes the result that described storage position stores.
In the present embodiment, storage position is Log_PATH, checks and whether includes last Progressive symmetric erythrokeratodermia in this storage position The result of storage when can monitor, if including, then deletes the result that described storage position stores, it is to avoid cause twice and monitor To described performance monitoring result obscure, get the wrong sow by the ear.
Step 206: install monitoring tools, and check whether monitoring tools is installed successfully.
During monitoring, the method for calling of cpu performance monitoring parameter is divided into two kinds, and one is that system directly obtains, separately One is to be obtained by monitoring tools.In the present embodiment, need to be obtained the monitoring value of cpu frequency, this CPU by monitoring tools The monitoring tools of frequency is that RDMSR (Read from Model Specific Register, specifically deposit by reading model Device).Before starting cpu performance monitoring script, need this monitoring tools RDMSR is installed, and check whether it pacifies after mounting Dress up merit.
Step 207: operating pressure test script, after monitoring stress test script and having run first time period, opens Dynamic cpu performance monitoring script.
In the present embodiment, in order to improve the accuracy of pressure testing results, need in pressure test sequence CPU Can parameter be monitored, therefore, the startup for cpu performance monitoring script can be joined by arranging first time period Put.
Wherein, this first time period refers to from starting described stress test script to starting described cpu performance monitoring foot This time interval.Described first time period is more than or equal to 0, and less than described testing time section, wherein, described testing time section The operation time period for described stress test script.Wherein, when first time period is set to 0, show stress test script and Cpu performance monitoring script starts simultaneously.Such as, this testing time section is 45min, then can arrange this first time period is 10min。
In stress test script startup after first time period, after 10min, trigger and described cpu performance is monitored foot This startup.Cpu performance monitoring script, can manually boot when namely the very first time is 0 when stress test script startup Get up, it is also possible in stress test script startup after first time period, stress test script calls this script enter Row monitoring.
Step 208: according to storage position, obtain pressure testing results and performance monitoring result.
In the present embodiment, according to storage position Log_PATH, obtain pressure testing results corresponding to monitoring threshold value and property Can monitored results.Pressure testing results can be modified by performance monitoring result, improve the accurate of pressure testing results Property, and, by the analysis to performance monitoring result, obtain the change of cpu performance parameter, and then find in pressure test sequence The ANOMALOUS VARIATIONS of cpu performance parameter, sends warning information.
Step 209: according to performance monitoring result, pressure testing results is modified.
According to the performance monitoring result obtained, utilize the first formula (1) that described pressure testing results is modified.Ratio As, the pressure testing results V of acquisition0=10, the monitoring value of cpu busy percentage, the monitoring value of cpu frequency, the monitoring value of CPU power consumption It is respectively 80,22,115,70, then V in the first formula with the monitoring value of cpu temperature0=10, U=80, F=22, P=115, T= 70, revised pressure testing results is formula (2);
V = c U T P a b FT 0 V 0 - - - ( 1 )
V = 39 c a b - - - ( 2 )
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
As it is shown on figure 3, embodiments provide a kind of device under stress test, cpu performance being monitored, Including:
Memory element 301, for storing first time period and the monitoring threshold value of setting;
Deployment unit 302, is used for disposing stress test script and disposing cpu performance monitoring script;
First processing unit 303, for after monitoring described stress test script startup first time period, starts Described cpu performance monitoring script;
Acquiring unit 304, in the running of described stress test script, runs described according to monitoring threshold value Cpu performance monitoring script, obtains pressure testing results and performance monitoring result;
Amending unit 305, for according to described the performance test results, is modified described pressure testing results.
In an embodiment of the invention, described first time period is more than or equal to 0, and less than testing time section;Wherein, Described testing time section is the operation time period of described stress test script;Described monitoring threshold value includes: monitoring number of times and monitoring Time period.
In an embodiment of the invention, as shown in Figure 4, described device, also include:
First determines unit 401, is used for determining cpu performance monitoring parameter, utilizes described performance monitoring parameter to trigger described Deployment unit 302 performs the deployment to described cpu performance monitoring script;
Wherein, described performance monitoring parameter includes: in cpu busy percentage, CPU power consumption, cpu frequency and cpu temperature at least A kind of.
In an embodiment of the invention, described amending unit, specifically for:
By the first formula, described pressure testing results is modified:
Described first formula includes:
V = c U T P abFT 0 V 0
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
In an embodiment of the invention, such as Fig. 5, described device, also include:
Second determines unit 501, for determining the storage position that described performance monitoring result is corresponding;
Inspection unit 502, for checking whether described storage position includes that the last time carries out storage during performance monitoring As a result, if including, then the result that described storage position stores is deleted;
Second processing unit 503, for running the described performance obtained after described cpu performance monitoring script each time Monitored results stores described storage position.
To sum up, each embodiment of the present invention has the effect that
1, a kind of method and device under stress test, cpu performance being monitored is embodiments provided, logical Cross deployment stress test script and cpu performance monitoring script, in described stress test script startup after first time period, touch Send out the startup to described cpu performance monitoring script, in the running of described stress test script, run according to monitoring threshold value Described cpu performance monitoring script, obtains pressure testing results and performance monitoring result, the pressure testing results now obtained and property Can be unrelated, by pressure test sequence, obtain performance monitoring result, and according to described performance monitoring result, to described pressure Power test result is modified, and revised pressure testing results is relevant with performance monitoring result, surveys such that it is able to improve pressure The accuracy of test result.
2, in embodiments of the present invention, by run cpu performance monitoring script, can to cpu busy percentage, CPU power consumption, At least one in cpu frequency and cpu temperature is monitored, and is modified performance monitoring result by the first formula, makes Pressure testing results is more accurate.
3, in embodiments of the present invention, before running cpu performance monitoring script, it is thus necessary to determine that performance monitoring result is corresponding Storage position, and checking whether this position includes that the last time carries out the result of storage during performance monitoring, if including, then will The result of storage position storage is deleted, it is to avoid causes storage result to obscure, obtains the test result of mistake.
4, after running cpu performance monitoring script, the performance obtained after cpu performance monitoring script will be run each time Monitored results storage position.Pressure testing results can be modified by obtaining performance monitored results, improve The accuracy of pressure testing results, and, by the analysis to performance monitoring result, it is also possible to obtain the change of cpu performance parameter Change, and then find the ANOMALOUS VARIATIONS of cpu performance parameter in pressure test sequence, send warning information.
The contents such as the information between each unit in said apparatus is mutual, execution process, owing to implementing with the inventive method Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
It should be noted that in this article, the relational terms of such as first and second etc is used merely to an entity Or operation separates with another entity or operating space, and not necessarily require or imply existence between these entities or operation The relation of any this reality or order.And, term " includes ", " comprising " or its any other variant are intended to non- Comprising of exclusiveness, so that include that the process of a series of key element, method, article or equipment not only include those key elements, But also include other key elements being not expressly set out, or also include being consolidated by this process, method, article or equipment Some key elements.In the case of there is no more restriction, statement the key element " including " and limiting, do not arrange Except there is also other same factor in including the process of described key element, method, article or equipment.
Last it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate the skill of the present invention Art scheme, is not intended to limit protection scope of the present invention.All made within the spirit and principles in the present invention any amendment, Equivalent, improvement etc., be all contained in protection scope of the present invention.

Claims (10)

1. the method under stress test, cpu performance being monitored, it is characterised in that first time period and monitoring are set Threshold value;Including:
Dispose stress test script and cpu performance monitoring script;
In described stress test script startup after first time period, trigger the startup to described cpu performance monitoring script;
In the running of described stress test script, run described cpu performance monitoring script according to monitoring threshold value, pressed Power test result and performance monitoring result;
According to described performance monitoring result, described pressure testing results is modified.
Method the most according to claim 1, it is characterised in that
Described first time period is more than or equal to 0, and less than testing time section;Wherein, described testing time section is described pressure The operation time period of test script;
And/or,
Described monitoring threshold value includes: monitoring number of times or storage and monitoring time segment.
Method the most according to claim 1, it is characterised in that
Farther include: determine cpu performance monitoring parameter, perform described cpu performance is monitored according to described performance monitoring parameter The deployment of script;Wherein, described performance monitoring parameter includes: in cpu busy percentage, CPU power consumption, cpu frequency and cpu temperature extremely Few one.
Method the most according to claim 3, it is characterised in that described according to described the performance test results, to described pressure Test result is modified, including:
By the first formula, described pressure testing results is modified:
Described first formula includes:
V = c U T P abFT 0 V 0
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
5. according to described method arbitrary in claim 1-4, described triggering to the startup of described cpu performance monitoring script it Before, farther include:
Determine the storage position that described performance monitoring result is corresponding;Check whether described storage position includes last Progressive symmetric erythrokeratodermia The result of storage when can monitor, if including, then deletes the result that described storage position stores;
Run after described cpu performance monitoring script according to monitoring threshold value described, farther include: will run described each time The described performance monitoring result obtained after cpu performance monitoring script stores described storage position.
6. the device under stress test, cpu performance being monitored, it is characterised in that including:
Memory element, for storing first time period and the monitoring threshold value of setting;
Deployment unit, is used for disposing stress test script and disposing cpu performance monitoring script;
First processing unit, for after monitoring described stress test script startup first time period, starts described CPU Performance monitoring script;
Acquiring unit, in the running of described stress test script, runs described cpu performance prison according to monitoring threshold value Control script, obtains pressure testing results and performance monitoring result;
Amending unit, for according to described the performance test results, is modified described pressure testing results.
The device under stress test, cpu performance being monitored the most according to claim 6, it is characterised in that
Described first time period is more than or equal to 0, and less than testing time section;Wherein, described testing time section is described pressure The operation time period of test script;
And/or,
Described monitoring threshold value includes: monitoring number of times or storage and monitoring time segment.
The device under stress test, cpu performance being monitored the most according to claim 6, it is characterised in that enter one Step includes:
First determines unit, is used for determining cpu performance monitoring parameter, utilizes described performance monitoring parameter to trigger described deployment unit Perform the deployment to described cpu performance monitoring script;
Wherein, described performance monitoring parameter includes: at least one in cpu busy percentage, CPU power consumption, cpu frequency and cpu temperature.
The device under stress test, cpu performance being monitored the most according to claim 8, it is characterised in that
Described amending unit, specifically for:
By the first formula, described pressure testing results is modified:
Described first formula includes:
V = c U T P abFT 0 V 0
Wherein, V is used for characterizing revised described pressure testing results;
V0For characterizing described pressure testing results;
A, b, c are constant;
U is for characterizing the cpu busy percentage that described performance monitoring result includes;
P is for characterizing the CPU power consumption that described performance monitoring result includes;
F is for characterizing the cpu frequency that described performance monitoring result includes;
T is for characterizing the cpu temperature that described performance monitoring result includes;
T0Cpu temperature when the operating power characterizing CPU, running voltage, zero load.
10. according to the described device under stress test, cpu performance being monitored arbitrary in claim 6-9, its feature It is, farther includes:
Second determines unit, for determining the storage position that described performance monitoring result is corresponding;
Inspection unit, for checking whether described storage position includes that the last time carries out the result of storage during performance monitoring, if Including, then the result that described storage position stores is deleted;
Second processing unit, for running the described performance monitoring knot obtained after described cpu performance monitoring script each time Fruit storage is to described storage position.
CN201610639938.7A 2016-08-05 2016-08-05 A kind of method and device that cpu performance is monitored under pressure test Active CN106326067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610639938.7A CN106326067B (en) 2016-08-05 2016-08-05 A kind of method and device that cpu performance is monitored under pressure test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610639938.7A CN106326067B (en) 2016-08-05 2016-08-05 A kind of method and device that cpu performance is monitored under pressure test

Publications (2)

Publication Number Publication Date
CN106326067A true CN106326067A (en) 2017-01-11
CN106326067B CN106326067B (en) 2019-03-05

Family

ID=57740771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610639938.7A Active CN106326067B (en) 2016-08-05 2016-08-05 A kind of method and device that cpu performance is monitored under pressure test

Country Status (1)

Country Link
CN (1) CN106326067B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391337A (en) * 2017-07-18 2017-11-24 郑州云海信息技术有限公司 A kind of data monitoring method and device
CN107688535A (en) * 2017-08-15 2018-02-13 武汉斗鱼网络科技有限公司 A kind of mobile device APP performance data display methods and device
CN107908517A (en) * 2017-12-07 2018-04-13 郑州云海信息技术有限公司 A kind of CPU method for testing pressure based on shell scripts
CN107943638A (en) * 2017-12-14 2018-04-20 郑州云海信息技术有限公司 A kind of test of CPU stability and appraisal procedure and system
CN108763043A (en) * 2018-05-28 2018-11-06 郑州云海信息技术有限公司 Acquisition methods, the apparatus and system of pressure testing data in a kind of storage device
CN108845907A (en) * 2018-08-14 2018-11-20 郑州云海信息技术有限公司 A kind of test method being operating abnormally based on IPMITool analysis CPU
CN108874608A (en) * 2018-07-03 2018-11-23 郑州云海信息技术有限公司 A kind of method, apparatus and computer storage medium of pressure test
CN109086184A (en) * 2018-07-18 2018-12-25 郑州云海信息技术有限公司 The monitoring method of GPU pressure test under a kind of server Linux system
CN109344025A (en) * 2018-07-27 2019-02-15 网宿科技股份有限公司 Cpu performance is from monitoring method and server
CN109656796A (en) * 2018-12-14 2019-04-19 武汉斗鱼鱼乐网络科技有限公司 A kind of task selection method and device
CN109828871A (en) * 2018-12-25 2019-05-31 北京奇安信科技有限公司 Equipment automatization test macro
CN111538636A (en) * 2020-04-24 2020-08-14 深圳华锐金融技术股份有限公司 Computer equipment determination method and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130091373A1 (en) * 2011-10-06 2013-04-11 Qi-Yan Luo Monitoring device and method for monitoring power parameters of central processing unit of computing device
CN103294579A (en) * 2013-06-09 2013-09-11 浪潮电子信息产业股份有限公司 Method for testing high-performance computing cluster application performance
CN104202220A (en) * 2014-09-19 2014-12-10 北京国双科技有限公司 Pressure test method and pressure test device
CN104754608A (en) * 2013-12-25 2015-07-01 腾讯科技(深圳)有限公司 Method and system for monitoring performances of mobile terminal
CN105045693A (en) * 2015-07-24 2015-11-11 浪潮电子信息产业股份有限公司 PTU (Parallel Transmission Unit) tool based CPU (Central Processing Unit) and memory pressure change test method
CN105468522A (en) * 2015-11-20 2016-04-06 浪潮电子信息产业股份有限公司 Linux system CPU load control-based software pressure test method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130091373A1 (en) * 2011-10-06 2013-04-11 Qi-Yan Luo Monitoring device and method for monitoring power parameters of central processing unit of computing device
CN103294579A (en) * 2013-06-09 2013-09-11 浪潮电子信息产业股份有限公司 Method for testing high-performance computing cluster application performance
CN104754608A (en) * 2013-12-25 2015-07-01 腾讯科技(深圳)有限公司 Method and system for monitoring performances of mobile terminal
CN104202220A (en) * 2014-09-19 2014-12-10 北京国双科技有限公司 Pressure test method and pressure test device
CN105045693A (en) * 2015-07-24 2015-11-11 浪潮电子信息产业股份有限公司 PTU (Parallel Transmission Unit) tool based CPU (Central Processing Unit) and memory pressure change test method
CN105468522A (en) * 2015-11-20 2016-04-06 浪潮电子信息产业股份有限公司 Linux system CPU load control-based software pressure test method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391337A (en) * 2017-07-18 2017-11-24 郑州云海信息技术有限公司 A kind of data monitoring method and device
CN107688535A (en) * 2017-08-15 2018-02-13 武汉斗鱼网络科技有限公司 A kind of mobile device APP performance data display methods and device
CN107908517A (en) * 2017-12-07 2018-04-13 郑州云海信息技术有限公司 A kind of CPU method for testing pressure based on shell scripts
CN107943638A (en) * 2017-12-14 2018-04-20 郑州云海信息技术有限公司 A kind of test of CPU stability and appraisal procedure and system
CN108763043A (en) * 2018-05-28 2018-11-06 郑州云海信息技术有限公司 Acquisition methods, the apparatus and system of pressure testing data in a kind of storage device
CN108874608A (en) * 2018-07-03 2018-11-23 郑州云海信息技术有限公司 A kind of method, apparatus and computer storage medium of pressure test
CN109086184A (en) * 2018-07-18 2018-12-25 郑州云海信息技术有限公司 The monitoring method of GPU pressure test under a kind of server Linux system
CN109344025A (en) * 2018-07-27 2019-02-15 网宿科技股份有限公司 Cpu performance is from monitoring method and server
CN109344025B (en) * 2018-07-27 2022-06-17 网宿科技股份有限公司 CPU performance self-monitoring method and server
CN108845907A (en) * 2018-08-14 2018-11-20 郑州云海信息技术有限公司 A kind of test method being operating abnormally based on IPMITool analysis CPU
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
CN109828871A (en) * 2018-12-25 2019-05-31 北京奇安信科技有限公司 Equipment automatization test macro
CN111538636A (en) * 2020-04-24 2020-08-14 深圳华锐金融技术股份有限公司 Computer equipment determination method and device and storage medium
CN111538636B (en) * 2020-04-24 2021-11-19 深圳华锐金融技术股份有限公司 Computer equipment determination method and device and storage medium

Also Published As

Publication number Publication date
CN106326067B (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN106326067A (en) Method and device for monitoring CPU (central processing unit) performance under pressure test
EP2976716B1 (en) Prioritization of tests of computer program code
D’Ambros et al. Evaluating defect prediction approaches: a benchmark and an extensive comparison
US9734263B2 (en) Method and apparatus for efficient pre-silicon debug
Barbour et al. An empirical study of faults in late propagation clone genealogies
US9703690B2 (en) Determining test case efficiency
CN106557413A (en) Based on the method and apparatus that code coverage obtains test case
US8219856B2 (en) Memory growth detection
Perez et al. A dynamic code coverage approach to maximize fault localization efficiency
US20110055777A1 (en) Verification of Soft Error Resilience
Tang et al. Predicting vulnerable components via text mining or software metrics? An effort-aware perspective
CN111753306B (en) Intelligent contract vulnerability detection method and device, electronic equipment and storage medium
Batra Improving quality using testing strategies
Nouman et al. Software testing: A survey and tutorial on white and black-box testing of C/C++ programs
US9842044B2 (en) Commit sensitive tests
CN110704303B (en) Method and device for acquiring test coverage information
CN104063307A (en) Software testing method and system
Huo et al. Interpreting coverage information using direct and indirect coverage
US8464103B2 (en) Generating a functional coverage model from a trace
CN113127331B (en) Test method and device based on fault injection and computer equipment
CN107402883B (en) A kind of data test treating method and apparatus
CN115080426A (en) Program file detection method and device, storage medium and electronic equipment
US8856755B2 (en) Dominant-state-based coverage metric
Dash et al. Maintainability Measurement in Object Oriented Paradigm.
US8458523B2 (en) Meta attributes in functional coverage models

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant