Electronic equipment performance optimization method and device and readable storage medium

By obtaining the device identification and parameters to be tested, and automatically generating test codes and executing them, the problems of low efficiency and error-prone electronic equipment performance optimization in the prior art are solved, and efficient and accurate performance optimization is achieved.

CN119512834APending Publication Date: 2025-02-25INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411508396.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, the electronic device performance optimization method has problems such as low optimization efficiency and error-prone.

Method used

By obtaining the device identification of the electronic device, the corresponding test instructions are obtained based on the correspondence between the pre-stored device identification and the test instructions. Then, multiple sets of parameters to be tested are obtained, and configured to test instructions to generate test code. Execute test code to get test results and perform performance optimization based on test results.

Benefits of technology

This method avoids the problems of low efficiency and low accuracy of manually writing test instructions, reduces the difficulty of testing code generation, improves the efficiency of testing code generation, and improves the efficiency of equipment optimization by quickly obtaining multiple sets of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512834A_ABST
    Figure CN119512834A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic equipment performance optimization method and device and a readable storage medium, and belongs to the field of computers, and the method comprises the steps: obtaining an equipment identifier of electronic equipment; acquiring a test instruction corresponding to the equipment identifier according to the equipment identifier and a corresponding relationship between a pre-stored equipment identifier and a pre-stored test instruction; obtaining a plurality of groups of to-be-tested parameters, and configuring the plurality of groups of to-be-tested parameters to the test instruction to obtain a configuration file comprising the test instruction of which the plurality of parameters are configured; generating a test code according to the configuration file; and executing the test code to obtain a test result, and performing performance optimization on the electronic equipment according to the test result. The difficulty of performance testing of the electronic equipment is reduced, and the performance optimization efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the computer field, and specifically to a method, device and readable storage medium for optimizing electronic device performance. Background Art

[0002] As core components of the Internet architecture, the performance of electronic devices such as servers has an important impact on the development of the Internet. In order to improve the performance of the Internet, it is necessary to optimize the performance of electronic devices such as servers.

[0003] In the related art, it is necessary to manually write test codes that meet the requirements of the grammatical rules of the test tool according to the parameter configuration of the electronic device and the grammatical rules of the test tool, test the performance of the electronic device according to the test code, and optimize the performance of the electronic device according to the test results.

[0004] However, the methods of related technologies require testers to be familiar with the syntax rules of the test tools, which makes the testing difficult. Test codes with different configuration parameters for different electronic devices are written manually, and the test codes are tested repeatedly, which leads to low optimization efficiency and is prone to errors. Summary of the invention

[0005] The present application aims to provide a method, device and readable storage medium for optimizing the performance of an electronic device, at least to solve the problem in the prior art that the performance optimization method of an electronic device has low optimization efficiency and is prone to errors.

[0006] In a first aspect, an embodiment of the present application discloses a method for optimizing performance of an electronic device, the method comprising:

[0007] Obtaining a device identification of an electronic device;

[0008] According to the device identification and the correspondence between the pre-stored device identification and the pre-stored test instructions, obtaining the test instruction corresponding to the device identification;

[0009] Acquire multiple groups of parameters to be tested, and configure the multiple groups of parameters to be tested to the test instructions, to obtain a configuration file including multiple test instructions with completed parameter configurations;

[0010] Generate test code according to the configuration file;

[0011] The test code is executed to obtain a test result, so as to optimize the performance of the electronic device according to the test result.

[0012] In a second aspect, an embodiment of the present application further discloses a device for optimizing performance of an electronic device, the device comprising:

[0013] A first acquisition module, used to acquire a device identification of an electronic device;

[0014] A second acquisition module, configured to acquire a test instruction corresponding to the device identifier according to the device identifier and a correspondence between a pre-stored device identifier and a pre-stored test instruction;

[0015] A third acquisition module is used to acquire multiple groups of parameters to be tested, and configure the multiple groups of parameters to be tested to the test instructions to obtain a configuration file including multiple test instructions with completed parameter configurations;

[0016] A fourth acquisition module, used to generate a test code according to the configuration file;

[0017] The performance optimization module is used to execute the test code to obtain the test result, so as to optimize the performance of the electronic device according to the test result.

[0018] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0019] In a fourth aspect, an embodiment of the present application further discloses a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0020] In this embodiment, according to the device identification, and the correspondence between the pre-stored device identification and the pre-stored test instructions, the test instructions corresponding to the device identification are obtained, thereby avoiding the problems of low efficiency and low accuracy caused by manually writing test instructions. Multiple groups of parameters to be tested are obtained, and the multiple groups of parameters to be tested are respectively configured to the test instructions to obtain a configuration file including multiple groups of configured test instructions; a test code suitable for a preset test tool is generated according to the configuration file. The tester does not need to be familiar with the grammatical rules of the preset test tool, but only needs to generate a configuration file, and generate a test code suitable for the preset test tool according to the configuration file, which reduces the difficulty of generating the test code and improves the efficiency of generating the test code. There is no need to repeatedly test the test results corresponding to different parameters to be tested manually. By executing the test code through the preset test tool, multiple groups of test results can be quickly obtained, and the electronic equipment is optimized according to the multiple groups of test results, thereby improving the efficiency of equipment optimization. The problems of low optimization efficiency and easy errors in the related technology are solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In the attached picture:

[0022] Figure 1 It is a flowchart of the steps of a method for optimizing performance of an electronic device provided in an embodiment of the present application;

[0023] Figure 2 is a flowchart of another method for optimizing electronic device performance provided by an embodiment of the present application;

[0024] Figure 3 is a flowchart of another method for optimizing electronic device performance provided by an embodiment of the present application;

[0025] Figure 4 is a block diagram of an electronic device performance optimization device provided in an embodiment of the present application;

[0026] Figure 5 is a block diagram of an electronic device according to an embodiment of the present application;

[0027] Figure 6 It is a block diagram of an electronic device of another embodiment provided by the embodiments of the present application. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0030] The electronic device performance optimization method provided by the embodiment of the present application is described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0031] Some nouns or terms appearing in this application are subject to the following interpretations:

[0032] Flexible In / Out Tester (FIO) is an open source tool for testing I / O performance. It can generate various I / O loads to simulate application behaviors in real applications, such as request size, concurrency, sequential or random access, etc. It can be used to test hard disks, solid state drives (SSDs), redundant arrays of disks, etc. Independent Disks, RAID) arrays, etc., to evaluate the performance of the storage system.

[0033] Network Performance Benchmark (Netperf) is an open source network performance testing tool used to measure network performance based on User Datagram Protocol (UDP) or Transmission Control Protocol (TCP) transmission.

[0034] The Standard Performance Evaluation Corporation CPU (SpecCPU) is an industry-standard CPU-intensive benchmark suite that uses actual user workloads in application development to provide a comparative measure of compute-intensive performance and is used to evaluate the performance of the CPU in different application scenarios.

[0035] Testing tool Pytest: is a full-featured Python testing framework that helps testers write, organize, and run high-quality test code. You can use the @pytest.mark.parametrize decorator for parameterized testing, and then run the same test based on a set of different inputs.

[0036] Yet Another Markup Language (YALM): Its syntax is similar to other high-level languages, and it can simply express data forms such as lists, hash tables, and scalars. YALM is suitable for expressing or editing data structures, various configuration files, dumping debugging content, and file outlines. For example, the format of many email headers is very close to the format of YALM.

[0037] The electronic device performance optimization method of this embodiment is further illustrated below.

[0038] Figure 1 is a flowchart of a method for optimizing electronic device performance provided by an embodiment of the present application. Figure 1 As shown, the method may include the following steps:

[0039] Step 101: Obtain a device identification of an electronic device.

[0040] The electronic device may be a server, a personal computer, a switch, or other electronic devices. The device identifier may be the name of the electronic device, a serial number (SN), or other identifiers.

[0041] Step 102: According to the device identification and the correspondence between the pre-stored device identification and the pre-stored test instructions, a test instruction corresponding to the device identification is obtained.

[0042] For example, a test instruction suitable for performing a performance test on an electronic device corresponding to the device identification is generated in advance, and a corresponding relationship is established based on the generated test instruction and the device identification.

[0043] Step 103, obtaining multiple groups of parameters to be tested, and configuring the multiple groups of parameters to be tested to the test instructions, to obtain a configuration file including multiple test instructions with completed parameter configurations.

[0044] The parameters to be tested are the parameters that will affect the performance of the electronic device. For example, if the electronic device is a server, server performance tuning refers to a series of optimization operations on the server hardware, software and network configuration to improve the server's performance such as response speed and stability, while reducing the server's energy consumption to ensure that the server can run various applications and services efficiently and stably; the parameters to be tested for the server can be the server's hardware parameters, software parameters or network configuration parameters.

[0045] For example, multiple sets of preset parameters to be tested may be obtained and stored in a parameter dictionary. When the performance of the electronic device is tuned, the parameters to be tested may be obtained from the parameter dictionary by traversing the dictionary.

[0046] For example, according to a preset parameter generation strategy, multiple groups of parameters to be tested are generated within the parameter range. For example, if the parameter range includes multiple parameter values, the parameters to be tested can be obtained by a random selection method or by a traversal method. Thus, the performance optimization test of the electronic device can be performed according to the parameter values ​​set within the parameter range.

[0047] For example, if the parameter to be tested is the compression efficiency of compressing data in the hard disk, a parameter range including multiple compression efficiencies can be set, and multiple groups of parameters to be tested can be obtained by randomly selecting some compression efficiencies or traversing each compression efficiency.

[0048] For example, the parameter range includes an upper limit value and a lower limit value, and then within the range formed by the upper limit value and the lower limit value, multiple parameters to be tested are obtained according to the preset parameter interval. In this way, the parameters to be tested for the performance optimization test of the electronic device can be automatically obtained, thereby improving the performance optimization efficiency of the electronic device.

[0049] Specifically, a test instruction for a device identifier and multiple groups of parameters to be tested are obtained, and a group of parameters to be tested are configured to a test instruction to obtain a test instruction with completed parameter configuration. Thus, based on multiple groups of parameters to be tested, multiple test instructions with completed parameter configuration can be obtained. According to multiple test instructions with completed parameter configuration, a configuration file including multiple test instructions with completed parameter configuration is obtained.

[0050] The test instruction is an instruction for a preset test tool to execute to perform a performance test on an electronic device. For example, the test object is a hard disk in an electronic device, and the parameters to be tested include a test mode for the hard disk. The test mode includes a write operation test and a read operation test. The write operation test is configured in the test instruction to obtain a test instruction for executing the write operation test, and the read operation test is configured in the test instruction to obtain a test instruction for executing the read operation test.

[0051] Step 104: Generate test code according to the configuration file.

[0052] Furthermore, the test code is executed to obtain a plurality of test results, wherein the test results correspond one to one with the test instructions for which the parameters are configured.

[0053] A test code suitable for a preset test tool is generated according to the configuration file, so that the preset test tool executes the test code to obtain multiple groups of test results, so as to optimize the performance of the electronic device according to the test results, wherein a group of test results has a corresponding group of parameters to be tested.

[0054] For example, the parameters to be tested and the test instructions in the configuration file are rendered by the decorator of the preset test tool to obtain the test code. For example, the preset test tool is Pytest, and the decorator of the preset test tool is @pytest.mark.parametrize.

[0055] Step 105, executing the test code to obtain the test result, so as to optimize the performance of the electronic device according to the test result.

[0056] For example, the test code is executed to obtain multiple test results, the test result that reaches the preset test result is determined as the optimal test result, and the parameters to be tested corresponding to the optimal test result are determined as the optimal parameters of the electronic device. Subsequently, during the operation of the electronic device, it is operated based on the optimal parameters to ensure that the electronic device is in the best operating state.

[0057] With the rapid development of informatization, servers are core components of enterprise IT architecture. Their performance affects the operational efficiency and user experience of enterprises. Server performance is the core competitiveness of server manufacturers and therefore requires special attention. Server performance optimization has become an indispensable part of performance testing. Server performance optimization is not only about installation, configuration and daily maintenance, but also requires in-depth understanding of the server's hardware and software environment, and reasonable configuration and optimization according to actual needs.

[0058] Performance tuning can improve the processing power of the server, reduce latency, reduce energy consumption, and improve overall operational efficiency. In the actual testing process, electronic devices such as servers have special test properties: they need to be executed repeatedly, have low test efficiency, and have inaccurate test data. Servers with different configurations also have great personalized differences in parameter configuration during different performance tuning processes.

[0059] In the related technologies, hard disk performance tuning can be performed based on the third-party tool FIO, network performance tuning can be performed using the tool Netperf, and electronic equipment performance tuning can also be performed using the SpecCPU 2006 performance tuning method, Stream performance tuning method, Netxun onboard network performance tuning, component tuning and other optimization methods. Although these tools can achieve the tuning goals, they need to be executed repeatedly manually during the performance tuning process, resulting in low test efficiency, prone to errors, waste of test resources, and high requirements on the ability of testers. The methods are suitable for single-machine single operations and have poor reusability. Manual regular monitoring and operation are required, which has the disadvantage of high labor costs. How to efficiently and accurately complete the performance tuning of electronic equipment is an urgent problem to be solved.

[0060] In this embodiment, according to the device identification, and the correspondence between the pre-stored device identification and the pre-stored test instructions, the test instructions corresponding to the device identification are obtained, thereby avoiding the problems of low efficiency and low accuracy caused by manually writing test instructions. Multiple groups of parameters to be tested are obtained, and the multiple groups of parameters to be tested are respectively configured to the test instructions, and a configuration file including multiple groups of configured test instructions is obtained, and a test code suitable for a preset test tool is generated according to the configuration file. The tester does not need to be familiar with the grammatical rules of the preset test tool, but only needs to generate a configuration file, and a test code suitable for the preset test tool can be generated according to the configuration file, which reduces the difficulty of generating the test code and improves the efficiency of generating the test code. There is no need to repeatedly test the test results corresponding to different parameters to be tested manually. By executing the test code obtained according to the method of this embodiment through the preset test tool, multiple groups of test results can be quickly obtained, and the electronic equipment is optimized according to the multiple groups of test results, thereby improving the efficiency of equipment optimization. The problems of low optimization efficiency and easy errors in the related technology are solved.

[0061] Figure 2 is a flowchart of another method for optimizing electronic device performance provided by an embodiment of the present application, referring to Figure 2 , the method may include the following steps:

[0062] Step 201: Obtain a device identification of an electronic device.

[0063] The method of this step has been described in the aforementioned step 101 and will not be repeated here.

[0064] Step 202: According to the device identification and the correspondence between the pre-stored device identification and the pre-stored test instructions, a test instruction corresponding to the device identification is obtained.

[0065] The method of this step has been described in the aforementioned step 102 and will not be repeated here.

[0066] Step 203, obtaining multiple groups of parameters to be tested, and configuring the multiple groups of parameters to be tested to the test instructions, to obtain a configuration file including multiple test instructions with completed parameter configurations.

[0067] The configuration file may be a YAML file. The configuration file includes test instructions that configure the parameters to be tested, and may also include operation templates for simulating actual scenarios, where the operation templates are used to mark actual scenarios during performance testing; the configuration file may also include the time to wait for output of the test, keywords for extracting test results, and the execution method of the test code.

[0068] Step 204, rendering the parameters to be tested and the test instructions in the configuration file through the rendering instructions adapted to the preset test tool, and obtaining the test code suitable for the preset test tool.

[0069] You can use the decorator of the preset test tool to extract the parameters to be tested and the test instructions in the configuration file. For example, the preset test tool is Pytest, and its fixture is @pytest.mark.parametrize.

[0070] Step 205: Execute the test code through a preset test tool to obtain a test result, so as to optimize the performance of the electronic device according to the test result.

[0071] By rendering the rendering instructions adapted to the preset test tool, the parameters to be tested and the test instructions are rendered to obtain the test code suitable for the preset test tool, and then the test code is executed by the preset test tool to obtain multiple groups of test results.

[0072] Specifically, the parameter to be tested is used as an input parameter and assigned to a test function in a preset test tool for implementing the same function as the test instruction, thereby implementing the rendering of the parameter to be tested and the test instruction.

[0073] The parameters to be tested and the test instructions in the configuration file are rendered through rendering instructions adapted to the preset test tool to obtain the test code suitable for the preset test tool. That is, based on the preset test tool of a third party, the test code is generated according to the configuration file. The preset test tool does not need to write code. Based on the generated test code, the performance of the electronic device can be optimized.

[0074] For example, the configuration file also includes keywords for identifying test results.

[0075] Correspondingly, the preset test tool in step 205 executes the test code to obtain multiple groups of test results, including:

[0076] Sub-step A1, obtaining a test report containing test results after executing the test code.

[0077] The test report can be in JSON format or other formats.

[0078] Sub-step A2, obtaining keywords from the configuration file.

[0079] The configuration file includes keywords for describing keywords and keyword extraction instructions for obtaining test results from the test report according to the keywords. For example, the extraction instruction is: cmd:cat{{log}}|grep"bw="|awk'{print$3}'|tr-d'a-zA-Z,= / ', where the keyword key is bw.

[0080] Sub-step A3, extracting the test results from the position corresponding to the keyword in the test report according to the keyword.

[0081] By configuring keywords for indicating test results in the configuration file, after obtaining a test report according to a preset test tool, the test results in the test report can be quickly located according to the keywords in the configuration file.

[0082] For example, the configuration file also includes a directive execution strategy.

[0083] Correspondingly, step 205 may include the following sub-steps:

[0084] Sub-step B1, obtaining the instruction execution strategy from the configuration file.

[0085] The instruction execution strategy includes executing the test instructions configured with parameters in the test code in a serial or parallel manner. For example, according to the keywords used to describe the execution strategy, the execution strategy corresponding to the keyword is obtained from the configuration file.

[0086] Sub-step B2, according to the instruction execution strategy, executes the test instructions with multiple groups of parameter configurations in the test code to obtain the test results.

[0087] For example, if the instruction execution strategy is parallel, the test instructions with parameter configuration completed in the test code are executed simultaneously in parallel to obtain test results corresponding to each set of test instructions with parameter configuration completed; for another example, if the instruction execution strategy is serial, the test instructions with parameter configuration completed in the test code are executed sequentially in serial to obtain test results corresponding to each set of test codes.

[0088] For example, the configuration file also includes preset test results; step 205 may include:

[0089] Sub-step C1, obtaining a preset test result from a configuration file.

[0090] The preset test results are set by the user according to the requirements and are used to reflect the parameter values ​​of the electronic equipment optimization objectives.

[0091] Sub-step C2: if it is determined that the current test result reaches the preset test result, the execution of the test code is stopped, and the parameters to be tested corresponding to the test result that reaches the preset test result are determined as the optimal parameters of the electronic device.

[0092] A test result that reaches a preset test result is obtained, and the parameter to be tested corresponding to the test result that reaches the preset test result is determined as an optimized parameter of the electronic device.

[0093] Sub-step C3, if it is determined that the current test result does not reach the preset test result, continue to execute the next test instruction with completed parameter configuration in the test code until a test result that reaches the preset test result is obtained.

[0094] The preset test result is obtained from the configuration file. During the execution of the instruction, if the test result reaches the preset test result, the execution is stopped, otherwise the execution is continued until the test result that reaches the preset test result is obtained. In this way, it can be ensured that the optimal parameters that meet the performance optimization requirements of the electronic device are obtained, and the execution can be stopped when the preset test result is obtained, thereby saving subsequent execution steps and improving the efficiency of electronic device performance optimization.

[0095] For example, step 205 may also include the following sub-steps:

[0096] Sub-step D1, executing the test code to obtain multiple test results corresponding to the test instructions with completed parameter configuration in the test code.

[0097] Among them, one test result corresponds to a test instruction with completed parameter configuration;

[0098] Sub-step D2, obtaining a test result that meets a preset test result judgment condition from multiple test results, and determining the to-be-tested parameter corresponding to the test result that meets the preset test result judgment condition as the optimal parameter of the electronic device.

[0099] Among them, the preset test result judgment condition is used to compare multiple test results and determine which test result is the best according to the comparison result. For example, when performing a read operation test, different parameters to be tested related to the read operation are used to obtain test instructions after multiple parameter configurations, and the test code is executed to obtain the test results of the test instructions after each parameter configuration. The test result can be the time taken for the read operation test. From the multiple test results, the test result with the shortest time taken is selected, and the test result is the test result that meets the preset test result judgment condition.

[0100] Obtain all test results, and then obtain the test results that meet the preset test result judgment conditions from multiple test results. Based on this method, the optimal test result can be obtained from multiple test results, and then the optimal parameters for the operation of the electronic device can be obtained.

[0101] By setting preset test results in the configuration file, the optimization parameters of the electronic device can be automatically determined from the test results according to the preset test results, avoiding the problem of low test efficiency caused by obtaining the optimization parameters based on the test results of repeated manual tests.

[0102] This embodiment provides an automated performance optimization method suitable for most whole machine tuning tests. It can solve the problem of inefficiency caused by repeated operations and inaccurate test results in the tuning process of related technologies while meeting personalized tuning goals. This embodiment obtains test code through an abstract process and a method for configuring parameters to be tested, and performs performance optimization tests on electronic devices. Specifically, the electronic device performance testing method is made universal through the abstract process, and can support the tuning tests of most server machines or some components.

[0103] In practical applications, there are individual differences between different servers, and these individual differences will limit the scope of use of the electronic device performance optimization method. In this embodiment, personalized customization of the tuning data is achieved through external management and configuration of the test parameters. Based on the method of this embodiment, both universal and personalized characteristics can be achieved, which not only solves the problem in the related art that different models of servers and different server performances cannot be optimized using a unified performance optimization method, but also solves the problem that the tools involved in the electronic device performance optimization method in the related art are too concrete, resulting in limited use of the tuning tools.

[0104] The multiple groups of test results include all test results of all test instructions; after obtaining the test code suitable for the preset test tool in step 206, it also includes:

[0105] For example, there are multiple groups of test instructions and multiple groups of corresponding test results. One group of test instructions corresponds to one group of test results, and one group of test instructions corresponds to one group of parameters to be tested.

[0106] For example, the configuration file includes a preset test result evaluation strategy, the preset test result evaluation strategy is obtained from the configuration file, and the optimal test result is determined from all test results according to the test result evaluation strategy.

[0107] By obtaining all test results, comparing each test result, and determining the optimization parameters of the electronic device from all test results of all test instructions based on the comparison results, it can be ensured that the obtained optimization parameters are the parameters to be tested corresponding to the best test results and are determined as the optimization parameters of the electronic device.

[0108] In one embodiment, the parameters to be tested include test object information and test mode; the test object information includes the hard disk partition identifier to be tested of the hard disk partition to be tested, and the test mode includes a read operation test or a write operation test for the hard disk partition to be tested.

[0109] The hard disk partitions of the electronic device include dev / sda, dev / sdb, and dev / sdc. A hard disk partition may be randomly selected as the hard disk partition to be tested, or the hard disk partition to be tested may be determined from these hard disk partitions at once.

[0110] The parameters to be tested also include at least one of the following: the number of parallel tests for executing test instructions, the queue depth for testing hard disk partitions, the amount of data for testing hard disk partitions, and the hard disk running time for testing hard disk partitions.

[0111] Step 203 may include the following sub-steps:

[0112] Sub-step 2031, for each group of parameters to be tested, the hard disk partition identifier to be tested, the test mode, the number of parallel tests, the queue depth, the data volume, and the hard disk running time in the parameters to be tested are configured to the test instruction to obtain a test instruction with completed parameter configuration.

[0113] For example, the queue depth to be tested is obtained from at least one queue depth. The queue depth indicates the number of simultaneous input / output operations. For example, the queue depth iodepth to be tested is obtained from at least one queue depth, which may be: iodepth=256.

[0114] The data volume to be tested may be selected from at least one data volume by traversal or random selection. For example, the selected data volume to be tested bs may be: bs=128K.

[0115] The data volume to be tested may be selected from at least one data volume by traversal or random selection. The data volume to be tested may also be selected from a data volume interval consisting of a maximum data volume and a minimum data volume according to a preset data volume interval. For example, the selected data volume bs to be tested may be: bs=128K.

[0116] From at least one duration of each test, the duration to be tested is obtained. The duration is the duration of each test. For example, the duration runtime to be tested obtained from at least one duration may be: runtime=2m.

[0117] The proportion to be tested is obtained from at least one proportion of the test space in the total space of the hard disk partition.

[0118] The proportion to be tested may be selected from at least one proportion by traversal or random selection. The proportion to be tested may also be selected from a proportion interval consisting of a maximum proportion and a minimum proportion according to a preset proportion interval. For example, the obtained proportion size to be tested may be: size=100%.

[0119] Step 2032, obtaining a configuration file according to the test instructions after the multiple parameter configurations are completed.

[0120] Specifically, for each group of parameters to be tested and test instructions, a test instruction after parameter configuration is obtained, and a configuration file is obtained according to multiple test instructions.

[0121] For example, the configuration file can be a YALM file. For example, the YALM file can be used to implement external test data configuration management. The syntax of the YALM file is similar to other high-level languages, and can simply express data forms such as lists, hash tables, and scalars. The YALM file has the characteristics of using whitespace symbols for indentation and relying heavily on appearance, and is particularly suitable for expressing or editing data structures and various configuration files. Different command format templates for different performance tuning indicators can be configured based on the characteristics of the YALM file, and it is ensured that when different configuration items result in different parameters, it is easy for testers to modify.

[0122] Among them, for different parameter values ​​used by different configuration items, these different parameter values ​​can be configured in the YALM file and read as a configuration dictionary. Based on the YALM file, when performing hard disk stress testing through FIO, configuration items such as memory block (block size, bs), read-write mode (read-write, rw), number of jobs (number of jobs, numjobs), and file name (filename) can be enumerated.

[0123] For the non-uniform memory access (NUMA) node binding operation that is completely dependent on the test scenario settings, specific configuration can be performed in the specific case nodes in the YALM file to achieve fully customized tuning tests with different tuning indicators and different server configurations.

[0124] The above content describes the simulation of real usage scenarios during performance tuning. The following is an analysis and processing of server performance data in simulated scenarios. Comprehensive analysis shows that performance data exists mainly in two ways, including log files (text files that record runtime information of systems, applications, or other software components) and console output. Both methods can store performance data in files by adjusting third-party test tool commands or shell scripts (tee, redirected output), etc. Then, the flexibility of the shell is used to read the data to be tested and further statistically analyze it. The shell script is also stored in an external YALM file to facilitate personalized configuration of different performance indicators and different configuration items.

[0125] Step 205 may include the following sub-steps:

[0126] Sub-step 2051, according to the test instruction, the number of parallel tests, the queue depth, the data volume, and the hard disk running time, a read operation or a write operation is performed on the hard disk partition to be tested to obtain a test result.

[0127] When the test mode is a read operation test, the data volume is the data volume read from the hard disk partition to be tested; when the test mode is a write operation test, the data volume is the data volume written to the hard disk partition to be tested.

[0128] The method of this embodiment is further described below in conjunction with specific embodiments.

[0129] In this embodiment, the performance optimization object is the hard disk of the electronic device, and the parameters to be tested include multiple hard disk partitions, namely the first hard disk partition dev / sda, the second hard disk partition dev / sdb, and the third hard disk partition dev / sdc. The above configuration parameters are respectively configured to the test instructions, and the obtained configured test instructions can be marked as: filename: ( / dev / sda, / dev / sdb, / dev / sdc).

[0130] Get the configuration file Optimize.YALM in YALM format.

[0131] It should be noted that the naming method and format of the configuration file can be set according to user needs.

[0132] For example, the configuration file may include the following:

[0133] Instructions for enumerating parameters to be tested that need to be tested. Further, by enumerating performance test parameters, parameter items to be tuned can be enumerated.

[0134] For example, the test object of the electronic device is the first hard disk partition dev / sda, the second hard disk partition dev / sdb, and the third hard disk partition dev / sdc. The test instructions corresponding to each hard disk partition are: filename: ( / dev / sda, / dev / sdb, / dev / sdc).

[0135] Test instructions may include:

[0136] template:

[0137] cmd:fio{{filename}}-rw=read-numjobs=8-bs=512b-size=64G

[0138] Among them, template represents an operation template used to simulate actual scenarios.

[0139] The test command that the third-party preset test tool needs to execute is: cmd:fio{{filename}}-rw=read-numjobs=8-bs=512b-size=64G.

[0140] For example, the parameters to be tested can be enumerated by enumerating the performance test parameters. The instructions for the parameters to be tested that need to be tested may include:

[0141] case: (fio --filename= / dev / sda --numjobs=1 --iodepth=256 --rw=write --bs=128K --runtime=2m --size=100%; This instruction indicates that the preset test tool fio is used to test the hard disk partition dev / sda, where the number of parallel tests numjobs is 1, the queue depth iodepth is 256, the test mode rw is the write operation test write, the hard disk runtime runtime is 2m, and the hard disk share size is 100%.

[0142] fio --filename= / dev / sdb --numjobs=1 --iodepth=256 --rw=read --bs=128K --runtime=2m --size=100%; This instruction indicates that the hard disk partition dev / sdb is tested, where the test mode rw is the read operation test read.

[0143] fio --filename= / dev / sdc --numjobs=1 --iodepth=256 --rw=randread --bs=4K --runtime=2m --size=100%; This instruction indicates that the hard disk partition / dev / sdc is tested, and the test mode rw is the read operation test randread.

[0144] fio --filename= / dev / sdd --numjobs=1 --iodepth=256 --rw=randwrite --bs=4K --runtime=2m --size=100%; This instruction indicates to test the hard disk partition dev / sdd, and the test mode rw is the write operation test randwrite.

[0145] fio --filename= / dev / sda --numjobs=1 --iodepth=256 --rw=read --bs=128K --runtime=2m --size=100%; This instruction indicates to test the hard disk partition dev / sda, and the test mode rw is the read operation test read.

[0146] fio --filename= / dev / sda --numjobs=1 --iodepth=256 --rw=randread --bs=4K --runtime=2m --size=100%; This instruction indicates to test the hard disk partition dev / sda, and the test mode rw is the write operation test randread.

[0147] The configuration file also includes a template for simulating actual scenario operations, which is used to mark the process of simulating actual scenarios during the tuning process. The corresponding instruction for this part is: template:cmd:{{case}}, where cmd:{{case}} is the execution command of the third-party tuning tool.

[0148] The configuration file also includes a wait instruction for indicating the time to wait for the output test after the test code is executed: #case sleep 1. Among them, sleep 1 indicates that the waiting time is 1s.

[0149] The configuration file also includes the instructions for the keywords to be extracted. The keyword fields can be composed of arrays. The extracted fields eventually return a parameter dictionary. The instructions for extracting test results can be:

[0150] extract:

[0151] type:cmd

[0152] cmd:cat{{log}}|grep"bw="|awk'{print$3}'|tr-d'a-zA-Z,= / '

[0153] key:bw

[0154] Among them, extract indicates the extraction instruction, cat{{log}}|grep"bw="|awk'{print$3}'|tr-d'a-zA-Z,= / ' indicates the extraction instruction, and key:bw indicates that the keyword is bw, and the data corresponding to bw needs to be extracted from the test report as the test result.

[0155] For another example, the command to extract the test results can be:

[0156] type:cmd

[0157] cmd:cat{{log}}|grep"iops="|awk'{print$4}'|tr-d'a-zA-Z,=')

[0158] key:iops

[0159] Among them, cat{{log}}|grep"iops="|awk'{print$4}'|tr-d'a-zA-Z,=') indicates the extraction instruction, key:iops indicates that the keyword is iops, and the data corresponding to iops needs to be extracted from the test report as the test result.

[0160] For another example, the extraction instruction may be:

[0161] type:json

[0162] json:$.code

[0163] key:code

[0164] This command is in JSON format. key:code means that the data corresponding to code needs to be extracted from the test report as the test result.

[0165] The configuration file also includes instructions for analyzing the test results in the test report to determine whether they meet the requirements of the best test results:

[0166]

[0167] This instruction is used to determine whether the value of the test result bw is greater than or equal to the preset test result (expect) 100.

[0168] The configuration file also includes how the test code is executed:

[0169]

[0170] This instruction indicates whether the execution mode is parallel, and the default execution mode is serial, and it terminates when the test result reaches the preset test result true, or iterates through all parameters False.

[0171] After obtaining the configuration file, you can use the Pytest test tool to get the test code based on the parameterized management code.

[0172] For example, when the enumeration instruction is case: (fio --filename= / dev / sda --numjobs=1 --iodepth=256 --rw=write --bs=128K --runtime=2m --size=100%), the instruction to obtain the test code is:

[0173] @pytest.mark.parametrize('case',[……]

[0174] def test_optimize(case):

[0175] print("Command to be tested: {}".format(case))

[0176] When the enumeration instruction is filename:( / dev / sda, / dev / sdb, / dev / sdc), 1), the instruction to get the test code is:

[0177] @pytest.mark.parametrize('filename',[' / dev / sda',' / dev / sdb',' / dev / sdc']

[0178] def test_optimize(filename):

[0179] print("Name of the disk to be tested: {}".format(filename))

[0180] In this embodiment, the parameter value is built-in for convenience of explanation. However, in actual application, the parameters to be tested are read from the configuration file in the YALM format, and then the parameters to be tested are passed to the use case through the Pytest decorator @pytest.mark.parametrize.

[0181] In this embodiment, the @pytest.mark.parametrize decorator in the pytest technology is used to parameterize the test, so that the same test can be run with a different set of inputs (parameters to be tested) in the YALM file. For example, in the above embodiment, the numjobs parameter in the hardware tuning process is obtained by the preset test tool fio. After setting the parameter enumeration value of the test to be tuned in the YALM file, pytest uses this parameter as input and completes repeated tests of all input parameters, and then records the corresponding test results for subsequent analysis.

[0182] For example, you can manage tuning parameters through external files and use Python scripts to build tuning commands, thus solving the technical threshold problem of writing tuning commands.

[0183] For example, a custom analysis is performed on the current performance data, and a graphical analysis can be further generated based on the test results, so that the test results can be more intuitively and clearly displayed to the user who analyzes the test results.

[0184] Combine the following Figure 3 , further exemplary description of the embodiments of the present invention is given below:

[0185] Step S1, reading the parameter dictionary of the configuration file.

[0186] The parameter dictionary includes the parameters to be tested in the configuration file.

[0187] Step S2, reading process information of the configuration file.

[0188] When the preset test tool is started, it can first read the performance test related parameter dictionary according to the description of the configuration file structure, and read the performance test process control declaration information of the template section. Referring to the embodiment of the aforementioned configuration file, the template section is a template for simulating actual scene operations, which is used to mark the process of simulating actual scenes during the tuning process.

[0189] Step S3, rendering the parameters to be tested into the process information.

[0190] In this example, the parameters to be tested are rendered through the Pytest decorator @pytest.mark.parametrize and the jinjia2 technology of the YALM file to complete the rendering of the parameters to be tested and the test process, thereby generating the completed test code. Among them, jinjia2 is used to dynamically insert data into the template to generate the final output.

[0191] Step S4, rendering the parameters to be tested into the input parameters of the preset test tool.

[0192] The parameters to be tested are rendered into the input parameters of the preset test tool through Pytest's decorator @pytest.mark.parametrize.

[0193] Step S5, reading the execution mode in the configuration file.

[0194] The execution method is to execute multiple parameter-configured test instructions in the test code in a serial or parallel manner.

[0195] Step S6: Perform a simulated performance test on the electronic device using a preset test tool.

[0196] Combined with exetype.isparallel (serial or parallel) configured in the YALM file, multiple sets of parameter combinations for performance testing are tested (serial or parallel) and a test report is output at the same time.

[0197] Step S7, obtaining a test report output by a preset test tool.

[0198] For example, the obtained test report may be a performance report in a jog format or a performance report in a JSON format.

[0199] Step S8, reading the extraction field configuration item in the configuration file.

[0200] Read the extracted section content from the external YALM file, read the core indicator data in the test report file in combination with the extracted section content, and store it in the form of a parameter dictionary.

[0201] Wherein, referring to the configuration file content in the aforementioned embodiment, the extract section content of the configuration file includes extraction instructions and keywords for extracting test results, and the keywords are extraction field configuration items.

[0202] Step S9: Read performance indicator data from the performance report according to the extracted fields.

[0203] For example, if the performance report is in JSON format and the keyword is code, then the performance indicator data is extracted from the performance report according to the keyword code. The performance indicator data in this step is equivalent to the test report in the above embodiment.

[0204] Step S10, outputting performance indicator data.

[0205] The performance indicator data is equivalent to the test result in the above embodiment. The output performance data is used to determine whether the performance indicator data is a performance parameter that meets the performance requirements of the electronic device, and may also include performance indicator parameters for subsequent problem analysis and recording.

[0206] Step S11, reading the expected value in the configuration file.

[0207] For example, the expected value in the configuration file is read through the Pytest decorator @pytest.mark.parametrize, and the expected value is the preset test result in the aforementioned embodiment.

[0208] Step S12, analyzing and determining whether the performance indicator data reaches the expected value, if so, proceeding to step S13, otherwise returning to step S6.

[0209] Read the assert section content in the external YALM file, analyze it in conjunction with the performance indicator data, and determine whether the performance indicator data under the current parameters meets the expected requirements.

[0210] Referring to the configuration file content in the aforementioned embodiment, the asset byte content in the configuration file may include an expected value and a judgment condition for judging whether the expected value is reached.

[0211] Step S13, reading the execution mode.

[0212] The execution mode in the configuration file is read through the Pytest decorator @pytest.mark.parametrize. Referring to the configuration file in step S2, the execution mode includes serial or parallel.

[0213] Step S14, judging whether the execution interruption condition is met according to the execution mode, if yes, then the process ends, otherwise, it returns to step S6.

[0214] For example, the current performance tuning goal is determined by the extract.break field in the YALM file. Specifically, if the performance tuning goal is that the performance indicator data meets expectations, it can be set to True, indicating that the test will be terminated when a parameter configuration that meets the standard is found; if the performance tuning goal is to explore the optimal performance configuration, all configurations in the parameter dictionary need to be traversed, and it can be set to False.

[0215] This embodiment manages tuning commands according to the configuration file by generating a configuration file in the YALM format through abstracting the design concept of tuning commands and report processing. Furthermore, the tuning data is centrally organized into an external configuration YALM file before testing. When the performance indicators of the electronic equipment are subsequently tested, it is possible to avoid obtaining the parameters to be tested by manually writing programs, which greatly saves labor costs and improves testing efficiency. In addition, this embodiment provides a unified and standardized tuning template, which helps to lower the technical requirements for tuning testers, ensures the accuracy of tuning tests, and facilitates the review and tracing of the tuning process. Furthermore, for servers with the same performance indicators and similar configurations, the test data configuration can be directly reused, which improves the reuse rate of the script compared to the single-machine repeated writing method in the related art.

[0216] refer to Figure 4 , which shows an electronic device performance optimization device 30 provided in an embodiment of the present application, which is applied to remote management equipment, and the device 30 includes:

[0217] A first acquisition module 301 is used to acquire a device identification of an electronic device;

[0218] A second acquisition module 302, configured to acquire a test instruction corresponding to the device identifier according to the device identifier and a correspondence between the pre-stored device identifier and the pre-stored test instruction;

[0219] The first generating module 303 is used to obtain multiple groups of parameters to be tested, and configure the multiple groups of parameters to be tested to the test instructions to obtain a configuration file including multiple test instructions with completed parameter configurations;

[0220] The third acquisition module 304 is used to generate a test code according to the configuration file;

[0221] The second generating module 305 is used to execute the test code to obtain the test result, so as to optimize the performance of the electronic device according to the test result.

[0222] Optionally, the configuration file further includes a keyword for identifying the test result; the second generating module 305 may include:

[0223] The first acquisition submodule is used to obtain a test report containing test results after executing the test code;

[0224] The second acquisition submodule is used to obtain keywords from the configuration file;

[0225] The third acquisition submodule is used to extract the test result from the position corresponding to the keyword in the test report according to the keyword.

[0226] Optionally, the configuration file also includes an instruction execution strategy; the second generation module 305 includes:

[0227] The fourth acquisition submodule is used to obtain the instruction execution strategy from the configuration file; the instruction execution strategy includes executing the test instructions configured with parameters in the test code in a serial or parallel manner;

[0228] The fifth acquisition submodule is used to execute the test instructions with multiple groups of parameter configurations in the test code according to the instruction execution strategy to obtain the test results.

[0229] Optionally, the configuration file also includes preset test results; the second generation module 305 includes:

[0230] The sixth acquisition submodule is used to obtain the preset test result from the configuration file;

[0231] A first determination submodule is used to stop executing the test code if it is determined that the current test result reaches the preset test result, and determine the parameter to be tested corresponding to the test result that reaches the preset test result as the optimal parameter of the electronic device;

[0232] The first execution module is used to continue executing the next test instruction with completed parameter configuration in the test code if it is determined that the current test result does not reach the preset test result, until the test result that reaches the preset test result is obtained.

[0233] Optionally, the second generating module 305 includes:

[0234] The seventh acquisition submodule is used to execute the test code to obtain multiple test results corresponding to the test instructions with completed parameter configuration in the test code; one test result corresponds to one test instruction with completed parameter configuration;

[0235] The eighth acquisition submodule is used to acquire a test result that meets a preset test result judgment condition from multiple test results, and determine the test result that meets the preset test result judgment condition as the optimal parameter of the electronic device.

[0236] Optionally, the third acquisition module 304 may include:

[0237] A ninth acquisition submodule is used to render the parameters to be tested and the test instructions in the configuration file through a rendering instruction adapted to the preset test tool, so as to obtain a test code suitable for the preset test tool;

[0238] The second generation module 305 includes:

[0239] The tenth acquisition submodule is used to execute the test code through a preset test tool to obtain the test result.

[0240] Optionally, the parameters to be tested include test object information and test mode;

[0241] The test object information includes a hard disk partition identifier of the hard disk partition to be tested, and the test mode includes a read operation test or a write operation test for the hard disk partition to be tested;

[0242] The parameters to be tested also include at least one of the following: the number of parallel tests for executing the test instructions, the queue depth for testing the hard disk partition, the amount of data for testing the hard disk partition, and the hard disk running time for testing the hard disk partition;

[0243] The first generation module 303 includes:

[0244] The eleventh acquisition submodule is used to configure the hard disk partition identifier to be tested, the test mode, the number of parallel tests, the queue depth, the data volume, and the hard disk running time in the parameters to be tested to the test instruction for each group of parameters to be tested, and obtain a test instruction with completed parameter configuration;

[0245] The twelfth acquisition submodule is used to obtain a configuration file according to the test instructions completed by the multiple parameter configurations;

[0246] The second generation module 305 includes:

[0247] The thirteenth acquisition submodule is used to perform a read operation test or a write operation test on the hard disk partition to be tested corresponding to the hard disk partition identifier to be tested according to the test instructions, the number of parallel tests, the queue depth, the data volume, and the hard disk running time, to obtain a test result; wherein, when the test mode is a read operation test, the data volume is the data volume of data read from the hard disk partition to be tested, and when the test mode is a write operation test, the data volume is the data volume of data written to the hard disk partition to be tested.

[0248] In this embodiment, according to the device identification, and the correspondence between the pre-stored device identification and the pre-stored test instructions, the test instructions corresponding to the device identification are obtained, thereby avoiding the problems of low efficiency and low accuracy caused by manually writing test instructions. Through the preset parameter generation strategy, multiple groups of parameters to be tested within the parameter range are generated; the multiple groups of parameters to be tested are respectively configured to the test instructions, and a configuration file including multiple groups of configured test instructions is obtained; and a test code suitable for a preset test tool is generated according to the configuration file. The tester does not need to be familiar with the grammatical rules of the preset test tool, but only needs to generate a configuration file, and generate a test code suitable for the preset test tool according to the configuration file, which reduces the difficulty of generating the test code and improves the efficiency of generating the test code. There is no need to repeatedly test the test results corresponding to different parameters to be tested manually. By executing the test code through the preset test tool, multiple groups of test results can be quickly obtained, and the electronic equipment is optimized according to the multiple groups of test results, thereby improving the efficiency of equipment optimization. The problem of low optimization efficiency and easy error in the related technology is solved.

[0249] Reference Figure 5 , the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .

[0250] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0251] The memory 504 is used to store various types of data to support the operation of the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, multimedia, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0252] The power supply component 506 provides power to the various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.

[0253] The multimedia component 508 includes an interface that provides an output interface between the electronic device 500 and the user. In some embodiments, the interface may include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes a touch panel, the interface may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0254] The audio component 510 is used to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0255] The input / output I / O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0256] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 515 can detect the open / closed state of the electronic device 500, the relative positioning of the components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 515 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0257] The communication component 516 is used to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0258] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement a method for optimizing electronic device performance provided in an embodiment of the present application.

[0259] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0260] Figure 66 is a block diagram of an electronic device 600 according to another embodiment of the present invention. For example, the electronic device 600 may be provided as a remote management device. Figure 6 , the electronic device 600 includes a processing component 622, which further includes one or more processors, and a memory resource represented by a memory 632, for storing instructions that can be executed by the processing component 622, such as an application. The application stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 622 is configured to execute instructions to perform an electronic device performance optimization method provided in an embodiment of the present application.

[0261] The electronic device 600 may also include a power supply component 626 configured to perform power management of the electronic device 600, a wired or wireless network interface 650 configured to connect the electronic device 600 to a network, and an input / output (I / O) interface 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, FreeBSD TM or the like.

[0262] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0263] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for optimizing electronic equipment performance, characterized in that: The method comprises: Obtaining a device identification of an electronic device; According to the device identification and the correspondence between the pre-stored device identification and the pre-stored test instructions, obtaining the test instruction corresponding to the device identification; Acquire multiple groups of parameters to be tested, and configure the multiple groups of parameters to be tested to the test instructions, to obtain a configuration file including multiple test instructions with completed parameter configurations; Generate test code according to the configuration file; The test code is executed to obtain a test result, so as to optimize the performance of the electronic device according to the test result.

2. The method according to claim 1, characterized in that The configuration file also includes an instruction execution strategy; the executing the test code to obtain a test result includes: Acquire the instruction execution strategy from the configuration file; the instruction execution strategy includes executing the test instructions configured with parameters in the test code in a serial or parallel manner; According to the instruction execution strategy, the test instructions with multiple groups of parameter configurations in the test code are executed to obtain the test results.

3. The method according to claim 1, characterized in that The configuration file also includes a preset test result; executing the test code to obtain the test result, so as to optimize the performance of the electronic device according to the test result, includes: Obtaining a preset test result from the configuration file; If it is determined that the current test result reaches the preset test result, the execution of the test code is stopped, and the parameters to be tested corresponding to the test result reaching the preset test result are determined as the optimal parameters of the electronic device; If it is determined that the current test result does not reach the test result of the preset test result, continue to execute the next test instruction with completed parameter configuration in the test code until a test result that reaches the preset test result is obtained.

4. The method according to claim 1, characterized in that The executing the test code to obtain a test result, and optimizing the performance of the electronic device according to the test result, includes: Execute the test code to obtain multiple test results corresponding to the test instructions with completed parameter configuration in the test code; one test result corresponds to one test instruction with completed parameter configuration; A test result that satisfies a preset test result judgment condition is obtained from the multiple test results, and the to-be-tested parameter corresponding to the test result that satisfies the preset test result judgment condition is determined as the optimal parameter of the electronic device.

5. The method according to claim 1, characterized in that The generating of the test code according to the configuration file comprises: Rendering the parameters to be tested and the test instructions in the configuration file through rendering instructions adapted to the preset test tool to obtain a test code suitable for the preset test tool; The executing the test code to obtain the test result includes: The test code is executed by the preset test tool to obtain the test result.

6. The method according to claim 1, characterized in that The configuration file also includes keywords for identifying test results; Execute the test code to obtain test results, including: Obtaining a test report containing the test results after executing the test code; Obtaining the keyword from the configuration file; The test result is extracted from a position in the test report corresponding to the keyword according to the keyword.

7. The method according to claim 1, characterized in that The parameters to be tested include test object information and a test mode; the test object information includes a hard disk partition identifier to be tested of the hard disk partition to be tested, and the test mode includes a read operation test or a write operation test for the hard disk partition to be tested; The parameters to be tested also include at least one of the following: the number of parallel tests for executing test instructions, the queue depth for testing the hard disk partition, the amount of data for testing the hard disk partition, and the hard disk running time for testing the hard disk partition; Configuring multiple groups of parameters to be tested to the test instructions to obtain a configuration file including multiple test instructions with completed parameter configurations, including: For each group of parameters to be tested, the hard disk partition identifier to be tested, the test mode, the number of parallel tests, the queue depth, the data volume, and the hard disk running time in the parameters to be tested are configured to the test instruction to obtain a test instruction with completed parameter configuration; Obtaining the configuration file according to the test instructions completed by the multiple parameter configurations; The executing the test code to obtain the test result includes: According to the test instruction, the number of parallel tests, the queue depth, the data volume, and the hard disk running time, a read operation test or a write operation test is performed on the hard disk partition to be tested corresponding to the hard disk partition identifier to be tested, to obtain the test result; Among them, when the test mode is a read operation test, the data amount is the amount of data read from the hard disk partition to be tested, and when the test mode is a write operation test, the data amount is the amount of data written to the hard disk partition to be tested.

8. An electronic equipment performance optimization device, characterized in that: The device comprises: A first acquisition module, used to acquire a device identification of an electronic device; A second acquisition module, configured to acquire a test instruction corresponding to the device identifier according to the device identifier and a correspondence between a pre-stored device identifier and a pre-stored test instruction; A third acquisition module is used to acquire multiple groups of parameters to be tested, and configure the multiple groups of parameters to be tested to the test instructions to obtain a configuration file including multiple test instructions with completed parameter configurations; A fourth acquisition module, used to generate a test code according to the configuration file; The performance optimization module is used to execute the test code, obtain the test result, and optimize the performance of the electronic device according to the test result.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method as claimed in any one of claims 1 to 7.