CN111813632A - CPU power consumption test method, test device, test equipment and storage medium - Google Patents

CPU power consumption test method, test device, test equipment and storage medium Download PDF

Info

Publication number
CN111813632A
CN111813632A CN202010693139.4A CN202010693139A CN111813632A CN 111813632 A CN111813632 A CN 111813632A CN 202010693139 A CN202010693139 A CN 202010693139A CN 111813632 A CN111813632 A CN 111813632A
Authority
CN
China
Prior art keywords
cpu
test
tested
power consumption
preset
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
Application number
CN202010693139.4A
Other languages
Chinese (zh)
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202010693139.4A priority Critical patent/CN111813632A/en
Publication of CN111813632A publication Critical patent/CN111813632A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F11/3062Monitoring 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 where the monitored property is the power consumption
    • 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/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a method, a device and a storage medium for testing the power consumption of a CPU (Central processing Unit). according to a preset interval for presetting test parameters, after the CPU is connected with the CPU to be tested, a preset configuration script is called to configure the test parameters of the CPU to be tested into set values in the corresponding preset interval, the preset test script is called to carry out power consumption test on the CPU to be tested, so that a power consumption test result corresponding to the set values is obtained, if the state parameters of the CPU to be tested do not reach preset early warning threshold values, the preset configuration script is called to adjust the set values of the test parameters in the preset interval, then the preset test script is continuously called to carry out power consumption test on the CPU to be tested, the test personnel do not need to manually configure the test parameters of the CPU to be tested, more test groups can be efficiently tested, and the maximum calculation potential of.

Description

CPU power consumption test method, test device, test equipment and storage medium
Technical Field
The present invention relates to the field of CPU testing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for testing CPU power consumption.
Background
In the product research and development test, in order to guarantee the product quality and meet the customer requirements, various problems of the sample machine can be verified in the test stage, the encountered problems can be corrected as much as possible, and the research and development period is shortened in order to improve the verification efficiency and the test automation rate. The testing of the power consumption of the CPU of the equipment is an important ring for the equipment testing, and whether the power consumption testing of the CPU is accurate or not influences the correct evaluation of the quality of the equipment.
At present, the method for testing the power consumption of a CPU generally includes running a test script and power consumption monitoring software on a device to be tested, running various programs to test various functions of a system, and further obtaining corresponding power consumption data of the system. The CPU operates different cores in different operation states, and the corresponding power consumption test results are different. Therefore, different running modes of the CPU need to be tested, and the CPU needs to be configured to have different core numbers and be tested corresponding to different test groups. Other parameters associated with the CPU operating mode are the same. It can be seen that in the current test, a tester needs to participate in the configuration process of the CPU running mode to a great extent, in order to improve the test efficiency, the tester often selects a small number of test groups corresponding to different configurations of each parameter to perform the CPU power consumption test, the test groups are set depending on the experience of the tester, and this often results in that the test groups set by the tester cannot mine the calculation potential of the CPU, and then cannot accurately evaluate the CPU quality.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for testing the power consumption of a CPU (Central processing Unit), which are used for efficiently mining the computing potential of the CPU and accurately evaluating the quality of the CPU.
In order to solve the above technical problem, the present invention provides a method for testing CPU power consumption, including:
after the CPU to be tested is connected, calling a preset configuration script to configure the test parameters of the CPU to be tested into set values;
calling a preset test script to carry out power consumption test on the CPU to be tested to obtain a power consumption test result corresponding to the set value;
judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold value or not;
if yes, ending the test and outputting each power consumption test result;
if not, calling the preset configuration script to adjust the set value of each test parameter according to a preset rule, and returning to the step of calling the preset test script to perform power consumption test on the CPU to be tested to obtain a power consumption test result corresponding to the set value;
the test parameters at least comprise a core number and a calculation quantity parameter, and the set value of each test parameter is in a preset interval corresponding to the test parameter.
Optionally, the calling the preset configuration script adjusts the set value of each test parameter according to a preset rule, specifically:
and calling the preset configuration script, and increasing the set value of at least one test parameter in the test parameters according to a preset proportion.
Optionally, the preset early warning threshold specifically includes a temperature early warning threshold and a CPU utilization rate early warning threshold;
correspondingly, the judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold specifically includes:
acquiring the temperature state parameter of the CPU to be tested and the utilization rate of the CPU to be tested;
judging whether at least one of the temperature state parameter of the CPU to be tested reaching the temperature early warning threshold and the utilization rate of the CPU to be tested reaching the CPU utilization rate early warning threshold is met;
if so, determining that the state parameter of the CPU to be tested reaches the preset early warning threshold value;
if not, determining that the state parameter of the CPU to be tested does not reach the preset early warning threshold value.
Optionally, the method further includes:
and calculating the percentage of the set value of each current test parameter according to the preset interval of each test parameter and the set value of each current test parameter.
Optionally, the method further includes:
and performing weighted calculation on the percentage of each calculated quantity parameter according to a preset weight corresponding to each calculated quantity parameter to obtain the operating pressure percentage of the CPU to be measured.
Optionally, when the state parameter of the CPU to be tested reaches the preset early warning threshold, the method further includes:
and sending error reporting information to prompt that the current power consumption test result is invalid.
Optionally, the method further includes:
generating a power consumption test log of the CPU to be tested and a curve graph between each test parameter and the power consumption test result according to each power consumption test result;
and outputting the power consumption test log and the graph.
In order to solve the above technical problem, the present invention further provides a CPU power consumption testing apparatus, including:
the configuration unit is used for calling a preset configuration script to configure the test parameters of the CPU to be tested into set values after the CPU to be tested is connected;
the testing unit is used for calling a preset testing script to carry out power consumption testing on the CPU to be tested to obtain a power consumption testing result corresponding to the set value;
the judging unit is used for judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold value or not; if yes, outputting each power consumption test result; if not, the configuration unit is entered to call the preset configuration script to adjust the set value of each test parameter according to the preset rule, and then the test unit is returned;
the test parameters at least comprise a core number and a calculation quantity parameter, and the set value of each test parameter is in a preset interval corresponding to the test parameter.
In order to solve the above technical problem, the present invention further provides a CPU power consumption test apparatus, including:
a memory for storing instructions, wherein the instructions comprise the steps of any one of the methods for testing the power consumption of the CPU;
a processor to execute the instructions.
In order to solve the above technical problem, the present invention further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for testing CPU power consumption as described in any one of the above.
The CPU power consumption testing method comprises the steps of presetting a preset interval comprising test parameters such as a core number and a calculated quantity parameter, calling a preset configuration script to configure the test parameters of the CPU to be tested into a set value in the corresponding preset interval after the CPU to be tested is connected, calling the preset test script to carry out power consumption testing on the CPU to be tested, obtaining a power consumption testing result corresponding to the set value, calling the preset configuration script to adjust the set value of each test parameter in the preset interval and then continuing calling the preset test script to carry out power consumption testing on the CPU to be tested if the state parameter of the CPU to be tested does not reach the preset early warning threshold value at the moment, namely the current CPU to be tested does not exert the maximum calculating capacity. The test parameters of the CPU to be tested are automatically configured by the preset configuration script through setting intervals of the test parameters, the power consumption test of the CPU to be tested is automatically carried out by the preset test script, and the test parameters of the CPU to be tested are not required to be manually configured by a tester, so that more test groups can be efficiently tested, the maximum calculation potential of the CPU to be tested is beneficially excavated, and an accurate CPU quality evaluation result is obtained.
The invention also provides a testing device, a testing device and a storage medium for the CPU power consumption, which have the beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for testing CPU power consumption according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a CPU power consumption testing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for testing CPU power consumption according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a method, a device and a storage medium for testing the CPU power consumption, which are used for efficiently mining the computing potential of the CPU and accurately evaluating the CPU quality.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for testing CPU power consumption according to an embodiment of the present invention.
As shown in fig. 1, the method for testing CPU power consumption according to the embodiment of the present invention includes:
s101: and after the CPU to be tested is connected, calling a preset configuration script to configure the test parameters of the CPU to be tested into set values.
S102: and calling a preset test script to carry out power consumption test on the CPU to be tested to obtain a power consumption test result corresponding to the set value.
The testing parameters at least comprise the number of cores and the calculation quantity parameters, and the set value of each testing parameter is in a preset interval corresponding to the testing parameter.
In a specific implementation, a connection is established with a CPU under test of a device under test based on a test host.
The method comprises the steps of writing a preset configuration script and a preset test script aiming at a CPU to be tested in advance, configuring test parameters, such as the number of cores, calculation quantity parameters and the like, of the CPU to be tested by using the preset configuration script when the test is executed, and testing the power consumption of the configured CPU to be tested by using the preset test script. In the CPU power consumption test scheme in the prior art, various indexes of the CPU to be tested need to be configured, so that the CPU to be tested operates in different operating modes, the indexes are the test parameters in the embodiment of the present invention, and the types of the test parameters, including but not limited to the number of cores and the calculation amount parameters, may be set according to the configuration that needs to be adjusted in the operating process of the CPU to be tested. Each test parameter has different setting value making modes, and the setting values of the test parameters form a test group corresponding to the configuration of each index of the CPU to be tested. The calculation quantity parameters include numerical values obtained by quantizing calculation tasks executed by the CPU to be measured, and in general, the CPU to be measured corresponds to a plurality of calculation quantity parameters when executing a plurality of different calculation tasks.
S103: judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold value or not; if yes, go to step S104; if not, the process proceeds to step S105.
S104: and finishing the test and outputting each power consumption test result.
The preset early warning threshold is used for limiting the running state of the CPU to be detected, and specifically comprises a temperature early warning threshold and a CPU utilization rate early warning threshold;
correspondingly, step S103 specifically includes:
acquiring temperature state parameters of a CPU to be tested and the utilization rate of the CPU to be tested;
judging whether at least one of the temperature state parameter of the CPU to be detected reaching a temperature early warning threshold value and the utilization rate of the CPU to be detected reaching a CPU utilization rate early warning threshold value is met;
if yes, determining that the state parameter of the CPU to be tested reaches a preset early warning threshold value;
if not, determining that the state parameter of the CPU to be tested does not reach the preset early warning threshold value.
The running temperature of the CPU to be tested is obtained by arranging an external temperature detection device or communicating with a Baseboard Management Controller (BMC) and the like of the device where the CPU to be tested is located, specifically expressed by temperature state parameters, and compared with a temperature early warning threshold (a part exceeding the safe running temperature) of the CPU to be tested, when the temperature state parameters of the CPU to be tested reach the temperature early warning threshold, the test is stopped, and the damage of the CPU to be tested is avoided.
The utilization rate of the CPU to be tested can be obtained through checking by a third-party tool.
The method comprises the steps of setting calculation categories of calculation tasks which can be executed by a CPU to be detected in advance according to the type of the CPU to be detected, and setting corresponding preset weights for the calculation categories. When the power consumption of the CPU to be tested is tested, the real-time calculation data of the CPU to be tested is obtained, calculation categories contained in the real-time calculation data are identified, and weighted calculation is carried out on each identified calculation category and corresponding calculated quantity according to the preset weight of the calculation category, so that the utilization rate of the CPU to be tested is obtained. And when the utilization rate of the CPU to be tested reaches the CPU utilization rate early warning threshold value, the test is stopped, and the damage caused by overload operation of the CPU to be tested is avoided.
Therefore, if at least one of two events that the temperature state parameter of the CPU to be tested reaches the temperature early warning threshold and the utilization rate of the CPU to be tested reaches the CPU utilization rate early warning threshold occurs, the safety threshold of the CPU to be tested is reached, the test is finished to avoid the damage of the CPU to be tested, and the power consumption test result corresponding to each test group is output.
It can be understood that other state parameters can be set for monitoring, and the damage of the CPU to be tested in the power consumption test is avoided.
S105: and after the preset configuration script is called to adjust the set values of the test parameters according to the preset rules, the step S103 is returned to.
If all the state parameters of the CPU to be tested do not reach the preset early warning threshold value, the CPU to be tested is in a safe operation state, and the CPU to be tested can be pressurized at the moment to mine the computing capacity of the CPU to be tested.
In a preferred embodiment, in step S101, the setting values of the test parameters are set to the minimum value (or the value corresponding to the minimum computing capability of the CPU to be tested) within the corresponding preset interval, for example, the number of cores of the CPU to be tested is set to be a single core in the first test.
Then, in step S105, a preset configuration script is called to adjust the setting value of each test parameter according to a preset rule, which may specifically be: and calling a preset configuration script, and increasing the set value of at least one test parameter in the test parameters according to a preset proportion. Presetting the preset proportion corresponding to each test parameter, namely increasing the value each time, for example, increasing one core once when the number of cores of the CPU to be tested is adjusted.
In addition, in step S105, the preset configuration script is called to adjust the setting value of each test parameter according to the preset rule, or the preset configuration script is called to increase the setting value of each test parameter according to the corresponding ratio, and the setting values of all the test parameters are increased in proportion in each power consumption test, which is helpful to accelerate the test progress, but the test precision may be worse than the above-mentioned scheme.
According to the CPU power consumption testing method provided by the embodiment of the invention, through presetting a preset interval comprising test parameters such as the number of cores and the calculation quantity parameter, after the CPU to be tested is connected, a preset configuration script is called to configure the test parameters of the CPU to be tested into a set value in the corresponding preset interval, the preset test script is called to carry out power consumption testing on the CPU to be tested, a power consumption testing result corresponding to the set value is obtained, if the state parameter of the CPU to be tested does not reach a preset early warning threshold value at the moment, namely the current CPU to be tested does not exert the maximum calculation capacity, the preset configuration script is called to adjust the set value of each test parameter in the preset interval, and then the preset test script is continuously called to carry out power consumption testing on the CPU to be. The test parameters of the CPU to be tested are automatically configured by the preset configuration script through setting intervals of the test parameters, the power consumption test of the CPU to be tested is automatically carried out by the preset test script, and the test parameters of the CPU to be tested are not required to be manually configured by a tester, so that more test groups can be efficiently tested, the maximum calculation potential of the CPU to be tested is beneficially excavated, and an accurate CPU quality evaluation result is obtained.
On the basis of the foregoing embodiment, the method for testing CPU power consumption according to the embodiment of the present invention may further include:
and calculating the percentage of the set value of each current test parameter according to the preset interval of each test parameter and the set value of each current test parameter.
In each power consumption test, the percentage of the set value of each current test parameter is calculated, and the set value is controlled to be displayed on a display screen, so that a user can check the test progress.
Further, the method for testing the CPU power consumption provided by the embodiment of the present invention further includes:
and performing weighted calculation on the percentage of each calculated quantity parameter according to a preset weight corresponding to each calculated quantity parameter to obtain the operating pressure percentage of the CPU to be measured.
The percentage of each calculated quantity parameter is integrated into the operating pressure percentage of the CPU to be tested, and the operating pressure percentage is controlled to be displayed on a display screen, so that a user can check the test progress.
And when the test is finished, outputting each power consumption test result and outputting the percentage of each test parameter corresponding to each power consumption test result.
On the basis of the foregoing embodiment, when the determination result in step S103 is that the state parameter of the CPU to be tested reaches the preset early warning threshold, the method for testing the power consumption of the CPU provided in the embodiment of the present invention may further include:
and sending error reporting information to prompt that the current power consumption test result is invalid.
If the state parameter of the CPU to be tested reaches the preset early warning threshold value, the safe operation range of the CPU to be tested is exceeded, and the obtained power consumption test result does not belong to the test result which can be reached when the CPU to be tested normally operates, and the power consumption test result is recorded as invalid.
On the basis of the foregoing embodiment, the method for testing CPU power consumption according to the embodiment of the present invention may further include:
generating a power consumption test log of the CPU to be tested and a curve graph between each test parameter and the power consumption test result according to each power consumption test result;
and outputting the power consumption test log and the curve graph.
By writing a log script and a drawing script in advance, after the test is finished in step S104, and power consumption test results obtained by each test are obtained, the power consumption test results are recorded as a power consumption test log and a curve graph and output so that a worker can visually check the power consumption test results of the CPU to be tested, the relation between the CPU power consumption and each test parameter is determined, and the worker can rapidly assess the quality level of the CPU to be tested.
On the basis of the above detailed description of each embodiment corresponding to the method for testing the CPU power consumption, the invention also discloses a device, a device and a storage medium for testing the CPU power consumption corresponding to the method.
Fig. 2 is a schematic structural diagram of a CPU power consumption testing apparatus according to an embodiment of the present invention.
As shown in fig. 2, a device for testing CPU power consumption according to an embodiment of the present invention includes:
the configuration unit 201 is configured to invoke a preset configuration script to configure the test parameters of the CPU to be tested into set values after being connected with the CPU to be tested;
the test unit 202 is used for calling a preset test script to perform power consumption test on the CPU to be tested to obtain a power consumption test result corresponding to a set value;
a judging unit 203, configured to judge whether a state parameter of the CPU to be tested reaches a preset early warning threshold; if yes, outputting each power consumption test result; if not, the entering configuration unit calls a preset configuration script to adjust the set values of the test parameters according to the preset rules, and then the test unit 202 returns;
the testing parameters at least comprise the number of cores and the calculation quantity parameters, and the set value of each testing parameter is in a preset interval corresponding to the testing parameter.
Since the embodiments of the apparatus portion and the method portion correspond to each other, please refer to the description of the embodiments of the method portion for the embodiments of the apparatus portion, which is not repeated here.
Fig. 3 is a schematic structural diagram of a device for testing CPU power consumption according to an embodiment of the present invention.
As shown in fig. 3, the test apparatus for CPU power consumption according to the embodiment of the present invention includes:
a memory 310 for storing instructions, the instructions comprising the steps of the method for testing CPU power consumption according to any one of the above embodiments;
a processor 320 for executing the instructions.
Processor 320 may include one or more processing cores, such as a 3-core processor, an 8-core processor, and so forth. The processor 320 may be implemented in at least one hardware form of a digital Signal processing dsp (digital Signal processing), a Field-Programmable Gate Array (FPGA), a Programmable logic Array (pla), or a Programmable logic Array (logjcray). The processor 320 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a central processing unit (cpu); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 320 may be integrated with an image processor GPU (graphics Processing unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, processor 320 may also include an Artificial Intelligence (AI) (artificial intelligence) processor for processing computational operations related to machine learning.
Memory 310 may include one or more storage media, which may be non-transitory. Memory 310 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 310 is at least used for storing a computer program 311, wherein after the computer program 311 is loaded and executed by the processor 320, the relevant steps in the method for testing the CPU power consumption disclosed in any one of the foregoing embodiments can be implemented. In addition, the resources stored by the memory 310 may also include an operating system 312, data 313, and the like, and the storage may be transient storage or persistent storage. The operating system 312 may be Windows, among others. Data 313 may include, but is not limited to, data involved in the above-described methods.
In some embodiments, the CPU power consumption testing apparatus may further include a display 330, a power supply 340, a communication interface 350, an input output interface 360, a sensor 370, and a communication bus 380.
Those skilled in the art will appreciate that the configuration shown in FIG. 3 does not constitute a limitation of the test equipment for CPU power consumption and may include more or fewer components than those shown.
The test device for the CPU power consumption provided by the embodiment of the application comprises the memory and the processor, and the processor can realize the test method for the CPU power consumption when executing the program stored in the memory, and the effect is the same as the above.
It should be noted that the above-described embodiments of the apparatus and device are merely illustrative, for example, the division of modules is only one division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form. Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and performs all or part of the steps of the methods according to the embodiments of the present invention, or all or part of the technical solution.
To this end, an embodiment of the present invention further provides a storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the test method, such as CPU power consumption, are implemented.
The storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory ROM (Read-Only Memory), a random Access Memory ram (random Access Memory), a magnetic disk, or an optical disk.
The computer program contained in the storage medium provided in this embodiment can implement the steps of the method for testing CPU power consumption described above when executed by the processor, and the effect is the same as above.
The detailed description of the CPU power consumption test method, the CPU power consumption test apparatus, the CPU power consumption test device, and the CPU power consumption storage medium provided by the present invention is described above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device, the equipment and the storage medium disclosed by the embodiment correspond to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications are also within the scope of the present invention as defined in the appended claims.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method for testing CPU power consumption is characterized by comprising the following steps:
after the CPU to be tested is connected, calling a preset configuration script to configure the test parameters of the CPU to be tested into set values;
calling a preset test script to carry out power consumption test on the CPU to be tested to obtain a power consumption test result corresponding to the set value;
judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold value or not;
if yes, outputting each power consumption test result;
if not, calling the preset configuration script to adjust the set value of each test parameter according to a preset rule, and returning to the step of calling the preset test script to perform power consumption test on the CPU to be tested to obtain a power consumption test result corresponding to the set value;
the test parameters at least comprise a core number and a calculation quantity parameter, and the set value of each test parameter is in a preset interval corresponding to the test parameter.
2. The testing method according to claim 1, wherein the calling the preset configuration script adjusts the setting value of each testing parameter according to a preset rule, specifically:
and calling the preset configuration script, and increasing the set value of at least one test parameter in the test parameters according to a preset proportion.
3. The testing method according to claim 1, wherein the preset early warning threshold specifically comprises a temperature early warning threshold and a CPU utilization rate early warning threshold;
correspondingly, the judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold specifically includes:
acquiring the temperature state parameter of the CPU to be tested and the utilization rate of the CPU to be tested;
judging whether at least one of the temperature state parameter of the CPU to be tested reaching the temperature early warning threshold and the utilization rate of the CPU to be tested reaching the CPU utilization rate early warning threshold is met;
if so, determining that the state parameter of the CPU to be tested reaches the preset early warning threshold value;
if not, determining that the state parameter of the CPU to be tested does not reach the preset early warning threshold value.
4. The test method of claim 1, further comprising:
and calculating the percentage of the set value of each current test parameter according to the preset interval of each test parameter and the set value of each current test parameter.
5. The test method of claim 4, further comprising:
and performing weighted calculation on the percentage of each calculated quantity parameter according to a preset weight corresponding to each calculated quantity parameter to obtain the operating pressure percentage of the CPU to be measured.
6. The testing method according to claim 1, wherein when the state parameter of the CPU to be tested reaches the preset early warning threshold, the method further comprises:
and sending error reporting information to prompt that the current power consumption test result is invalid.
7. The test method of claim 1, further comprising:
generating a power consumption test log of the CPU to be tested and a curve graph between each test parameter and the power consumption test result according to each power consumption test result;
and outputting the power consumption test log and the graph.
8. An apparatus for testing CPU power consumption, comprising:
the configuration unit is used for calling a preset configuration script to configure the test parameters of the CPU to be tested into set values after the CPU to be tested is connected;
the testing unit is used for calling a preset testing script to carry out power consumption testing on the CPU to be tested to obtain a power consumption testing result corresponding to the set value;
the judging unit is used for judging whether the state parameter of the CPU to be tested reaches a preset early warning threshold value or not; if yes, outputting each power consumption test result; if not, the configuration unit is entered to call the preset configuration script to adjust the set value of each test parameter according to the preset rule, and then the test unit is returned;
the test parameters at least comprise a core number and a calculation quantity parameter, and the set value of each test parameter is in a preset interval corresponding to the test parameter.
9. A test apparatus for CPU power consumption, comprising:
a memory for storing instructions, the instructions comprising the steps of the method for testing the power consumption of the CPU of any one of claims 1 to 7;
a processor to execute the instructions.
10. A storage medium having stored thereon a computer program for implementing the steps of the method for testing the power consumption of a CPU according to any one of claims 1 to 7 when executed by a processor.
CN202010693139.4A 2020-07-17 2020-07-17 CPU power consumption test method, test device, test equipment and storage medium Pending CN111813632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010693139.4A CN111813632A (en) 2020-07-17 2020-07-17 CPU power consumption test method, test device, test equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010693139.4A CN111813632A (en) 2020-07-17 2020-07-17 CPU power consumption test method, test device, test equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111813632A true CN111813632A (en) 2020-10-23

Family

ID=72866524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010693139.4A Pending CN111813632A (en) 2020-07-17 2020-07-17 CPU power consumption test method, test device, test equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111813632A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407408A (en) * 2021-06-11 2021-09-17 海光信息技术股份有限公司 Data transmission rule verification method, device, equipment and storage medium
CN113866596A (en) * 2021-09-15 2021-12-31 深圳市航顺芯片技术研发有限公司 Power consumption test method, power consumption test device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104502690A (en) * 2014-12-30 2015-04-08 中科创达软件股份有限公司 CPU power consumption test method and CPU power consumption test system
CN107992388A (en) * 2017-12-13 2018-05-04 郑州云海信息技术有限公司 A kind of method of automatic verification CPU power consumption limitation function
CN110297772A (en) * 2019-06-26 2019-10-01 英业达科技有限公司 Auto-Test System and automatic test approach
CN110580206A (en) * 2019-09-16 2019-12-17 上海保险交易所股份有限公司 Method, medium and control device for pressure testing of a blockchain system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104502690A (en) * 2014-12-30 2015-04-08 中科创达软件股份有限公司 CPU power consumption test method and CPU power consumption test system
CN107992388A (en) * 2017-12-13 2018-05-04 郑州云海信息技术有限公司 A kind of method of automatic verification CPU power consumption limitation function
CN110297772A (en) * 2019-06-26 2019-10-01 英业达科技有限公司 Auto-Test System and automatic test approach
CN110580206A (en) * 2019-09-16 2019-12-17 上海保险交易所股份有限公司 Method, medium and control device for pressure testing of a blockchain system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407408A (en) * 2021-06-11 2021-09-17 海光信息技术股份有限公司 Data transmission rule verification method, device, equipment and storage medium
CN113407408B (en) * 2021-06-11 2024-01-26 海光信息技术股份有限公司 Data transmission rule verification method, device, equipment and storage medium
CN113866596A (en) * 2021-09-15 2021-12-31 深圳市航顺芯片技术研发有限公司 Power consumption test method, power consumption test device and storage medium
CN113866596B (en) * 2021-09-15 2024-05-03 深圳市航顺芯片技术研发有限公司 Power consumption testing method, power consumption testing device and storage medium

Similar Documents

Publication Publication Date Title
CN107992401B (en) Performance test evaluation method and device, terminal equipment and storage medium
CN111813632A (en) CPU power consumption test method, test device, test equipment and storage medium
CN111211937B (en) Method, device and system for testing stability of server link signals
CN116413604A (en) Battery parameter monitoring method, system, device and storage medium
CN114327983A (en) Log-based fault determination method, device, equipment and medium
CN112965903A (en) Test method, test device, electronic equipment and computer readable storage medium
CN112100067B (en) Regression analysis-based test method, system and storage medium
CN113514792A (en) Method and device for detecting signals at interface of modular electric energy meter and medium
CN111124818B (en) Monitoring method, device and equipment for Expander
CN113608953B (en) Test data generation method and device, electronic equipment and readable storage medium
CN111008119A (en) Method, device, equipment and medium for updating hard disk prediction model
CN116679139A (en) Cable replacement monitoring system and method
CN115236525A (en) Echelon battery screening method, device and medium
CN114298226A (en) Fault diagnosis method, device and medium for nuclear power plant
CN114462710A (en) Short-term prediction method, device and medium for fan generated power
CN113704871A (en) Wheel bending fatigue determination method and device, terminal device and medium
CN111611117A (en) Hard disk fault prediction method, device, equipment and computer readable storage medium
CN110798385B (en) Method, device, equipment and medium for testing wide area network access setting function
CN115426282B (en) Voltage abnormality detection method, system, electronic device and storage medium
CN110673977B (en) Data recovery optimization method, device, equipment and medium
CN114154838B (en) Product compatibility decision platform, method and storage medium
CN116627759B (en) Financial payment equipment circuit safety detection device
CN115374012A (en) Automatic regression testing method and device, electronic equipment and storage medium
CN115219934A (en) Method, device and medium for evaluating health condition of single battery
CN115756982A (en) Method and device for testing system management interrupt response duration

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201023