Energy efficiency test method, apparatus and device
Through energy efficiency testing methods and devices with user-defined test cases and parameters, the problem that existing technology cannot meet the personalized testing needs of different computing devices is solved, and more accurate and flexible energy efficiency testing is achieved.
Patent Information
- Application Number
- PCT/CN2024/077828
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-23
- Filing Date
- 2024-02-20
- Publication Date
- 2024-10-31
AI Technical Summary
Existing computing equipment energy efficiency testing methods and devices cannot meet the personalized testing needs of different types of computing equipment, resulting in inaccurate test results.
Provide an energy efficiency testing method and device that allows users to customize test cases and parameters, obtain and execute user-configured test cases through a test control device, and monitor and display test status and results.
The flexibility and accuracy of energy efficiency testing are improved, making the test results more in line with user needs and suitable for a variety of computing device types.
Smart Images

Figure CN2024077828_31102024_PF_FP_ABST
Abstract
Description
Energy efficiency testing method, device and equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on April 23, 2023, with application number 202310468289.9 and application name “A method, device and equipment for energy efficiency testing”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of performance testing technology, and in particular to an energy efficiency testing method, device and equipment. Background Art
[0004] The energy efficiency of computing devices is a primary indicator of their data processing capabilities. Therefore, testing their energy efficiency is particularly important. However, current energy efficiency testing relies on traditional energy efficiency benchmark software, which comes with a fixed set of test cases and energy efficiency calculation methods. Users can only trigger the benchmark software to test the energy efficiency of a computing device using the fixed set of test cases. The benchmark software then determines the energy efficiency of the computing device based on the status of the test cases in the test case set and the energy efficiency calculation method.
[0005] However, with the increasing variety of computing device hardware and the software running on them, a wide variety of computing devices have emerged. These fixed test case sets can no longer meet the energy efficiency testing needs of different types of computing devices. As a result, the energy efficiency of computing devices obtained using traditional energy efficiency benchmark software cannot accurately reflect the actual energy efficiency level of computing devices.
[0006] Summary of the Invention
[0007] The present application provides an energy efficiency testing method, apparatus, and device for implementing flexible testing of the energy efficiency of computing devices.
[0008] In the first aspect, an embodiment of the present application provides an energy efficiency testing method, which is described below by taking the execution of the method by a test control device as an example. The test control device can perform energy efficiency testing on the device under test by executing the method. In this method: the user can provide or design test cases. The user can actively configure energy efficiency test information or configure energy efficiency test information under the prompt of the test control device. The energy efficiency test information describes at least one test case and energy efficiency test parameters required for the energy efficiency test. The energy efficiency test parameters are the parameters required for the device under test to run at least one test case.
[0009] The test control device obtains energy efficiency test information configured by the user and, under the user's instruction, triggers the device under test to execute at least one test case based on the energy efficiency test parameters. The test control device is capable of monitoring the status of the device under test executing the at least one test case and, based on the status of the device under test executing the at least one test case, displays the energy efficiency test results of the device under test to the user.
[0010] Through the above method, the test control device gives the user greater authority. The user can provide test cases to configure energy efficiency test information according to his or her own needs. The test control device only needs to complete the energy efficiency test of the device under test and display the energy efficiency test results of the device under test according to the energy efficiency test information configured by the user. This makes the energy efficiency test more in line with the user's needs, the test cases are no longer fixed, the flexibility of the energy efficiency test is improved, and the results of the energy efficiency test are also more accurate.
[0011] In one possible implementation, the test control device grants the user permission to customize test cases. The test control device may provide the user with a test case framework, which documents the test case format and identifies the locations of the code that the user needs to edit. The test case framework is a test case that has the primary code omitted. After the user edits the code within the test framework, a test case is generated. The test control device is capable of acquiring at least one test case generated by the user's code editing.
[0012] Through the above method, the test control device gives users the authority to customize test cases, allowing users to design test cases according to their own needs. Test cases are no longer fixed, and the types of test cases increase, further ensuring the flexibility of energy efficiency testing.
[0013] In one possible implementation, the energy efficiency test information acquired by the test control device may include at least one test case file and energy efficiency test parameters provided by a user. The energy efficiency test information may also include the storage path of at least one test case and the energy efficiency test parameters. The test control device acquires at least one test case based on the storage path of the at least one test case.
[0014] Through the above method, the energy efficiency test information is presented in a more flexible form and is suitable for different scenarios.
[0015] In a possible implementation, the energy efficiency test parameters record relevant information for each test case, and the relevant information includes part or all of the following:
[0016] Identification, name, running order, information indicating whether it is enabled, weight when calculating the energy efficiency of the device under test, number of runs (corresponding to the number limit mentioned in the embodiment), preheating running time, running time (corresponding to the running time limit mentioned in the embodiment), the number of processing cores in the device under test that are allowed to be called (corresponding to the mandatory number of instances and the specified number of cores mentioned in the embodiment), input parameters of the test case (corresponding to the custom parameters mentioned in the embodiment), and the command line template for starting the test case (corresponding to the startup command line template mentioned in the embodiment).
[0017] It should be noted that this only lists the information that may be carried in the energy efficiency test parameters, but does not limit the parameter names of various types of information in the energy efficiency test parameters. In the embodiment, Table 1 exemplifies the names of the parameters in the energy efficiency test parameters and the types of parameters included. In addition, in actual applications, the energy efficiency test parameters may also carry other information in addition to the information listed above. All parameters required for the device under test to run at least one test case are applicable to the embodiments of this application.
[0018] Through the above method, the energy efficiency test parameters can include the parameters required for running the test case, ensuring that the device under test can run the test case and ultimately obtain the energy efficiency test results.
[0019] In one possible implementation, the test control device, under the user's instructions, creates and starts an energy efficiency detection task for the device under test, pushes at least one test case to the device under test in the energy efficiency detection task, and controls the device under test to run at least one test case according to energy efficiency test parameters.
[0020] Through the above method, the test control device can complete the energy efficiency test of the device under test under the instruction of the user, ensuring that the energy efficiency test process can meet the user's requirements.
[0021] In one possible implementation, the energy efficiency test displays the real-time status of the energy efficiency test to the user during the process of triggering the device under test to run at least one test case based on the energy efficiency test parameters. The real-time status of the energy efficiency test is used to describe the real-time status of the device under test running at least one test case.
[0022] Through the above method, the energy efficiency test can ensure that the user is aware of the progress of the energy efficiency test in a timely manner by displaying the real-time status of the energy efficiency test to the user.
[0023] In one possible implementation, the real-time status of the energy efficiency test can describe the test cases currently running on the device under test, the test cases that have completed running, and some or all of the test cases that have not yet run. The real-time status of the energy efficiency test can also describe the execution order of the at least one test case.
[0024] For at least one test case currently running on the device under test, the real-time status of the energy efficiency test may include some or all of the following:
[0025] Test case ID, name, warm-up duration, number of runs, elapsed run time, estimated remaining run time, or estimated number of remaining runs.
[0026] For at least one test case that has completed running, the real-time status of the energy efficiency test includes some or all of the following:
[0027] The test case's identifier, name, warm-up duration, number of runs, run duration, or performance parameters when the test case is run on the device under test.
[0028] For at least one test case that is not currently running, the real-time status of the energy efficiency test includes some or all of the following:
[0029] Test case identification, name, number limit, running time limit, or warm-up time limit.
[0030] Through the above method, the real-time status of the energy efficiency test can display the progress of the energy efficiency test from various perspectives, so that users can fully understand the process of the energy efficiency test.
[0031] In one possible implementation, the test case framework includes a basic interface that is used to implement some or all of the following:
[0032] Parse the parameters in the command line that starts the test case, verify the parameters in the command line that starts the test case, verify whether the device under test is suitable for running the test case, perform preparatory operations for the running of the test case, warm up the test case, and perform post-processing after the test case runs.
[0033] Through this approach, the test case framework includes some basic interfaces that can implement basic functions, eliminating the need for users to design basic interfaces themselves, simplifying the process of customizing test cases. In addition, the presence of basic interfaces ensures that test cases can run smoothly on the device under test.
[0034] In one possible implementation, the test case framework includes some basic interfaces, and users can enable some or all of these basic interfaces based on their needs. The test case framework also allows users to configure basic interfaces, such as adding new basic interfaces or modifying existing basic interfaces. In this way, at least one test case generated after the user edits the code includes the user-configured basic interfaces.
[0035] Through the above method, the user can configure the basic interface so that the basic interface in the test case better meets the user's own needs, and can also ensure that subsequent test cases can be run on the device under test.
[0036] In the second aspect, the embodiment of the present application further provides a test control device, which has the function of implementing the behavior in the method example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The functions can be implemented by hardware, or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above functions. In one possible design, the structure of the test control device includes an acquisition module, a test module, and a display module. These modules can perform the corresponding functions in the method example of the first aspect above. The beneficial effects can be found in the relevant description of the first aspect and will not be repeated here.
[0037] In a third aspect, the present application further provides a computing device comprising a processor and a memory, and may further comprise a communication interface, wherein the processor executes program instructions in the memory to perform the method provided by the first aspect or any possible implementation of the first aspect. The memory is coupled to the processor and stores program instructions and data necessary for the energy efficiency test process. The communication interface is used to communicate with other devices, such as obtaining energy efficiency test information, pushing test cases to the device under test, etc.
[0038] In a fourth aspect, the present application provides a computing device system comprising at least one computing device. Each computing device comprises a memory and a processor. The processor of at least one computing device is configured to access code in the memory to execute the method provided in the first aspect or any possible implementation of the first aspect.
[0039] In a fifth aspect, the present application provides a computer-readable storage medium. When the computer-readable storage medium is executed by a computing device, the computing device performs the method provided in the first aspect or any possible implementation of the first aspect. The storage medium stores a program. The storage medium includes, but is not limited to, volatile memory, such as random access memory, and non-volatile memory, such as flash memory, a hard disk drive (HDD), and a solid state drive (SSD).
[0040] In a sixth aspect, the present application provides a computing device program product, comprising computer instructions that, when executed by a computing device, cause the computing device to perform the method provided in the aforementioned first aspect or any possible implementation of the first aspect. The computer program product may be a software installation package, and when the method provided in the aforementioned first aspect or any possible implementation of the first aspect is required, the computer program product may be downloaded and executed on the computing device. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] FIG1 is a schematic diagram of the architecture of a system provided by this application;
[0042] FIG2 is a schematic diagram of an energy efficiency testing method provided by this application;
[0043] FIG3A is a schematic diagram of an interface for providing a test case framework provided by the present application;
[0044] FIG3B is a schematic diagram of a test case framework provided by this application;
[0045] FIG4 is a schematic diagram of a configuration interface for energy efficiency test information provided by this application;
[0046] FIG5 is a schematic diagram of an interface for a user to instruct an energy efficiency test provided by the present application;
[0047] FIG6 is a schematic diagram of an interface showing the real-time status of an energy efficiency test provided by the present application;
[0048] FIG7 is a schematic diagram of an interface for displaying energy efficiency test results provided by the present application;
[0049] FIG8 is a schematic structural diagram of a test control device provided by the present application;
[0050] 9 and 10 are schematic structural diagrams of a computing device provided in this application. DETAILED DESCRIPTION
[0051] Before describing an energy efficiency testing method, apparatus, and device provided in an embodiment of the present application, some concepts involved in the embodiment of the present application are first described.
[0052] (1) Energy efficiency.
[0053] Energy efficiency can reflect the data processing capability of the device under test (such as a server) per unit of electrical energy. The embodiments of the present application do not limit the specific calculation method of energy efficiency. Taking the device under test as a server as an example, energy efficiency can be equal to the ratio of the performance parameters of the server to the power consumption (power) of the server. Among them, the unit of the power consumption of the server is watt. The embodiments of the present application do not limit the specific types of the performance parameters of the server, and all parameters that can reflect the performance of the server are applicable to the embodiments of the present application. For example, the performance parameters of the server can be the throughput of the server, such as the number of transactions per second (TPS) and the number of requests processed per second (QPS). For another example, the performance parameters of the server can be the response time, such as the average response time (AVT). For another example, the performance parameters of the server can be the concurrency of the server. The above only lists the possible types of performance parameters of the server.
[0054] (2) Test cases, test case frameworks, and test case collections.
[0055] A test case is a code file designed for a component in a device under test and used to test its performance. For example, a test case designed for a processor can be run by the processor. The server performance parameters obtained from the processor running the test case can largely reflect the processor's data processing performance.
[0056] Different types of processors can implement different code programs. For example, a central processing unit (CPU) is suitable for executing code programs for basic calculations. A graphics processing unit (GPU) is suitable for executing code programs for image processing. Users can design test cases that include image processing code programs or test cases that include basic calculation code programs based on the type of processor in the device under test. The processing capabilities of processors of the same type are also different. For example, a CPU with a larger number of cores has stronger processing capabilities and can execute more complex code programs. A CPU with a smaller number of cores has relatively weak processing capabilities and is suitable for processing code programs with simpler code structures. Users can design test cases that include more complex code programs or test cases that include code programs with simpler code structures based on the processing capabilities of the processor in the device under test. Users design test cases by themselves, which increases the diversity of test cases.
[0057] For another example, a test case designed for memory can be run by a processor to interact with the memory. The performance parameters of the server when the processor runs the test case can largely reflect the performance of the memory. The performance of the memory includes, but is not limited to, input and output (I / O) processing performance, memory error correction capability, and memory capacity. For another example, a test case designed for a hard disk can be run by a processor to interact with the hard disk. The performance parameters of the server when the processor runs the test case can largely reflect the performance of the hard disk. The performance of the memory includes, but is not limited to, I / O processing performance and hard disk capacity.
[0058] Essentially, a test case can be understood as a code program that can run on a processor. In embodiments of the present application, the design rights for test cases can be made available to users. Users can design test cases based on their own component testing requirements, that is, design code programs that run on the processor. This open design rights means that test cases are no longer limited to the limited and fixed number of test cases provided by the basic energy efficiency test software.
[0059] In an embodiment of the present application, the test control device can provide a test case framework to the user. The test case framework provides the format of the test case, that is, the format of the code file. The test case framework can be understood as a code file that omits the main code of the test case. After obtaining the test case framework, the user can edit the main code of the test case within the test case framework to complete the design of the test case.
[0060] A test case set includes at least one test case. A test case set is a set of test cases that need to be run for testing the device under test. In an embodiment of the present application, a user is allowed to configure energy efficiency test information to indicate a test case set, and determine the test cases that the device under test needs to run. In addition, the energy efficiency test information configured by the user includes energy efficiency test parameters, which are parameters required for the device under test to run the test cases of the test case set. For example, the identifier of the test case, the name of the test case, the weight of the test result of each test case in the energy efficiency of the device under test, the running time of each test case, the number of runs, the warm-up running time, the running order of each test case, the number of cores of the processor occupied by the test case, the input parameters of the test case, the command line template of the test case, etc. In the following description of the energy efficiency test parameters, the values and definitions of the energy efficiency test parameters mentioned above will be explained.
[0061] (3) Basic interface.
[0062] The test case framework can also include basic interfaces that test cases need to call during execution. These interfaces provide some basic functions during test case execution. These interfaces include, but are not limited to, the following: startup parameter parsing interface, parameter verification interface, runtime environment verification interface, pre-processing interface, warm-up operator interface, runtime operator interface, and post-processing interface.
[0063] The following describes these basic interfaces:
[0064] 1) Parsing startup parameter interface: The parsing startup parameter interface is used to obtain some relevant operating parameters of the test case from the command line of the test case. These parameters can be some energy efficiency test parameters recorded in the energy efficiency test information configured by the user. In the embodiment of the present application, the operating parameters include but are not limited to: the identification of the test case, the name of the test case, the stage load of the test case, the number of test cases, the warm-up running time of the test case, the running time limit of the test case, the number of mandatory instances of the test case, the number of designated cores of the test case, the custom parameters of the test case, etc. The operating parameters that can be parsed by the parsing startup parameter interface are related to the command line of the test case.
[0065] 2) Verification parameter interface: The parameter verification interface is used to verify the operating parameters parsed by the startup parameter parsing interface, such as whether the operating parameters are valid, whether they comply with the parameter setting rules (the parameter setting rules may be preset in the verification parameter interface), whether they are non-empty values, whether they are numerical values, etc. For operating parameters with verification problems (such as invalid, non-compliant parameter setting rules, set to empty values, or non-numerical energy efficiency test parameters), the verification parameter interface can prompt the user, inform the user that there is a problem with the operating parameters, and display the problematic operating parameters to the user. The verification parameter interface can receive the operating parameters reconfigured by the user and verify them again. The verification parameter interface can also display correction suggestions for problematic operating parameters to the user.
[0066] For example, for an operating parameter set to a null value, the parameter validation interface may prompt that the operating parameter cannot be a null value and display one or more suggested candidate operating parameters for the user to select. The user may reconfigure the operating parameters or select one or more from the candidate operating parameters as the operating parameters.
[0067] Among them, the verification parameter interface can directly prompt the user on the device under test. For example, when the test case is running on the device under test, after the verification parameter interface verifies the operating parameters, if any problematic operating parameters are found, the verification parameter interface can display the problematic operating parameters, the problems with the operating parameters, or correction suggestions on the display of the device under test. The verification parameter interface can also trigger the device under test to emit an alarm sound or voice broadcast to prompt the user of the problematic operating parameters, the problems with the operating parameters, or correction suggestions. The verification parameter interface can also prompt the user through the test control device. For example, when the test case is running on the device under test, after the verification parameter interface verifies the operating parameters, if any problematic operating parameters are found, the verification parameter interface can send a notification message to the test control device. The notification message is used to inform the user of the problematic operating parameters, the problems with the operating parameters, or correction suggestions. After receiving the notification message, the test control device can prompt the user through interface display, alarm sound or voice broadcast.
[0068] The existence of the verification parameter interface can timely discover problems in the operating parameters, discover and prompt them in advance, which can effectively save energy efficiency testing time and avoid the situation where problematic operating parameters lead to energy efficiency test failure or inaccurate energy efficiency test results.
[0069] 3) Verify the Runtime Environment Interface: This interface is used to verify the test case's runtime environment, determining whether the device under test is suitable for the test case or meets the test case's runtime environment requirements. The test case's runtime environment is dependent on the test case and can vary from test case to test case.
[0070] For any test case, the test case has certain requirements for the runtime environment's communication status (such as network connectivity), operating system version (such as Windows, Linux, etc.), and language version (such as C++, C, JAVA, etc.). The runtime environment verification interface can detect the device under test to determine whether it can run the test case, that is, whether it meets the test case's requirements for the runtime environment's communication status, operating system version, and language version.
[0071] If the verification of the operating environment interface shows that the device under test is not suitable for the test case, that is, it does not meet the requirements of the operating environment of the test case, the verification operating environment interface can prompt the user to inform the user that the device under test is not suitable for the test case and show the user the reasons for not meeting the test case (such as not connected to the network, the operating system version does not meet the requirements, the language version does not meet the requirements, etc.). The verification parameter interface can also show the user correction suggestions for the operating environment provided by the device under test (such as connecting to the network, changing the operating system version, changing the language version).
[0072] The user can test or correct the device under test according to the content displayed by the verification operating environment interface. After the test or correction is completed, the user can trigger the verification operating environment interface to re-verify the operating environment.
[0073] The method for prompting the user on the operating environment verification interface is similar to the method for prompting the user on the parameter verification interface. That is, the operating environment verification interface can prompt the user directly through the device under test or through the test control device. The difference is that the content of the prompt on the operating environment verification interface is different from that of the parameter verification interface. The specific method of prompting the user can be found in the relevant description of the prompt on the parameter verification interface and is not repeated here.
[0074] Verifying the existence of the operating environment interface can timely discover problems in the operating environment provided by the device under test, discover and prompt them in advance, which can effectively save energy efficiency testing time and avoid the situation where the device under test is not suitable for the test case operation, resulting in energy efficiency test failure.
[0075] 4) Pre-processing interface: The pre-processing interface is mainly used to perform preparatory processing before running the test case. Preparatory processing includes but is not limited to: pre-preparation of data and basic configuration of the device under test.
[0076] Test cases may require some data during execution. The pre-processing interface can push the required data to the device under test in advance, thus completing the data pre-preparation. This pre-preparation of data can effectively reduce the test case execution time and improve the efficiency of energy efficiency testing.
[0077] The basic configuration of the device under test refers to some configurations of the device under test, such as the configuration of the basic input and output system (BIOS) of the device under test (such as mode selection), the configuration of the software on the device under test (such as the configuration of the system software on the device under test and the system version), etc.
[0078] The embodiments of the present application do not limit the specific content of the preparatory processing that can be implemented by the pre-processing interface. The preparatory processing operations that can be performed by the pre-processing interface may include some operations that are not performed by other interfaces (such as the parsing startup parameter interface, the verification parameter interface, the verification operating environment interface, and the pre-processing interface). The specific content of the preparatory processing that can be implemented by the pre-processing interface is related to the test case itself. For different test cases, the specific content of the preparatory processing that can be implemented by the pre-processing interface is also different, and these specific contents can be set by the user.
[0079] 5) Preheating operation operator interface: The preheating operation operator interface is used to preheat the test case, run the test case or preheat code in advance, wherein the preheating code is a dedicated code designed for preheating.
[0080] When running a test case for the first time on a device under test, the device's components (such as memory or hard disk) must be initialized, which can affect the test case's runtime and effectiveness. Conversely, if the device under test has been running for a long time before running a test case, hardware thermal degradation can occur, preventing the test case from running efficiently, also affecting the test case's runtime and effectiveness.
[0081] To this end, the preheating operation operator interface can preheat the device under test in advance to ensure that the test case runs smoothly, facilitating subsequent energy efficiency testing.
[0082] 6) Run Operator Interface: The Run Operator Interface is used to execute test cases. Essentially, it executes the primary code within a test case, typically the code edited by the user. The Run Operator Interface monitors the state of the device under test to ensure that the test case meets the execution parameters specified in the command line. For example, this ensures the test case runs the specified number of times, stage load, and duration.
[0083] 7) Post-processing interface: The post-processing interface is used to perform subsequent processing after the test case is run and received. Subsequent processing includes but is not limited to: deleting temporary files and clearing the basic configuration of the device under test.
[0084] Temporary files are files generated during the test case execution. The post-processing interface can delete these temporary files to prevent data leakage during the test case execution.
[0085] The basic configuration of the device under test may be the basic settings of the device under test performed by the pre-processing interface, and the post-processing interface may restore it to the initial configuration of the device under test.
[0086] It should be noted that the above-mentioned basic interfaces are only examples, and the test case framework can include all of the above-mentioned basic interfaces, or only include some basic interfaces, or can also include interfaces other than the above-mentioned basic interfaces. In addition, in an embodiment of the present application, the user is also allowed to add basic interfaces in the test case on his own (that is, in an embodiment of the present application, give the user the authority to configure the basic interfaces), or configure and implement all of the basic interfaces or implement some of the basic interfaces according to his own needs. For example, when the user does not need to execute a certain basic interface during the test case operation, the user can give an empty function in the basic interface.
[0087] In the embodiments of the present application, the test control device is user-friendly and allows the user to configure energy efficiency test information for any device under test based on their needs. This energy efficiency test information includes a set of test cases and energy efficiency test parameters required for the energy efficiency test. The test cases included in the test case set are user-provided. The energy efficiency test parameters are the parameters required by the device under test when running the test cases in the test case set.
[0088] The test control device performs an energy efficiency test on the device under test based on the energy efficiency test information, and displays the energy efficiency test results of the device under test to the user. In the embodiment of the present application, the test control device provides a user-defined energy efficiency test process. The user provides the energy efficiency test information to the test control device according to his or her needs, and the test control device completes the energy efficiency test process. The set of test cases used for the energy efficiency test is no longer fixed, but flexible and changeable, which better meets the needs of the user. The flexibility of the energy efficiency test is improved, and with the test control device controlling the entire energy efficiency test process, the energy efficiency test process is also more efficient.
[0089] As shown in FIG1 , an energy efficiency test system provided by an embodiment of the present application includes a test control device 100 and a device under test 200 .
[0090] The test control device 100 is the control center of the energy efficiency testing system and is connected to the device under test 200. The test energy efficiency control device can obtain energy efficiency test information provided by the user, parse this information to obtain energy efficiency test parameters, and determine the test case set required for the energy efficiency test. The test case set can include at least one test case, which is provided to the test control device 100 by the user.
[0091] The test control device 100 can perform an energy efficiency test on the device under test 200 according to the energy efficiency test information. The test control device 100 can push the test cases in the test case set to the device under test 200 and control the device under test 200 to execute the test cases in the test case set based on the energy efficiency test parameters. The test control device 100 can generate energy efficiency test results for the device under test 200 based on the process of the device under test 200 executing the test cases in the test case set, and display the energy efficiency test results of the device under test 200 to the user.
[0092] The test control device 100 can provide two customized operations for the user:
[0093] Custom operation 1: test case customization.
[0094] The test control device 100 can provide a test case framework to the user, and the test case framework provides a code file format for the test case. The test case framework supports multiple code development languages (such as C, C+, C++, Java, etc.), and the test case framework also provides a method for using the test case framework, which introduces the components of the test case framework and the functions of each component. For example, the test case framework uses annotations to mark the functions of each component, mark the code programs that need to be edited by the user, and mark the basic interfaces in the test case framework.
[0095] After obtaining the test case framework, the user can follow the usage method of the test case framework to understand the test case framework and edit the code program in the test case framework to form a test case designed by the user.
[0096] When editing and generating a test case, the user can configure an identifier or a name for the test case. After the user completes editing the code in the test case framework, the user can directly feed back the test case to the test control device 100.
[0097] After editing the code in the test case framework, the user can also save the test case on a local storage device. When subsequently providing energy efficiency test information, the user can provide the save path of the test case on the local storage device. In this way, the test control device 100 can retrieve the test case from the local storage device according to the save path. The local storage device refers to a storage device deployed on the user side, such as a storage device on the user's computing device.
[0098] After editing the code in the test case framework, the user can also save the test case on a remote storage device. When subsequently providing energy efficiency test information, the user can provide the test case's storage path on the remote storage device. The test control device 100 can then retrieve the test case from the remote storage device based on the storage path. A remote storage device refers to a storage device deployed far from the user, such as a storage device deployed in the cloud or a storage device connected to the user's computing device via a network.
[0099] Customization of test cases can form a variety of test cases, which are suitable for testing different components in different devices under test 200, can effectively improve the flexibility of energy efficiency testing, and make the testing process of energy efficiency testing more targeted.
[0100] Custom operation 2: Customize energy efficiency test information.
[0101] The energy efficiency test information includes a test case set and energy efficiency test parameters required for the energy efficiency test. The energy efficiency test parameters are parameters required by the device under test 200 when running the test cases in the test case set.
[0102] Users can configure energy efficiency test information, decide which test case or cases to use for the energy efficiency test, and determine the specific values of energy efficiency test parameters during the energy efficiency test.
[0103] After acquiring the energy efficiency information configured by the user, the test control device 100 performs an energy efficiency test on the device under test 200 according to the energy efficiency test information.
[0104] The customization of energy efficiency test information enables users to truly control the energy efficiency test process, so that the energy efficiency test can meet the needs of users, the energy efficiency test is more flexible, and the test results of the energy efficiency test are more accurate.
[0105] The test control device 100 can be implemented by software or by hardware. For example, the test control device 100 is an example of a software functional unit, and the test control device 100 can be code running on a computing device or code running on a computing instance. Among them, the computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. As an example of a hardware functional unit, the test control device 100 can include at least one computing device, such as a server. Alternatively, the test control device 100 can also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Among them, the above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0106] The device under test 200 is a device that needs to be tested for energy efficiency. The embodiment of the present application does not limit the type of the device under test 200. The device under test 200 can be a server, a personal computer, a laptop computer, etc. The device under test 200 can also be a wireless terminal device, a mobile terminal device, a device-to-device communication (D2D) terminal device, a vehicle to everything (V2X) communication terminal device, an intelligent vehicle, a vehicle-to-machine system (or a vehicle network system) (telematics box, TBOX), a machine-to-machine / machine-type communication (M2M / MTC) terminal device, an Internet of Things (IoT) terminal device. The device under test 200 can also be a module for realizing the main functions of a computing device such as a server or a terminal device, such as a chip in a computing device.
[0107] The embodiments of the present application do not limit the number of devices under test 200 in the energy efficiency test system. The energy efficiency test system may include multiple devices under test 200, and the test control device 100 can perform energy efficiency tests on each of the multiple devices under test 200. In the embodiments of the present application, only the test control device 100 performing energy efficiency testing on a single device under test 200 is used as an example for description.
[0108] In the energy efficiency testing system, the embodiments of the present application do not limit the deployment method of the device under test 200 and the test control device 100. The device under test 200 and the test control device 100 can be two independent devices. The device under test 200 and the test control device 100 can also be deployed in the same device. In this case, the test control device 100 occupies the deployment resources in the device, and the device under test 200 occupies another part of the resources of the device. The energy efficiency test performed by the test control device 100 on the device under test 200 can be understood as an energy efficiency test on the resources occupied by the test control device 100 on the device under test 200.
[0109] The energy efficiency testing method provided in an embodiment of the present application is described below in conjunction with Figure 2. The method includes a test case customization process (see step 201), an energy efficiency test information customization process (see step 202), and an energy efficiency test process of the device under test 200 (see steps 203 to 204).
[0110] Step 201: The test control device 100 provides a test case framework to the user, and the user completes the customization of the test case.
[0111] When the user can directly control the test control device 100 , for example, the test control device 100 is a hardware device deployed on the user side, or software deployed on the user side computing device, the user can obtain the test case framework from the test control device 100 .
[0112] As shown in Figure 3A, it is a schematic diagram of an interface for providing a test case framework to a user by the test control device 100. In the interface shown in Figure 3A, the test control device 100 provides downloading, transmitting and editing options for the test case framework.
[0113] By clicking the download option, the user can download the test case framework locally, such as to a storage device in the test control device 100 (corresponding to the case where the test control device 100 is deployed on the user side), such as to a storage device on the computing device where the test control device 100 is located. The user can obtain the test case framework locally. The user can use code editing software (such as IDE and other software) to open the test case framework and complete the customization of the test case according to the usage method provided by the test case framework, that is, edit the main code of the test case, set an identifier or name for the test case, and save the edited test case.
[0114] By clicking the transfer option, the user can transfer the test case framework to the user's own device (such as the user's personal mobile phone, laptop, mobile terminal, computing device, etc.).
[0115] The user can use code editing software (such as IDE) on his or her device to open the test case framework, and complete the customization of the test case according to the usage instructions provided by the test case framework, that is, edit the main code of the test case, set an identifier or name for the test case, and save the edited test case.
[0116] By clicking the edit option, the user can trigger the test control device 100 to open the test case framework. The user can complete the customization of the test case on the test control device 100 according to the usage method provided by the test case framework, that is, edit the main code of the test case, set an identifier or name for the test case, and save the edited test case.
[0117] When the user cannot directly manipulate the test control device 100, such as when the test control device 100 is deployed on a hardware device far away from the user, or is software deployed on a computing device far away from the user. The user can establish a connection with the test control device 100 through the device deployed on the user side, triggering the device deployed on the user side to send a framework request message to the test control device 100, and the framework request message is used to request to obtain the test case framework. After receiving the framework request message, the test control device 100 can feedback the test case framework to the device deployed on the user side. The user can complete the customization of the test case on the device deployed on the user side, that is, edit the main code of the test case, set an identifier or name for the test case, and save the edited test case.
[0118] There are multiple ways to implement the aforementioned "saving edited test cases". The user can save the test cases in a local storage device on the device that edited the test cases, such as the storage device of the test control device 100, or the storage device of the user's own device, or the storage device deployed on the user's side. The user can also save the test cases in a remote storage device, such as a storage device connected to the test control device 100 through a network, a storage device connected to the user's own device through a network, or a storage device connected to the device deployed on the user's side through a network. The embodiments of the present application do not limit the way in which the user stores the test cases.
[0119] As shown in Figure 3B, an editing interface for a test case is provided for an embodiment of the present application. A test case framework is displayed in the editing interface, and the format of the test case is provided in the test case framework, wherein the prologue and ending parts of the test case are marked, and the name, identifier, location of the main code, and basic interface of the test case that needs to be edited by the user are also identified.
[0120] It should be noted that the components of the test case framework and the names of the components are not limited in the embodiments of the present application. The test case framework is only divided into components and named for example.
[0121] Step 202: The user configures energy efficiency test information, and the test control device 100 obtains the energy efficiency test information.
[0122] When a user needs to perform an energy efficiency test on the device under test 200, they can configure energy efficiency test information. When the user can directly control the test control device 100, such as when the test control device 100 is a hardware device deployed on the user's side or software deployed on the user's computing device, the user can directly configure the energy efficiency test information in the test control device 100.
[0123] Figure 4 shows a schematic diagram of the configuration interface in which the test control device 100 provides energy efficiency test information to the user. In the configuration interface shown in Figure 4 , the user can configure the device under test 200 for which energy efficiency testing is required by entering the device under test 200's identifier, name, and address in the device under test 200's information field. The address of the device under test 200 can be its MAC address or IP address. In this configuration interface, the user can configure multiple devices under test 200.
[0124] In the configuration interface shown in Figure 4, users can configure energy efficiency test information. Enter the corresponding information in each field of the energy efficiency test information, such as the test case identification, name, weight, and other information included in the test case set. In this configuration interface, users can configure multiple energy efficiency test information.
[0125] The user completes the configuration of the energy efficiency test information by clicking the Finish option. After detecting the user's operation, the test control device 100 obtains the energy efficiency test information configured by the user and the information of the device under test 200.
[0126] When the user cannot directly control the test control device 100, such as when the test control device 100 is deployed as a hardware device remote from the user, or as software deployed on a computing device remote from the user, the user can establish a connection with the test control device 100 through a device deployed on the user side, triggering the device deployed on the user side to send an energy efficiency test request message to the test control device 100, requesting an energy efficiency test to be performed on the device under test 200. The energy efficiency test request message carries the energy efficiency test information configured by the user and information about the device under test 200.
[0127] In terms of its presentation, the energy efficiency test information can directly include the test cases of a test case set, meaning that the energy efficiency test information directly carries the files of each test case in the test case set. Alternatively, the energy efficiency test information can simply include the save paths of the test cases in the test case set, meaning that the energy efficiency test information carries the save paths of each test case in the test case set, and the test cases can be retrieved based on the save paths of the test cases. In this case, the save paths of the test cases can be understood as a special "energy efficiency test parameter."
[0128] The embodiment of the present application does not limit the number and type of energy efficiency test parameters included in the energy efficiency test information. The following lists several energy efficiency test parameters and describes the values and definitions of these energy efficiency test parameters. See Table 1.
[0129] Table 1
[0130] Step 203 : The user instructs the test control device 100 to perform an energy efficiency test on the device under test 200 .
[0131] When the user can directly control the test control device 100 , the user can directly instruct the test control device 100 to perform an energy efficiency test on the device under test 200 .
[0132] As shown in Figure 5, a schematic diagram of the startup interface for the energy efficiency test provided by the test control device 100 to the user. In the startup interface shown in Figure 5. The user clicks to create an energy efficiency test task, and an energy efficiency test task is suggested. In the task configuration interface of the energy efficiency test, the user can check the device under test 200 that needs to be tested. The device under test 200 provided in the startup interface can be the device under test 200 set in the user-configured energy efficiency test information in Figure 4. The user can also check the energy efficiency test information. The energy efficiency test information provided in the startup interface can be the energy efficiency test information configured by the user in Figure 4. By establishing an energy efficiency test task, checking the device under test 200 and the energy efficiency test information, a binding relationship between the device under test 200 and the energy efficiency test information is established, indicating that the energy efficiency test of the device under test 200 needs to be performed according to the checked energy efficiency test information. The user instructs the test control device 100 to perform an energy efficiency test on the device under test 200 by clicking "Start Test".
[0133] When the user cannot directly control the test control device 100. The energy efficiency test request message sent by the user can be understood as a message instructing the test control device 100 to perform an energy efficiency test on the device under test 200. After receiving the energy efficiency test request, the test control device 100 can start the energy efficiency test on the device under test 200, that is, execute step 204. Of course, in actual applications, after the user sends the energy efficiency test request message, the test control device 100 can also send a test start message to the device on the user side. The test start message is used to ask the user whether to start the energy efficiency test on the device under test 200. The user sends a start response message through the device on the user side. The start response message is used to instruct the start of the energy efficiency test on the device under test 200. After receiving the start response message, the test control device 100 can start the energy efficiency test on the device under test 200. In this case, the start response message can be understood as a message instructing the test control device 100 to perform an energy efficiency test on the device under test 200.
[0134] Step 204: The test control device 100 performs an energy efficiency test on the device under test 200 according to the energy efficiency test information.
[0135] When the test control device 100 obtains the energy efficiency test information, it can determine the test cases included in the test case set by parsing the energy efficiency test information. For example, the test cases included in the test case set are determined by energy efficiency test parameters such as identification, enablement, and name, and the test cases included in the test case set are obtained according to the save path. For another example, the running restrictions of the test case on the device under test 200 are determined by energy efficiency test parameters such as the order of the test case, the stage load of the test case, the number of test cases, the warm-up running time of the test case, the running time limit of the test case, the number of mandatory instances of the test case, the number of designated cores of the test case, the custom parameters of the test case, etc. For another example, the proportion of the test results of the test case when calculating the energy efficiency of the device under test 200 is determined by energy efficiency test parameters such as the standardized performance value and weight of the test case. For another example, the energy efficiency test parameters such as the startup command line template of the test case on the device under test 200 determine the command line that triggers the device under test 200 to run the test case.
[0136] When the test control device 100 can control the device under test 200 to run each test case according to the order of each test case in the energy efficiency test parameters and the running restrictions of the test case on the device under test 200 (such as the order of the test cases, the stage load of the test cases, the number of test cases, the warm-up running time of the test cases, the running time limit of the test cases, the number of mandatory instances of the test cases, the number of designated cores of the test cases, and the custom parameters of the test cases), the performance parameters of each test case running on the device under test 200 are obtained. For any test case, the performance parameter of the test case running on the device under test 200 can be the throughput, concurrency, or response time of the device under test 200.
[0137] For any test case, the test control device 100 can push the test case to the device under test 200 and send the startup command line of the test case to the device under test 200. After receiving the startup command line, the device under test 200 starts to run the test case. In the process of running the test case, various basic interfaces in the test case will be called, such as the startup parameter parsing interface, the parameter verification interface, the operating environment verification interface, the pre-processing interface, the preheating operation operator interface, the operation operator interface, the post-processing interface, etc. The functions of each basic interface can be found in the above content and will not be repeated here.
[0138] The test control device 100, through connection with the device under test 200, can monitor the status of the device under test 200 while executing the test case, determine information such as the number of times the test case has been executed on the device under test 200 and the duration of the execution, and determine the original performance parameters of the test case when executing the test case on the device under test 200. The performance parameters of the test case when executing the test case on the device under test 200 are determined by calculating the ratio of the original performance parameters when executing the test case on the device under test 200 to the standard performance values.
[0139] The test control device 100 determines the energy efficiency of the device under test 200 by using the weight of each test case and the performance parameters of the test case when running on the device under test 200. The embodiment of the present application does not limit the method for calculating the energy efficiency of the device under test 200. Any method of generating the energy efficiency of the device under test 200 by using the weight of each test case, the performance parameters of the test case when running on the device under test 200, and the power consumption of the device under test 200 when running each test case is applicable to the embodiment of the present application.
[0140] For example, the energy efficiency value E of the device under test 200 satisfies:
[0141] Wherein, Ai represents the weight of test case i, Ri represents the performance parameter of the device under test 200 running the test case i, and P represents the total power consumption of the device under test 200 during the entire energy efficiency test process.
[0142] For another example, the energy efficiency value E of the device under test 200 satisfies:
[0143] Here, Ai represents the weight of test case i, Ri represents the performance parameter of the device under test 200 when running test case i, and Pi represents the power consumption of the device under test 200 when running test case i.
[0144] In addition, when the test control device 100 performs an energy efficiency test on the device under test 200, it can also display the real-time status of the energy efficiency test to the user. The real-time status of the energy efficiency test may include some or all of the following information:
[0145] For the test cases that have been run, the test case identification, name, warm-up time, number of runs, running time, or performance parameters of the test case run on the device under test 200.
[0146] For a running test case, the test case's ID, name, warm-up run time, number of runs, run time, estimated run time, or estimated number of runs (i.e., the estimated number of remaining runs).
[0147] For test cases that have not been run, the test case's ID, name, number of times limit, run time limit, or warm-up run time limit.
[0148] The real-time status of the energy efficiency test may also include the running order of each test case in the test case set.
[0149] In actual applications, the real-time status of the energy efficiency test can only display the information of the test cases that have been run (such as the test case identification, name, warm-up time, number of runs, run time, or performance parameters of the test cases that have been run), or only display the information of the test cases that are being run (such as the test case identification, name, warm-up run time, number of runs, run time, estimated run time, or estimated number of runs), or only display the information of the test cases that have not been run (the test case identification, name, warm-up time, number of runs, run time, estimated run time, or estimated number of runs). The real-time status of the energy efficiency test can also display part or all of the information of the test cases that have been run, the information of the test cases that are being run, and the information of the test cases that have not been run.
[0150] As shown in Figure 6, it is a schematic diagram of the display interface of the real-time status of the energy efficiency test of the test control device 100 in an embodiment of the present application. As shown in Figure 6, the test control device 100 can display the information of each run test case (such as the identification, name of the test case, and the performance parameters of the test case running on the device under test 200) according to the running order of each test case in the test case set, the information of the running test case (such as the identification, name, number of runs, and estimated running time of the test case), and the information of the test case that has not been run (the identification, name, number limit, running time limit, and preheating running time of the test case).
[0151] Step 205: The test control device 100 displays the result of the energy efficiency test to the user.
[0152] After the energy efficiency test is completed, the test control device 100 may display the results of the energy efficiency test to the user. The present embodiment does not limit the manner in which the test control device 100 performs step 205. For example, the test control device 100 may display the results of the energy efficiency test to the user via a display. For another example, the test control device 100 may display the results of the energy efficiency test to the user by sending an email, text message, or web link.
[0153] The results of the energy efficiency test displayed to the user by the test control device 100 include the energy efficiency of the device under test 200, and may also include information about the test instance run by the device under test 200 (the identification, name, warm-up time, number of runs, running time, or performance parameters of the test case that has been run), and may also include information such as the time consumed by the energy efficiency test, the total power consumption of the device under test 200, and the power consumption of the device under test 200 when running each test case.
[0154] As shown in Figure 7, this is a schematic diagram of the display interface of the results of an energy efficiency test mentioned in an embodiment of the present application. In this display interface, the energy efficiency of the device under test 200, the information of the test instance run by the device under test 200 (the identification, name, number of runs, running time, performance parameters of the run test case), and the time consumed by the energy efficiency test are displayed.
[0155] Based on the same inventive concept as the method embodiment, the present application also provides a test control device. This test control device can execute the method executed by the test control device 100 described in the method embodiment shown in Figure 2. The relevant features can be found in the above method embodiment and will not be repeated here. As shown in Figure 8, the test control device 800 includes an acquisition module 801, a testing module 802, and a display module 803.
[0156] The acquisition module 801 is used to obtain energy efficiency test information configured by the user. The energy efficiency test information describes at least one test case and energy efficiency test parameters. The energy efficiency test parameters are parameters required by the device under test to run at least one test case, wherein at least one test case is provided by the user.
[0157] The testing module 802 is configured to trigger the device under test to run at least one test case based on energy efficiency test parameters under the instruction of a user.
[0158] The display module 803 is configured to display the energy efficiency test result of the device under test to the user according to the status of the device under test running the at least one test case.
[0159] In one possible implementation, at least one test case is provided by the user, and the acquisition module 801 provides the user with a test case framework, which records the format of the test case and marks the location of the code that needs to be edited by the user in the test case; and obtains at least one test case formed after the user edits the code.
[0160] In one possible implementation, when acquiring user-configured energy efficiency test information, acquisition module 801 may acquire at least one test case file and energy efficiency test parameters provided by the user. Alternatively, acquisition module 801 may acquire the save path and energy efficiency test parameters of at least one test case provided by the user, and acquire at least one test case based on the save path of the at least one test case.
[0161] In one possible implementation, the energy efficiency test parameters for one of the at least one test case include some or all of the following:
[0162] Identification, name, run order, information indicating whether it is enabled, weight in calculating the energy efficiency of the device under test, number of runs, warm-up run time, run time, number of processing cores in the device under test that are allowed to be called, test case input parameters, and command line template for starting the test case.
[0163] In one possible implementation, under the user's instruction, the test module 802 creates and starts an energy efficiency detection task for the device under test, pushes at least one test case to the device under test in the energy efficiency detection task, and controls the device under test to run at least one test case according to energy efficiency test parameters.
[0164] In one possible implementation, the display module 803 displays the real-time status of the energy efficiency test to the user during the process of triggering the device under test to run at least one test case based on the energy efficiency test parameters. The real-time status of the energy efficiency test is used to describe the real-time status of the device under test running at least one test case.
[0165] In one possible implementation, the real-time status of the energy efficiency test can describe the test cases currently running on the device under test, the test cases that have completed running, and some or all of the test cases that have not yet run. The real-time status of the energy efficiency test can also describe the execution order of the at least one test case.
[0166] For at least one test case currently running on the device under test, the real-time status of the energy efficiency test includes some or all of the following:
[0167] Test case ID, name, warm-up duration, number of runs, elapsed run time, estimated remaining run time, or estimated number of remaining runs.
[0168] For at least one test case that has completed running, the real-time status of the energy efficiency test includes some or all of the following:
[0169] The test case's identifier, name, warm-up duration, number of runs, run duration, or performance parameters when the test case is run on the device under test.
[0170] For at least one test case that is not currently running, the real-time status of the energy efficiency test includes some or all of the following:
[0171] Test case identification, name, number limit, running time limit, or warm-up time limit.
[0172] In one possible implementation, the test case framework includes a basic interface that is used to implement some or all of the following:
[0173] Parse the parameters in the command line that starts the test case, verify the parameters in the command line that starts the test case, verify whether the device under test is suitable for running the test case, perform preparatory operations for the running of the test case, warm up the test case, and perform post-processing after the test case runs.
[0174] In one possible implementation, at least one test case generated after the user edits the code includes a user-configured basic interface. The user can add new basic interfaces to the test case framework or modify existing basic interfaces in the test case framework to implement basic interface configuration.
[0175] It should be noted that the division of modules in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. The functional modules in the embodiments of the present application may be integrated into a single processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The integrated modules may be implemented in either hardware or software functional modules.
[0176] The present application also provides a computing device 900 as shown in Figure 9. The computing device 900 includes a bus 901, a processor 902, a communication interface 903, and a memory 904. The processor 902, the memory 904, and the communication interface 903 communicate with each other via the bus 901.
[0177] Among them, the processor 902 can be a central processing unit (CPU), a data processing unit (DPU), a graphics processing unit (GPU), an embedded neural network processing unit (NPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The memory 904 can include a volatile memory (volatile memory), such as a random access memory (RAM). The memory 904 can also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, an HDD or an SSD. The memory stores executable code, and the processor 902 executes the method described in Figure 2 above. The memory 904 can also include software modules required for other running processes such as an operating system (such as multiple modules of the test control device 800). The operating system can be LINUX TM ,UNIX TM ,WINDOWS TM wait.
[0178] The present application also provides a computing device system, comprising at least one computing device 1000 as shown in FIG10 . The computing device 1000 comprises a bus 1001, a processor 1002, a communication interface 1003, and a memory 1004. The processor 1002, the memory 1004, and the communication interface 1003 communicate with each other via the bus 1001. The at least one computing device 1000 in the computing device system communicates with each other via a communication path.
[0179] Among them, the processor 1002 can be a CPU, DPU, GPU, NPU, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The memory 1004 can include a volatile memory, such as a random access memory. The memory 1004 can also include a non-volatile memory, such as a read-only memory, a flash memory, an HDD or an SSD. The memory 1004 stores executable code, and the processor 1002 executes the executable code to execute any part or all of the method described in Figure 2 above. The memory can also include software modules required for other running processes such as an operating system. The operating system can be LINUX TM ,UNIX TM ,WINDOWS TM wait.
[0180] At least one computing device 1000 in the computing device system establishes communication with each other via a communication network, and each computing device 1000 runs any one or multiple modules in the test control apparatus 800 .
[0181] The descriptions of the processes corresponding to the above figures have different focuses. For parts that are not described in detail in a certain process, please refer to the relevant descriptions of other processes.
[0182] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes computer program instructions that, when loaded and executed on a computer, fully or partially generate the process or functions described in FIG. 2 according to the embodiment of the present invention.
[0183] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer program instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid state drive (SSD).
[0184] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. An energy efficiency testing method, characterized in that: The method is used to perform energy efficiency testing on a device under test, and comprises: Acquire energy efficiency test information configured by a user, wherein the energy efficiency test information describes at least one test case and energy efficiency test parameters, wherein the energy efficiency test parameters are parameters required by the device under test to run the at least one test case, wherein the at least one test case is provided by the user; Under the instruction of the user, triggering the device under test to run the at least one test case based on the energy efficiency test parameter; The energy efficiency test result of the device under test is displayed to the user according to the state of the device under test running the at least one test case.
2. The method according to claim 1, characterized in that The at least one test case is provided by the user and includes: Providing a test case framework to the user, wherein the test case framework records the format of the test case, and the test case marks the location of the code that needs to be edited by the user; The at least one test case formed after the user edits the code is obtained.
3. The method according to claim 1 or 2, characterized in that The obtaining of energy efficiency test information configured by the user includes: Acquire the file of the at least one test case and the energy efficiency test parameters provided by the user; or Acquire the saving path of the at least one test case and the energy efficiency test parameters provided by the user, and acquire the at least one test case according to the saving path of the at least one test case.
4. The method according to any one of claims 1 to 3, characterized in that: The energy efficiency test parameters for one test case of the at least one test case include part or all of the following: Identification, name, running order, information indicating whether it is enabled, weight when calculating the energy efficiency of the device under test, number of runs, warm-up running time, running time, the number of processing cores in the device under test that are allowed to be called, input parameters of the test case, and a command line template for starting the test case.
5. The method according to any one of claims 1 to 4, characterized in that: The triggering, under the instruction of the user, based on the energy efficiency test parameter, of the device under test to run the at least one test case includes: Under the instruction of the user, an energy efficiency detection task is created and started for the device under test, in which at least one test case is pushed to the device under test, and the device under test is controlled to run the at least one test case according to the energy efficiency test parameters.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In the process of triggering the device under test to run the at least one test case based on the energy efficiency test parameters, the real-time status of the energy efficiency test is displayed to the user, and the real-time status of the energy efficiency test is used to describe the real-time status of the device under test running the at least one test case.
7. The method according to claim 6, characterized in that The test case currently being run on the device under test in the at least one test case, the real-time status of the energy efficiency test includes part or all of the following: The identification, name, warm-up time, number of runs, running time, estimated remaining running time or estimated remaining number of runs of the test case.
8. The method according to claim 6, characterized in that The real-time status of the energy efficiency test of the test case that has been currently run and completed in the at least one test case includes part or all of the following: The identification, name, warm-up time, number of runs, running time of the test case, or performance parameters of the test case when running on the device under test.
9. The method according to claim 6, characterized in that For the test case that is not currently running in the at least one test case, the real-time status of the energy efficiency test includes part or all of the following: The identification, name, number limit, running time limit, or warm-up time limit of the test case.
10. The method according to any one of claims 2 to 9, characterized in that: The test case framework includes a basic interface, which is used to implement part or all of the following: Parse the parameters in the command line that starts the test case, verify the parameters in the command line that starts the test case, verify whether the device under test is suitable for running the test case, perform preparation operations for the running of the test case, preheat the test case, and perform post-processing after the test case runs.
11. The method according to claim 10, characterized in that The at least one test case formed after the user edits the code includes the basic interface configured by the user.
12. A test control device, characterized in that: The device is used to perform energy efficiency testing on a device under test, and the device comprises: An acquisition module, configured to acquire energy efficiency test information configured by a user, wherein the energy efficiency test information describes at least one test case and energy efficiency test parameters, wherein the energy efficiency test parameters are parameters required by the device under test to run the at least one test case, wherein the at least one test case is provided by the user; A testing module, configured to trigger the device under test to run the at least one test case based on the energy efficiency test parameter under the instruction of the user; The display module is used to display the energy efficiency test result of the device under test to the user according to the state of the device under test running the at least one test case.
13. The device according to claim 12, characterized in that The at least one test case is provided by the user, and the acquisition module is further used to: Providing a test case framework to the user, wherein the test case framework records the format of the test case, and the test case marks the location of the code that needs to be edited by the user; The at least one test case formed after the user edits the code is obtained.
14. The device according to claim 12 or 13, characterized in that When acquiring the energy efficiency test information configured by the user, the acquisition module is used to: Acquire the file of the at least one test case and the energy efficiency test parameters provided by the user; or Acquire the saving path of the at least one test case and the energy efficiency test parameters provided by the user, and acquire the at least one test case according to the saving path of the at least one test case.
15. The device according to any one of claims 12 to 14, characterized in that: The energy efficiency test parameters for one test case of the at least one test case include part or all of the following: Identification, name, running order, information indicating whether it is enabled, weight when calculating the energy efficiency of the device under test, number of runs, warm-up running time, running time, the number of processing cores in the device under test that are allowed to be called, input parameters of the test case, and a command line template for starting the test case.
16. The device according to any one of claims 12 to 15, characterized in that: The test module is used to: Under the instruction of the user, an energy efficiency detection task is created and started for the device under test, in which at least one test case is pushed to the device under test, and the device under test is controlled to run the at least one test case according to the energy efficiency test parameters.
17. The device according to any one of claims 12 to 16, characterized in that: The display module is also used for: In the process of triggering the device under test to run the at least one test case based on the energy efficiency test parameters, the real-time status of the energy efficiency test is displayed to the user, and the real-time status of the energy efficiency test is used to describe the real-time status of the device under test running the at least one test case.
18. The device according to claim 17, characterized in that The test case currently being run on the device under test in the at least one test case, the real-time status of the energy efficiency test includes part or all of the following: The identification, name, warm-up time, number of runs, running time, estimated remaining running time or estimated remaining number of runs of the test case.
19. The device according to claim 17, characterized in that The real-time status of the energy efficiency test of the test case that has been currently run and completed in the at least one test case includes part or all of the following: The identification, name, warm-up time, number of runs, running time of the test case, or performance parameters of the test case when running on the device under test.
20. The device according to claim 17, characterized in that For the test case that is not currently running in the at least one test case, the real-time status of the energy efficiency test includes part or all of the following: The identification, name, number limit, running time limit, or warm-up time limit of the test case.
21. The device according to any one of claims 13 to 20, characterized in that: The test case framework includes a basic interface, which is used to implement part or all of the following: Parse the parameters in the command line that starts the test case, verify the parameters in the command line that starts the test case, verify whether the device under test is suitable for running the test case, perform preparation operations for the running of the test case, preheat the test case, and perform post-processing after the test case runs.
22. The device according to claim 21, characterized in that The at least one test case formed after the user edits the code includes the basic interface configured by the user.
23. A computing device, characterized in that The computing device includes a processor and a memory; The memory is used to store computer program instructions; The processor executes and calls the computer program instructions in the memory to perform the method according to any one of claims 1 to 11.
24. A computer-readable storage medium, characterized in that: When the computer-readable storage medium is executed by a computing device, the computing device executes the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Interface test method and device, computer equipment and storage medium
CN107766190A
Interface performance test method and device and electronic equipment
CN113282476A
Test case generation method and device, computer equipment and storage medium
CN115309649A
Test case generator
US20070016829A1
