CN1968057A - A testing method for communication device - Google Patents
A testing method for communication device Download PDFInfo
- Publication number
- CN1968057A CN1968057A CNA200610086576XA CN200610086576A CN1968057A CN 1968057 A CN1968057 A CN 1968057A CN A200610086576X A CNA200610086576X A CN A200610086576XA CN 200610086576 A CN200610086576 A CN 200610086576A CN 1968057 A CN1968057 A CN 1968057A
- Authority
- CN
- China
- Prior art keywords
- communication equipment
- cpu usage
- task
- adjustment
- percentage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
The invention relates to a testing method of communicator, which comprises: communicator obtains the CPU occupy rate adjusting percentage; the communicator adjusts CPU occupy rate via said percentage. The invention can adjust the CPU occupy rate, to process property test at demanded load. The inventive testing method has simple process and low cost.
Description
Technical field
The present invention relates to the communications field, relate in particular to a kind of method of testing of communication equipment.
Background technology
Before communication equipment puts into operation, the various performance parameters of equipment tested being very important.Operating load is one of important parameter of equipment performance test, and CPU usage is as the concentrated expression of operating load, in the test of communication equipment, have a very important role, can come the present operating load of understanding equipment by calculating the current CPU usage of communication equipment.
For the performance of test communications equipment under certain operating load, normally simulate this operating load environment at present by building hardware testing system.In test process,,, just need do continuous adjustment to test macro in order to simulate different operating loads if wish the performance of test communications equipment under different operating loads; In addition, if wish the performance of testing equipment under a certain expectation operating load value, in test macro, accurately simulate this loading condiction also and be not easy to realize; Therefore, above-mentioned method of testing not only cost is higher, and often realizes complexity, and precision is lower.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method of testing of communication equipment, and the expectation operating load condition that reaches analog machine at lower cost is to carry out the purpose of equipment performance test.
For solving the problems of the technologies described above, the objective of the invention is to be achieved through the following technical solutions:
A kind of method of testing of communication equipment comprises:
Communication equipment obtains CPU usage and adjusts percentage;
Communication equipment is adjusted CPU usage according to described adjustment percentage.
Described communication equipment obtains CPU usage adjustment percentage and specifically comprises:
Communication equipment calculates current C PU occupancy;
Communication equipment reports maintenance terminal with this CPU usage numerical value;
Maintenance terminal determines to adjust percentage according to the CPU usage and the CPU usage that reports of communication equipment of expectation;
Maintenance terminal issues definite CPU usage to communication equipment and adjusts percentage.
Described communication equipment obtains CPU usage adjustment percentage and can also comprise:
Default regulation rule in communication equipment;
Communication equipment calculates current C PU occupancy;
Communication equipment is determined CPU usage adjustment percentage according to this CPU usage and default regulation rule.
Wherein, described communication equipment calculating current C PU occupancy specifically comprises:
In communication equipment, create idle task and interrupt task, and idle task is set is minimum at all task medium priorities;
Communication equipment according to priority order is carried out all tasks, does not carry out idle task, the free time of obtaining equipment when other tasks are not carried out;
Carry out interrupt task after the communication equipment operation scheduled time, according to formula: (1-free time/scheduled time) * 100% calculates the CPU usage of communication equipment.
Wherein, described communication equipment specifically comprises according to described adjustment percentage adjustment CPU usage:
Communication equipment is adjusted percentage according to the CPU usage of obtaining and is created the adjustment task, its priority is set is higher than idle task;
Communication equipment is according to priority carried out the task in the operating software in proper order, carries out the adjustment task when other tasks except that idle task are not carried out, and adjusts CPU usage according to described adjustment percentage.
Communication equipment further comprises after percentage is adjusted CPU usage according to adjusting:
Maintenance terminal issues to cancel to communication equipment adjusts order;
Communication equipment is received the adjustment that stops CPU usage after cancelling adjustment orders.
As can be seen from the above technical solutions, the present invention has the following advantages:
In the present invention, after communication equipment obtains CPU usage adjustment percentage, adjust CPU usage according to this percentage, make the CPU usage of equipment reach desired value, just can make the operating load of equipment meet the desired test request, can under this operating load, communicate the performance test of equipment.With at present simulate the operating load of expectation and compare by building hardware testing system, realize that cost is lower.
In addition, if in test, require the desired value of CPU usage to change by rule, by should rule directly being preset in the communication equipment, automatically determine the adjustment percentage of CPU usage by equipment, and constantly adjust the CPU usage of equipment according to the adjustment percentage of determining, the CPU usage that makes equipment changes by the rule of expectation, and compares by the test condition of hardware system simulation expectation, it is convenient and simple to realize, and can reach higher precision.
Description of drawings
Fig. 1 is the flow chart of communication equipment method of testing of the present invention;
Fig. 2 is method of testing embodiment one flow chart of communication equipment of the present invention;
Fig. 3 is method of testing embodiment two flow charts of communication equipment of the present invention.
Embodiment
The present invention is directed at present and mainly carry out the testing cost problem of higher that the equipment performance test causes by the operating load environment of building the hardware testing system artificial traffic equipment, the basic design that proposition addresses this problem, promptly communication equipment carries out the performance test of equipment by the operating load condition that the CPU usage of adjusting self simulates expectation.
In conjunction with Fig. 1, the operating load that communication equipment is simulated expectation by the adjustment CPU usage is realized by the following method:
101, communication equipment calculates current CPU usage.
In order to adjust the CPU usage of communication equipment, at first need to calculate the current C PU occupancy of communication equipment, concrete computational methods are: create an idle task in the operating software of communication equipment, obtain the free time of equipment, the priority that this task is set is minimum in all tasks, promptly only just can not move this task when other all tasks are not moved; Create an interrupt task in addition, behind computing cycle T1 of communication equipment operation, interrupt task can be according to the value of computing cycle T1 and communication equipment free time of carrying out that idle task obtain calculate the CPU usage of equipment in this computing cycle.
102, communication equipment obtains CPU usage according to the CPU usage that calculates and adjusts percentage.
After communication equipment calculates CPU usage, this numerical value can be reported maintenance terminal, determine that according to the CPU usage of this numerical value and expectation the CPU usage of communication equipment adjusts percentage by maintenance terminal, and this percentages is handed down to communication equipment.
In addition, when the expectation CPU usage is when changing by certain rule, also can determine the adjustment percentage of CPU usage automatically according to this rule and current CPU usage by communication equipment.
103, communication equipment is adjusted CPU usage according to the adjustment percentage that obtains, and makes the operating load of equipment meet the desired test request, to communicate the performance test of equipment under this operating load.
Communication equipment is adjusted CPU usage and is realized by carrying out the adjustment task, communication equipment is pre-created an adjustment task before adjustment, its priority is higher than idle task and is lower than other tasks, this adjustment task is that a condition is genuine Infinite Cyclic forever, be T1*D the running time in a computing cycle T1, and D represents CPU usage adjustment percentage; When communication equipment carries out the adjustment of CPU usage, can adjust the running time that percentage is determined the adjustment task by CPU, and when other tasks except that idle task are not carried out, move the adjustment task according to the priority orders of task; By carrying out the adjustment that the adjustment task has promptly realized CPU usage, make the CPU usage of communication equipment reach desired value by adjustment, like this even the operating load of equipment reaches the test request of expectation.
According to said method, below in conjunction with Fig. 2, embodiment one to communication equipment method of testing of the present invention specifically describes, in the present embodiment, order the adjustment percentage that issues CPU usage to communication equipment by maintenance terminal by adjusting, communication equipment is adjusted CPU usage by carrying out the adjustment task, so that equipment reaches the operating load of expectation.After adjusting, maintenance terminal can issue to cancel to adjust to order CPU usage is reverted to the preceding value of adjustment.
Step 201, before communication equipment operation, in the operating software of equipment, create idle task A in advance, it is minimum that its priority is set; This task is that a condition forever is genuine Infinite Cyclic, only global variable N is counted the cumulative time of carrying out idle task with acquisition equipment in a computing cycle T1, the i.e. free time of equipment.
Create interrupt task B in addition, be used for behind operation hours T1, calculating the CPU usage of equipment in this cycle according to the currency of N in the idle task.
In order to realize the adjustment of equipment CPU usage, also need to create one and adjust task S, its priority is set is higher than idle task A and is lower than other tasks; This task is that a condition forever is genuine Infinite Cyclic, and be T1*D the running time of this task in a computing cycle T1, and the initial value that D is set is zero.
Step 202, for fear of the operation of other task influence to computational accuracy, first task P after the equipment of setting brings into operation is that fiducial value is obtained task, carry out at the fixed time and in the T2 global variable M is counted, by 1 realization that M is added up, resulting M and scheduled time T2 are as the fiducial value of calculating CPU usage.
The P that executes the task after step 203, communication equipment bring into operation obtains calculating the fiducial value of CPU usage, and equipment enters normal operating condition afterwards.
Step 204, equipment are according to priority carried out the task in the operating software in proper order, and t running time of equipment is carried out timing; Wherein, when other tasks were not moved, equipment was carried out idle task A, N was counted, by 1 realization that N is added up.
Step 205, when the running time of equipment, t equaled predetermined computation period T 1, count value M that interrupt task B obtains according to the current count value N of idle task with from task P and default T1 and T2 value computing equipment are in the CPU usage in this cycle, and computing formula is:
[1-N×T2/(M×T1)]×100%
Step 206, calculate the CPU usage in this cycle after, communication equipment reports maintenance terminal with the CPU usage numerical value of this calculating.
Step 207, maintenance terminal are determined the adjustment percentage of CPU usage according to the CPU usage value of CPU usage of offering on the communication equipment and expectation, and by adjusting order this numerical value are handed down to communication equipment.
After step 208, communication equipment are received and adjusted order, determine the running time of adjustment task by the adjustment percentage of wherein CPU usage.
Step 209, communication equipment are with N and t zero clearing, according to priority order is moved the adjustment task when other tasks except that idle task are not carried out, realize adjusting the adjustment of CPU usage by the execution of adjusting task S, and the CPU usage behind the calculating adding adjustment task S, result of calculation is reported maintenance terminal.
Whether step 210, maintenance terminal decision stop the adjustment of CPU usage, if stop to adjust, then execution in step 211; If continue to adjust execution in step 212.
Step 211, maintenance terminal issue to cancel to communication equipment adjusts order, and communication equipment deletion adjustment task S stops the adjustment of CPU usage.
Whether step 212, the further decision of maintenance terminal need to continue to adjust CPU usage, and if desired, then execution in step 207, determine the next percent value of adjusting; If do not need, then execution in step 209, continue this adjustment.
In the foregoing description one, be to determine to be handed down to the adjustment that communication equipment is realized the communication equipment CPU usage behind the adjustment percentage of CPU usage by maintenance terminal.Below in conjunction with Fig. 3, embodiment two to communication equipment method of testing of the present invention specifically describes, in the present embodiment, the desired value of CPU usage changes by certain rule, by in communication equipment, presetting the regulation rule of CPU usage, automatically determine to adjust percentage by communication equipment according to this regulation rule, and then realize the dynamic adjustment of CPU usage.
Create interrupt task B in addition, be used for behind operation hours T1, calculating the CPU usage of equipment in this cycle according to the currency of N in the idle task.
The P that executes the task after step 304, communication equipment bring into operation obtains calculating the fiducial value of CPU usage, and equipment enters normal operating condition afterwards.
[1-N×T2/(M×T1)]×100%
After step 307, communication equipment calculate the CPU usage in this cycle, with t zero clearing running time of N and equipment; And determine that according to default regulation rule and the current C PU occupancy that calculates CPU usage adjusts percentage; Communication equipment reports maintenance terminal with this result of calculation simultaneously.
Whether step 308, maintenance terminal decision stop the adjustment of CPU usage, if stop to adjust, then execution in step 309; Otherwise, return step 305, communicate the adjustment of equipment CPU usage.
More than the monitoring method of communication equipment provided by the present invention is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.
Claims (6)
1, a kind of method of testing of communication equipment is characterized in that, described method comprises:
Communication equipment obtains CPU usage and adjusts percentage;
Communication equipment is adjusted CPU usage according to described adjustment percentage.
2, communication equipment method of testing as claimed in claim 1 is characterized in that, described communication equipment obtains CPU usage adjustment percentage and specifically comprises:
Communication equipment calculates current C PU occupancy;
Communication equipment reports maintenance terminal with this CPU usage numerical value;
Maintenance terminal determines to adjust percentage according to the CPU usage and the CPU usage that reports of communication equipment of expectation;
Maintenance terminal issues definite CPU usage to communication equipment and adjusts percentage.
3, communication equipment method of testing as claimed in claim 1 is characterized in that, default regulation rule in communication equipment; Described communication equipment obtains CPU usage adjustment percentage and specifically comprises:
Communication equipment calculates current C PU occupancy;
Communication equipment is determined CPU usage adjustment percentage according to this CPU usage and default regulation rule.
As claim 2 or 3 described communication equipment method of testings, it is characterized in that 4, described communication equipment calculates current C PU occupancy and specifically comprises:
In communication equipment, create idle task and interrupt task, and idle task is set is minimum at all task medium priorities;
Communication equipment according to priority order is carried out all tasks, does not carry out idle task, the free time of obtaining equipment when other tasks are not carried out;
Carry out interrupt task after the communication equipment operation scheduled time, according to formula: (1-free time/scheduled time) * 100% calculates the CPU usage of communication equipment.
5, communication equipment method of testing as claimed in claim 4 is characterized in that, described communication equipment is adjusted CPU usage according to described adjustment percentage and specifically comprised:
Communication equipment is adjusted percentage according to the CPU usage of obtaining and is created the adjustment task, its priority is set is higher than idle task;
Communication equipment is according to priority carried out the task in the operating software in proper order, carries out the adjustment task when other tasks except that idle task are not carried out, and adjusts CPU usage according to described adjustment percentage.
As each described communication equipment method of testing of claim 1 to 3, it is characterized in that 6, communication equipment further comprises after percentage is adjusted CPU usage according to adjusting:
Maintenance terminal issues to cancel to communication equipment adjusts order;
Communication equipment is received the adjustment that stops CPU usage after cancelling adjustment orders.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA200610086576XA CN1968057A (en) | 2006-06-30 | 2006-06-30 | A testing method for communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA200610086576XA CN1968057A (en) | 2006-06-30 | 2006-06-30 | A testing method for communication device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1968057A true CN1968057A (en) | 2007-05-23 |
Family
ID=38076637
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA200610086576XA Pending CN1968057A (en) | 2006-06-30 | 2006-06-30 | A testing method for communication device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1968057A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103441906A (en) * | 2013-09-25 | 2013-12-11 | 哈尔滨工业大学 | System for detecting abnormity of proxy cache cluster based on automatic computing |
CN105893394A (en) * | 2015-01-26 | 2016-08-24 | 华为技术有限公司 | Large file simulation method and device |
CN106897203A (en) * | 2017-03-29 | 2017-06-27 | 北京经纬恒润科技有限公司 | A kind of cpu load rate computational methods and device |
-
2006
- 2006-06-30 CN CNA200610086576XA patent/CN1968057A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103441906A (en) * | 2013-09-25 | 2013-12-11 | 哈尔滨工业大学 | System for detecting abnormity of proxy cache cluster based on automatic computing |
CN103441906B (en) * | 2013-09-25 | 2016-08-24 | 哈尔滨工业大学 | Based on from the proxy caching cluster abnormality detection system of host computer |
CN105893394A (en) * | 2015-01-26 | 2016-08-24 | 华为技术有限公司 | Large file simulation method and device |
CN105893394B (en) * | 2015-01-26 | 2019-12-06 | 华为技术有限公司 | Large file simulation method and device |
CN106897203A (en) * | 2017-03-29 | 2017-06-27 | 北京经纬恒润科技有限公司 | A kind of cpu load rate computational methods and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Karnagel et al. | Adaptive work placement for query processing on heterogeneous computing resources | |
CN106339351A (en) | SGD (Stochastic Gradient Descent) algorithm optimization system and method | |
CN110555785B (en) | Monthly plan safety and stability checking method and system | |
CN1968057A (en) | A testing method for communication device | |
CN105446281B (en) | Processing chamber sends pallet piling up method and system | |
CN107193652A (en) | The flexible resource dispatching method and system of flow data processing system in container cloud environment | |
CN103974081A (en) | HEVC coding method based on multi-core processor Tilera | |
CN104461459A (en) | Fixed-point processing method and device | |
CN102360313A (en) | Performance acceleration method of heterogeneous multi-core computing platform on chip | |
RU2014117270A (en) | DEVICE AND METHOD FOR ADAPTING A CRUISE CONTROL SYSTEM ON A VEHICLE | |
Li et al. | Improving the shuffle of hadoop MapReduce | |
CN103294599A (en) | Cloud-based method for cross test of embedded software | |
CN1755614A (en) | Timer realizing method | |
CN106598693B (en) | Delay strategy-based energy consumption and load sensitive virtual machine integration method | |
CN1687901A (en) | Real time task dispatching method based on interrupt | |
CN101727533B (en) | Automatic BUG distribution method capable of adaptive parameter regulation | |
CN103116809B (en) | The dispatching device of the batch processor of used for products race sequence and method | |
CN1345287A (en) | Device for management and control of elevator group | |
CN1921416A (en) | Method and device for reporting alarming information in distributed system | |
CN1521976A (en) | Data receiving method based on clock signal and apparatus thereof | |
CN115510775A (en) | Uncertainty-considered optimal emergency dispatching flow calculation method and device for river water pollution accident | |
CN1859804A (en) | Load control method | |
Zhou et al. | Scheduling-efficient framework for neural network on heterogeneous distributed systems and mobile edge computing systems | |
Xu et al. | Talos: A weighted speedup-aware device placement of deep learning models | |
CN115034015A (en) | Multistage optimization method for office tower structure system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20070523 |